The ControlObject operationalizes all inter-window and inter-object communication and control. All objects should speak only to the ControlObject, not to each other directly. The purpose of this is to allow greater modularity of code, so that modules can be swapped in and out in with changes affecting only this object if the APIs change.

ControlObject contains the following public methods:

MethodDescription
Register() The ControlObject can extert control only over those objects it knows about. This method provides a way to let the ControlObject know about other objects. This infrastructure allows for objects to be swapped in and out. For example, if you need a different video window that supports a format not available on the current one, you can hide the current one, show a new one, and register that new one with the ControlObject. Once this is done, the new player will handle all tasks for the program.
CloseAll() This method closes all application windows and cleans up objects when the user quits Transana.
LoadTranscript() When a Transcript is identified to trigger systemic loading of all related information, this method should be called so that all Transana Objects are set appropriately.
LoadClipByNumber() When a Clip is identified to trigger systematic loading of all related information, this method should be called so that all Transana Objects are set appropriately.
ClearAllWindows() Clears all windows and resets all objects
GetNewDatabase() Close the old database and open a new one.
ShowDataTab() Changes the visible tab in the notebook in the Data Window
InsertTimecodeIntoTranscript() Insert a Timecode into the Transcript
InsertSelectionTimecodesIntoTranscript() Insert a timed pause into the Transcript
SetTranscriptEditOptions() Change the Transcript's Edit Mode
TranscriptUndo() Send an Undo command to the Transcript
TranscriptCut() Send a Cut command to the Transcript
TranscriptCopy() Send a Copy command to the Transcript
TranscriptPaste() Send a Paste command to the Transcript
TranscriptCallFontDialog() Tell the TranscriptWindow to open the Font Dialog
Help() Handles all calls to the Help System
LoadVideo() This method handles loading a video in the video window and loading the corresponding Visualization in the Visualization window.
ClearVisualizationSelection() Clear the current selection from the Visualization Window
ChangeVisualization() Triggers a complete refresh of the Visualization Window. Needed for changing Visualization Style.
UpdateKeywordVisualization() If the Keyword Visualization is displayed, update it based on something that could change the keywords in the display area.
Play() This method starts video playback from the current video position.
Stop() This method stops video playback. Stop causes the video to be repositioned at the VideoStartPoint.
Pause() This method pauses video playback. Pause does not alter the video position, so play will continue from where pause was called.
PlayPause() If the video is playing, this pauses it. If the video is paused, this will make it play.
PlayStop() If the video is playing, this pauses it. If the video is paused, this will make it play.
IsPlaying() Indicates whether the video is playing or not.
IsPaused() Indicates whether the video is paused or not.
IsLoading() Indicates whether the video is loading into the Player or not.
GetVideoStartPoint() Return the current Video Starting Point
SetVideoStartPoint() Set the Starting Point for video segment definition. 0 is the start of the video. TimeCode is the nunber of milliseconds from the beginning.
GetVideoEndPoint() Return the current Video Ending Point
SetVideoEndPoint() Set the Stopping Point for video segment definition. 0 is the end of the video. TimeCode is the nunber of milliseconds from the beginning.
GetVideoSelection() Return the current video starting and ending points
SetVideoSelection() Set the Starting and Stopping Points for video segment definition. TimeCodes are in milliseconds from the beginning.
UpdatePlayState() When the Video Player's Play State Changes, we may need to adjust the Screen Layout depending on the Presentation Mode settings.
GetDatabaseDims() Return the dimensions of the Database control. Note that this only returns the Database Tree Tab location.
GetTranscriptDims() Return the dimensions of the transcript control. Note that this only includes the transcript itself and not the whole Transcript window (including toolbars, etc).
GetCurrentTranscriptObject() Returns a Transcript Object for the Transcript currently loaded in the Transcript Editor
GetTranscriptSelectionInfo() Returns information about the current selection in the transcript editor
GetDatabaseTreeTabObjectNodeType() Get the Node Type of the currently selected object in the Database Tree in the Data Window
SetDatabaseTreeTabCursor() Change the shape of the cursor for the database tree in the data window
GetVideoPosition() Returns the current Time Code from the Video Window
UpdateVideoPosition() This method accepts the currentPosition from the video window and propogates that position to other objects
GetMediaLength() This method returns the length of the entire video/media segment
UpdateVideoWindowPosition() This method receives screen position and size information from the Video Window and adjusts all other windows accordingly
UpdateWindowPositions() This method updates all window sizes/positions based on the intersection point passed in. X is the horizontal point at which the visualization and transcript windows end and the video and data windows begin. YUpper is the vertical point where the visualization window ends and the transcript window begins. YLower is the vertical point where the video window ends and the data window begins.
VideoSizeChange() Signal that the Video Size has been changed via the Options > Video menu
SaveTranscript() Save the Transcript to the database if modified. If prompt=1, prompt the user to confirm the save. Return 1 if Transcript was saved or unchanged, and 0 if user chose to discard changes. If cleardoc=1, then the transcript will be cleared if the user chooses to not save.
SaveTranscriptAs() Export the Transcript to an RTF file.
UpdateDataWindow() Update the Data Window, as when the "Update Database Window" command is issued
DataWindowHasSearchNodes() Returns the number of Search Nodes in the DataWindow's Database Tree
RemoveDataWindowKeywordExamples() Remove Keyword Examples from the Data Window
UpdateDataWindowKeywordsTab() Update the Keywords Tab in the Data Window
ChangeLanguages() Update all screen components to reflect change in the selected program language
AdjustIndexes() Adjust Transcript Time Codes by the specified amount