Mechanism Grab Bag

Following are interesting mechanisms that are contained--for the most part--within the implementation of a single member function. For details, use the SNiFF+ browser to look at member function implementations and descriptions.


Mechanism

Look in the implementation of...
Notes about the mechanism
Actions Handling actions from the main view TChatView::HandleViewAction of Taligent Chat
Caucus framework Launching a new caucus TChatHandler::JoinChat of Taligent Chat
Creating a read thread TChatHandler::JoinChat of Taligent Chat
Creating new caucus member TChatHandler::JoinChat of Taligent Chat
Sending a caucus message TChatHandler::JoinChat
TChatHandler::LeaveChat
TChatHandler::SendChatMsg of Taligent Chat
Sends message to other discussion members.
Receiving a caucus message TChatHandler::HandleReceivedData of Taligent Chat Incoming messages are appended to the output window pane.
Collections Using a raw array TVolumeDrawer::SetVolumeInformation of Stock Browser
Looking up a value in a dictionary TPickerModel::AdoptStock of Stock Browser
Iterating over a dictionary TPickerModel::CopyNames
TPickerModel::CopyContentsFrom of Stock Browser
Copying key-value pair objects TPickerModel::CopyContentsFrom of Stock Browser
Generalized collection copying THypertextScrapItem::THypertextScrapItem of WebRunner Sample
Adding to a collection MFeedbacker::AdoptFeedback of Taligent Selection Tool
Removing from a collection MFeedbacker::OrphanFeedback of Taligent Selection Tool
Replacing an item in a collection MFeedbacker::ReplaceFeedback of Taligent Selection Tool
Iterating through a collection's contents MFeedbacker::DrawFeedback of Taligent Selection Tool
Color Getting a color TPriceDrawer::TPriceDrawer
TViewerContentView::DrawContents
TPickerView::DrawContents of Stock Browser
Commands Making your command undoable TSetGraphConstructorCommand::
TSetGraphConstructorCommand
of Stock Browser
Using a command binding TWebLinkView::MouseDown of WebRunner Sample
Communications Establishing a service TStockDispatcher::LaunchStockServer of Stock Browser
Registering RPC requests TStockDispatcher::TStockDispatcher of Stock Browser
Beginning RPC requests TStockCaller::CopyAllStocks
TStockCaller::CopyAvailableNames
TStockCaller::CopyStock
TStockCaller::CopyStockData
of Stock Browser
Sending RPC requests TStockCaller::CopyAllStocks
TStockCaller::CopyAvailableNames
TStockCaller::CopyStock
TStockCaller::CopyStockData
of Stock Browser
Ending RPC requests TStockCaller::CopyAllStocks
TStockCaller::CopyAvailableNames
TStockCaller::CopyStock
TStockCaller::CopyStockData
of Stock Browser
Dispatching control to a remote dispatcher TStockDispatcher::LaunchStockServer of Stock Browser
Creating a local service reference TStockDispatcher::CreateLocalServiceReference of Stock Browser
Creating a network service reference TStockDispatcher::CreateNetworkServiceReference of Stock Browser
Handling RPC requests TStockDispatcher::CopyAllStockStub
TStockDispatcher::CopyAllAvailableNamesStub
TStockDispatcher::CopyStockStub
TStockDispatcher::CopyStockDataStub of Stock Browser
Compound document Copying the current model selection TCurrentSelectionTarget::TCurrentSelectionTarget of Taligent Selection Tool
Setting the current model selection TCurrentSelectionTarget::AdoptSelection of Taligent Selection Tool
Cursor tools Creating a tool target TRandSelector::MouseDown of Taligent Selection Tool
Creating a TToolNegotiator TDOMDocumentComponentView::
HandleAfterConnectionToViewRoot of Taligent Selection Tool
Destroying a TToolNegotiator TDOMDocumentComponentView::
HandleBeforeDisconnectionFromViewRoot of Taligent Selection Tool
Dispatching events to a cursor tool TDOMDocumentComponentView::
DispatchEvent of Taligent Selection Tool
Data translation Importing data using TImportForeignDataQuery TURL::Follow of WebRunner Sample Shows type negotiation and actual translation.
Translation of foreign data to scrap item TGIFTranslator::CreateScrapItem of WebRunner Sample
Installation script for global translator GIFtranslator.txt of WebRunner Sample Text file declaring which translators support which data types.
Dialogs Creating and adding a dialog to the presentation TChatView::HandleJoinAction of Taligent Chat Uses TGUIPresenter::
AdoptDialogController
Removing a dialog from the presentation TChatView::HandleLeave of Taligent Chat Uses TGUIPresenter::
OrphanDialogController
Creating a dialog view TChatGUIDialogController::HandleCreateDialogView of Taligent Chat Grabs view for archive.
Setting up default cancel and accept buttons TChatGUIDialogController::HandleCreateDialogView of Taligent Chat
Handling open of dialog TChatGUIDialogController::HandleOpen of Taligent Chat Sets the value from the model data.
Handling accept action TChatGUIDialogController::HandleAccept of Taligent Chat Attempts the actual join.
Handling cancel of dialog TChatGUIDialogController::HandleCancel of Taligent Chat
Document components Creating a document component TWebModel::FollowURL
TWebLink::CreateWebLinkComponent of WebRunner Sample
Components using Presentation Framework TWebModel::FollowURL
TWebLink::CreateWebLinkComponent of WebRunner Sample
Document programming Invalidating a view TGraphView::ReconstructGraph of Stock Browser
Supporting data exchange TPickerSelection::HandleReplaceData
TPickerSelection::HandleOrphanData
TPickerSelection::HandleCopyData
TPickerSelection::HandleCopyDataInto
of Stock Browser
Enables cut, copy, paste, and embedding.
Supporting undo and redo TSetGraphConstructorCommand::HandleDoBegin
TSetGraphConstructorCommand::HandleUndo
TSetGraphConstructorCommand::HandleRedo of Stock Browser
Adding your own command to a menu TViewerPresenter::CreateViewSubMenuItem of Stock Browser
Using dynamic casting TViewerPresenterState::LookupForWriting
TViewerPresenterState::LookupForReading of Stock Browser
Instantiating Document Component Stationery templates PickerStationery.C of Stock Browser
Creating and opening a document TWebModel::OpenWebDocument of WebRunner Sample
Creating a presenter state interest TViewerPresenterState::GetNewGraphConstructor-
Interest of Stock Browser
Creating a TModelPointerTo
<AModelType> for reading
TViewerContentView::CreateSelectionFromPoint of Stock Browser
Limiting TModelPointerTo locking scope TWebLinkView::MouseDown of WebRunner Sample Shows multiple locking to prevent deadlocks.
Drag and drop Initiating a drag TGraphicDocumentView::MouseDown of WebRunner Sample Creates drag item, graphic, and interactor.
Accepting a scrap item TGraphicDocumentView::AcceptDrop of WebRunner Sample
Moving a dragged item TDragSelector::MouseMoved of Taligent Selection Tool
Performing a drop TDragSelector::MouseUp of Taligent Selection Tool
Providing drop acceptance feedback MAutoDropAcceptor::DragItemMoved of Taligent Selection Tool
Accepting dropped data MAutoDropAcceptor::ChoosePreferredType
MAutoDropAcceptor::AcceptDrop of Taligent Selection Tool
File system Using mapped files TStockServer::AddStockData of Stock Browser
General Taligent programming Creating a collection TStockGraphConstructor::Do of Stock Browser
Using an iterator TPickerModel::AdoptStocks of Stock Browser
Using a deleter TStockDispatcher::CopyAllStocksStub of Stock Browser Destroys temporary heap-allocated objects when it exits scope.
Allocating space for a static data member TStandardGraph::kDefaultAxisLengths
TStandardGraph::kDefaultXAxisRange
TStandardGraph::kDefaultYAxisRange of Stock Browser
Geometries Checking intersection and containment TPickerView::GetDisplaysHit of Stock Browser
Graphics Drawing a point TPriceDrawer::DrawIntoGraph of Stock Browser
Drawing text TLabelDrawer::DrawIntoGraph
TViewerContentView::DrawContents of Stock Browser
Calculating rectangular bounds TPriceDrawer::GetBounds of Stock Browser This approach uses TGRect::ExtendTo.
Linking a matrix to a port TStandardGraph::Draw
TTitleDrawer::DrawIntoGraph of Stock Browser
Applying a matrix to a graphic TBarDrawer::DrawIntoGraph of Stock Browser
Using graf bundles TPriceDrawer::TPriceDrawer
TPickerView::DrawContents
TViewerContentView::DrawContents of Stock Browser
Using graf matrices TPriceDrawer::DrawIntoGraph of Stock Browser
Drawing into a modifiable image TGraphView::ReconstructGraph of Stock Browser
Allocating an offscreen buffer and getting its port TSimulationLevel::Restart of Concurrent Actors
Copying an offscreen buffer to the screen TSimulationView::HandleRefreshNeeded of Concurrent Actors
Moving a shared graphic TExplodingActor::Draw
TShip::Draw of Concurrent Actors
When you share a graphic, you don't want to modify it every time you move it. This mechanism actually moves the coordinate system, not the graphic.
Getting bounds of a graphic MFeedbacker::ReplaceFeedback of Taligent Selection Tool
Transforming a point TInsertionTarget::SetInsertionPoint of Taligent Selection Tool
Creating a graphic group TBoundsFeedbackStyle::DoCreateFeedback of Taligent Selection Tool
Creating a transparent graphic THighlightFeedbackStyle::DoCreateFeedback of Taligent Selection Tool
Input Receiving keypress events TSimulationView::HandleActivate of Concurrent Actors Tells the Input system you want to receive keypresses.
Stopping receipt of keypress events TSimulationView::HandleDeactivate of Concurrent Actors Tells the Input system you don't want to receive keypresses.
Preventing component activation TWebLinkView::MouseDown of WebRunner Sample
Processing keypress events TSimulationLevel::KeyDown
TSimulationLevel::KeyUp of Concurrent Actors
Extracts characters for the keypresses and compares them to known codes.
Creating a sub-interactor TSelectionToolInteractor::MouseDown of Taligent Selection Tool
Dispatching events to a sub-interator TSelectionToolInteractor::DispatchEvent of Taligent Selection Tool
International utilities Using calendar and dates TStockServer::AddStockData
TMonthlySummaryPriceGraphConstructor::HandleDoBegin
TMonthlySummaryVolumeGraphConstructor::
HandleDoBegin of Stock Browser
Reading integers from text TStockServer::AddStockData of Stock Browser
Reading floating point numbers from text TStockServer::AddStockData of Stock Browser
Kernel Starting a thread TBoundThreadProgram::Start of Concurrent Actors Starts a Taligent TThreadProgram.
Stopping a thread TBoundThreadProgram::Terminate of Concurrent Actors Stops a Taligent TThreadProgram.
Waiting on a monitor condition TPrimPCQueue::PAdd of Concurrent Actors Waiting on a complicated condition--such as waiting for a queue to be empty--requires more than patience.
Acquiring a lock MFeedbacker::AdoptFeedback of Taligent Selection Tool
Line layout Manipulating text displays TViewerContentView::DrawContents
TViewerContentView::HandleAfterConnectionTo-
ViewRoot
TViewerContentView::CreateSelectionFromPoint
TPickerView::CacheDisplaysAndUpdate of Stock Browser
Memory Using a memory surrogate TStockServer::AddStockData of Stock Browser
Menus/Presentation framework Creating a menu TViewerPresenter::HandleMenuActivate
TViewPresenter::CreateViewSubMenuItem of Stock Browser
Putting a menu in the menu palette TViewerPresenter::HandleMenuActivate of Stock Browser
Removing a menu from the menu palette TViewerPresenter::HandleMenuDeactivate of Stock Browser
Putting a command object in a menu TViewerPresenter::CreateViewSubMenu of Stock Browser
Notification Connecting to a model for notification TViewerContentView::HandleAfterConnectionTo-
ViewRoot of Stock Browser TUniverseThread::TUniverseThread
TUniverseThread::Watch
TAbstractActor::CreateUniverseAffectInterest of Concurrent Actors
For context on the Notification framework,
see Application Frameworks.
Sending a notification TChatHandler::HandleReceivedData of Taligent Chat TAbstractActor::SelfDestruct of Concurrent Actors TPickerSelection::HandleReplaceData
TSetGraphConstructorCommand::HandleDoBegin of Stock Browser
Disconnecting from notification MChatView::HandleBeforeDisconnectionFromView-
Root of Taligent Chat TUniverThread::TUniverseThread of Concurrent Actors TViewerContentView::HandleBeforeDisconnection-
FromViewRoot of Stock Browser
Setting a notification receiver TViewerContentView::HandleAfterConnectionTo-
ViewRoot of Stock Browser
Setting a request-based member function connection's request processor TViewerContentView::HandleAfterConnectionTo-
ViewRoot of Stock Browser
Setting up a request-
based connection
MChatHandler::HandleAfterConnectionToViewRoot of Taligent Chat Sets up a connection for any new incoming message notification.
Uses request-based connection to ensure single threaded concurrency model in views.
Creating an interest MChatHandler::GetNewChatMessageInterest of Taligent Chat TGraphView::GetReadyInterest of Stock Browser
Receiving and handling a notification TChatHandler::HandleNewChatMessage of Taligent Chat TChatHandler::HandleModelChanged of Taligent Chat TUniverseThread::HandleNote of Concurrent Actors Sets up connections defining routines that are called when a notification
is caught.
Numerics Using Numerics functions (power, floor, ceiling, log10) TStockGraphConstructor::AdjustRange of Stock Browser
Generating random numbers TViewerStationery::CreateDefaultStockData
TViewerStationery::GetRandomLong of Stock Browser
Persistent storage Retrieving data from a
disk dictionary
TStockServer::CopyStockData of Stock Browser
Using a disk dictionary iterator TStockServer::CopyAvailableNames of Stock Browser
Creating a disk dictionary TStockServer::AddStockData of Stock Browser
Opening a TDiskDictionary read-only TStockServer::CreateOpenDiskDictionary of Stock Browser
Presentation Framework Creating and executing a command TChatGUIDialogController::HandleAccept of Taligent Chat If join is successful, fire off a command to change the model.
Getting model for writing TChangeChatInfoCommand::HandleDoBegin of Taligent Chat
Handling a current selection change TViewerContentView::HandleCurrentSelection-
Changed of Stock Browser
Push buttons Showing/hiding buttons TChatView::HandleModelChanged
TChatView::LeaveChat of Taligent Chat
The buttons change after a successful join which changes the model and triggers a notification that the model has changed.
Scrolling Scrolling a particular portion of a view to be visible TChatView::AppendOutputText of Taligent Chat Appends the last text so that it is visible.
Creating a scrolling view TViewerContentView::TViewerContentView of Stock Browser
Setting the background color of a scrolling view TViewerContentView::TViewerContentView
TEmptyPickerPresenter::HandleCreateMainView of Stock Browser
Setting the view to scroll in a scrolling view TViewerContentView::AdoptGraphView
TEmptyPickerPresenter::HandleCreateMainView of Stock Browser
Shutdown services Writing a simple shutdown handler TStockServerShutdownHandler::
CompleteShutdown of Stock Browser
Registering a shutdown handler with the Shutdown services TStockDispatcher::LaunchStockServer of Stock Browser
Simple text Attaching text menu to SimpleTextView TChatPresenter::HandleCreateExtendedMenus of Taligent Chat This menu enables users to format input text.
Appending text to a simple text view TChatView::AppendOutputText of Taligent Chat Called when a new message arrives.
Deleting text from simple text view TChatView::AppendOutputText of Taligent Chat Delete the oldest text from the top of the view.
Supporting data exchange Creating an available types list TPickerSelection::CreateAvailableTypesList of Stock Browser
System services Using TMultipleRootLocator TStockServer::CreateOrOpenDiskDictionary of Stock Browser
Text controls Setting text in text control TChatView::HandleModelChanged
TChatView::LeaveChat of Taligent Chat
Update the currently joined text.
Text editing Replacing text TWebModel::AcceptHypertextScrap of WebRunner Sample
Embedding components into embedder text TWebModel::AcceptModelScrap of WebRunner Sample
Creating scrolling text view TWebPresenter::HandleCreateMainView of WebRunner Sample Uses custom text view and standard scrolling view.
View layout Resizing/positioning after user changes document window size TChatView::HandleAllocatedAreaChanged of Taligent Chat Uses SetAllocatedArea and SetAllocatedAreaInParent for each subview.
Changing the size of a view TPickerView::CacheDisplaysAndUpdate of Stock Browser
Handling an allocated area change TViewerContentView::HandleAllocatedAreaChanged of Stock Browser
Views Drawing directly to your view's grafport without waiting for the View system to call DrawContents TViewerContentView::HandleModelOrPresenter-
StateChanged of Stock Browser
Invalidating part of a view MFeedbacker::HandleFeedbackChanged of Taligent Selection Tool
Converting between view and global coordinates TSelectionToolTarget::TSelectionToolTarget of Taligent Selection Tool
Creating a graphic transform TSelectionToolTarget::TSelectionToolTarget of Taligent Selection Tool


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker