Class: TGUIBundle

Declaration: GUICompoundDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

The TGUIBundle family of classes collect together all the information needed by a presentation hierarchy. The TGUIBundle is usually treated as a magic cookie -that is, it is passed around to different objects without being operated on directly. Clients usually access the GUIBundle though the mixin MGUIBundle. The TGUIBundle is little more than a glorified struct.

Instantiation:

Allocate on the heap or the stack. Usually allocated on the heap.

Deriving Classes:

Generally not derived from, but no special rules.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TGUIBundle::TGUIBundle

  1. TGUIBundle (const TPlaceReference & thePlaceRef, const TDocumentReference & theDocRef, const TDocumentPresenterReference & theDocPresenterRef, const TPresenterReference & thePresenterRef, TWindowGroup * theWindowGroupToAlias, TPresenterSessionStore * theStoreToAlias, TGUIMessageLog * theLogToAlias, TGUIWindowArranger * theWindowArrangerToAlias, const TModelReference & theModelRef, const TPresenterStateReference & thePSRef, TDocumentComponentSelection * theAdoptedSelection, TMenu * theMenuToAlias)
  2. TGUIBundle (const TGUIBundle &)
  3. TGUIBundle ()

Interface Category:

API.

Purpose:

  1. Creates a GUIBundle and sets the instance variables.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called by the Presentation framework to create a TGUIBundle.
  2. Called to copy an object.
  3. Called to create an empty GUIBundle.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::~TGUIBundle

virtual ~ TGUIBundle ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::IsInActivePresenter

bool IsInActivePresenter () const

Interface Category:

API.

Purpose:

Allows clients to determine if they are in the active presenter.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the bundle is in the active presenter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::SetActive

void SetActive (bool isActive)

Interface Category:

API.

Purpose:

Sets the active state.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::IsInRootPresenter

bool IsInRootPresenter () const

Interface Category:

API.

Purpose:

Lets a client know if the bundle is associated with a root presenter. Some presentations act different when they are the root. For example, scroll bars are typically used for root presentations, but not for embedded presentations.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the bundle is associated with a root presenter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::SetIsInRootPresenter

void SetIsInRootPresenter (bool isInRootPresenter)

Interface Category:

API.

Purpose:

Sets the in root presenter property.

Calling Context:

Called by the Presentation framework when creating bundle.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetPlaceReference

TPlaceReference GetPlaceReference () const

Interface Category:

API.

Purpose:

Returns the place reference associated with a presenter.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the place reference associated with a presenter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetDocumentReference

TDocumentReference GetDocumentReference () const

Interface Category:

API.

Purpose:

Returns the document reference associated with a presenter.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the document reference associated with a presenter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetDocumentPresenterReference

TDocumentPresenterReference GetDocumentPresenterReference () const

Interface Category:

API.

Purpose:

Returns the document presenter reference associated with a presenter.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the document presenter reference associated with a presenter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetPresenterReference

TPresenterReference GetPresenterReference () const

Interface Category:

API.

Purpose:

Returns the presenter reference of the presenter associated with the bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the presenter reference of the presenter associated with the bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::SetPresenterReference

void SetPresenterReference (const TPresenterReference &)

Interface Category:

API.

Purpose:

Sets the presenter reference of the bundle.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetWindowGroup

  1. TWindowGroup * GetWindowGroup ()
  2. const TWindowGroup * GetWindowGroup () const

Interface Category:

API.

Purpose:

  1. Gets a non-const pointer to the window group associated with the bundle.
  2. Gets a const pointer to the window group associated with the bundle.

Calling Context:

  1. Any client with a non-const pointer to a TGUIBundle.
  2. Any client with a const pointer to a TGUIBundle.

Parameters:

Return Value:

Returns a pointer to the window group associated with the bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Both const and non-const versions are provided. This means that if you have a const pointer or reference to a GUIBundle, then you will get a const pointer to the window group. This preserves the const semantics.

Member Function: TGUIBundle::GetPresenterSessionStore

  1. TPresenterSessionStore * GetPresenterSessionStore ()
  2. const TPresenterSessionStore * GetPresenterSessionStore () const

Interface Category:

API.

Purpose:

  1. Gets a non-const pointer to the presenter session store associated with the bundle.
  2. Gets a const pointer to the presenter session store associated with the bundle.

Calling Context:

  1. Any client with a non-const pointer to a TGUIBundle.
  2. Any client with a const pointer to a TGUIBundle.

Parameters:

Return Value:

Returns a pointer to the presenter session store associated with the GUIBundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Both const and non-const versions are provided. This means that if you have a const pointer or reference to a GUIBundle, then you will get a const pointer to the presenter session store. This preserves the const semantics.

Member Function: TGUIBundle::GetGUIMessageLog

  1. TGUIMessageLog * GetGUIMessageLog ()
  2. const TGUIMessageLog * GetGUIMessageLog () const

Interface Category:

API.

Purpose:

  1. Gets a non-const pointer to the message log associated with the bundle.
  2. Gets a const pointer to the message log associated with the bundle.

Calling Context:

  1. Any client with a non-const pointer to a TGUIBundle.
  2. Any client with a const pointer to a TGUIBundle.

Parameters:

Return Value:

Returns a pointer to the message log associated with the GUIBundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Both const and non-const versions are provided. This means that if you have a const pointer or reference to a GUIBundle, then you will get a const pointer to the message log. This preserves the const semantics.

Member Function: TGUIBundle::GetGUIWindowArranger

  1. TGUIWindowArranger * GetGUIWindowArranger ()
  2. const TGUIWindowArranger * GetGUIWindowArranger () const

Interface Category:

API.

Purpose:

  1. Gets a non-const pointer to the window arranger associated with the bundle.
  2. Gets a const pointer to the window arranger associated with the bundle.

Calling Context:

  1. Any client with a non-const pointer to a TGUIBundle.
  2. Any client with a const pointer to a TGUIBundle.

Parameters:

Return Value:

Returns a pointer to the window arranger associated with the bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Both const and non-const versions are provided. This means that if you have a const pointer or reference to a GUIBundle, then you will get a const pointer to the window arranger. This preserves the const semantics.

Member Function: TGUIBundle::AdoptUndoRedoLabels

TPseudoTimeStamp AdoptUndoRedoLabels (TLabel * theUndoLabelToAdopt, TLabel * theRedoLabelToAdopt)

Interface Category:

API.

Purpose:

Adopts the arguments as the new undo and redo labels for the whole task. Generates notification.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

Returns the pseudo time stamp of the undo/redo label state.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetUndoLabel

  1. TLabel * GetUndoLabel ()
  2. const TLabel * GetUndoLabel () const

Interface Category:

API.

Purpose:

  1. Get a non-const pointer to the current undo label.
  2. Get a const pointer to the current undo label.

Calling Context:

  1. Called by the Presentation framework.
  2. Called by the Presentation framework.

Parameters:

Return Value:

Returns the label of the next command to be undone.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetRedoLabel

  1. TLabel * GetRedoLabel ()
  2. const TLabel * GetRedoLabel () const

Interface Category:

API.

Purpose:

  1. Gets a non-const pointer to the current redo label.
  2. Gets a const pointer to the current redo label.

Calling Context:

  1. Called by the Presentation framework.
  2. Called by the Presentation framework.

Parameters:

Return Value:

Returns the label of the next command to be redone.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetLabelTimeStamp

TPseudoTimeStamp GetLabelTimeStamp () const

Interface Category:

API.

Purpose:

Returns the time stamp of the undo/redo labels. If the time-stamp hasn't changed, then neither have the undo/redo labels. This is the same value returned from AdoptUndoRedoLabels.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

Returns the time stamp of the current undo/redo labels.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetLabelChangeInterest

TGUIBundleInterest GetLabelChangeInterest () const

Interface Category:

API.

Purpose:

Returns the interest associated with the undo/redo labels. Notification will be sent to this interest whenever the undo/redo labels change.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

Returns the label change interest.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetModelReference

TModelReference GetModelReference () const

Interface Category:

API.

Purpose:

Returns a reference to the model associated with this bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the model associated with this bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::SetModelReference

void SetModelReference (const TModelReference &)

Interface Category:

API.

Purpose:

Sets the model associated with this bundle.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Usually called only once in a bundle's lifetime, during its initialization.

Member Function: TGUIBundle::GetPresenterStateReference

TPresenterStateReference GetPresenterStateReference () const

Interface Category:

API.

Purpose:

Returns a reference to the presenter state associated with a bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the presenter state associated with a bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::SetPresenterStateReference

void SetPresenterStateReference (const TPresenterStateReference &)

Interface Category:

API.

Purpose:

Sets the presenter state associated with the bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Usually called only once in a bundle's lifetime, during its initialization.

Member Function: TGUIBundle::GetCurrentSelection

  1. const TDocumentComponentSelection * GetCurrentSelection () const
  2. TDocumentComponentSelection * GetCurrentSelection ()

Interface Category:

API.

Purpose:

  1. Returns a const pointer to the filtered current selection. If the real current selection applies to a different component, then NIL is returned.
  2. Returns a pointer to the filtered current selection. If the real current selection applies to a different component, then NIL is returned.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

Returns the filtered current selection. (i.e. either the return value applies to this class' document component or it is NIL.)

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetCurrentSelectionTimeStamp

TPseudoTimeStamp GetCurrentSelectionTimeStamp () const

Interface Category:

API.

Purpose:

Allows clients to efficiently detect when the current selection has changed. If the time stamp is the same then the current selection hasn't changed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the time stamp of the current selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetCurrentSelectionChangeInterest

TGUIBundleInterest GetCurrentSelectionChangeInterest () const

Interface Category:

API.

Purpose:

Returns an interest that can be used to connect for notification of changes to the current selection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns an interest that can be used to connect for notification of changes to the current selection.

Calling Context:

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::AdoptCurrentSelection

TPseudoTimeStamp AdoptCurrentSelection (TDocumentComponentSelection * adoptedSelection)

Interface Category:

API.

Purpose:

Used to change the current selection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the time stamp of the new selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::NotifyOfCurrentSelectionChange

void NotifyOfCurrentSelectionChange () const

Interface Category:

API.

Purpose:

Generates notification that the current selection has changed.

Calling Context:

Called by the Presentation framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::AdoptAndDoEnd

void AdoptAndDoEnd (TAbstractDocumentComponentCommandBinding *)

Interface Category:

API.

Purpose:

Adopts the specified command binding and ends execution of the command.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::DoIncrement

void DoIncrement (TAbstractDocumentComponentCommandBinding &)

Interface Category:

API.

Purpose:

Takes an incremental command and continues execution. The command binding must be the same binding used in a previous DoBegin.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::DoBegin

void DoBegin (TAbstractDocumentComponentCommandBinding &)

Interface Category:

API.

Purpose:

Takes an incremental command and begins execution on the model associated with this bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::AdoptAndDo

void AdoptAndDo (TAbstractDocumentComponentCommandBinding *)

Interface Category:

API.

Purpose:

Adopts a document component command binding and executes it on the model associated with this bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::AdoptCurrentPresenterStateSelection

TPseudoTimeStamp AdoptCurrentPresenterStateSelection (TPresenterStateSelection * thePresenterStateSelection)

Interface Category:

API.

Purpose:

Changes the current selection. This is a convenience function which wraps the presenter state selection up in a TDocumentComponentSelection with an appropriate TModelSelection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the time stamp of the new current selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::AdoptCurrentModelSelection

TPseudoTimeStamp AdoptCurrentModelSelection (TModelSelection * theModelSelection)

Interface Category:

API.

Purpose:

Changes the current selection. This is a convenience function which wraps the model selection up in a TDocumentComponentSelection with an appropriate TPresenterStateSelection.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the time stamp of the new current selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetCurrentPresenterStateSelection

const TPresenterStateSelection * GetCurrentPresenterStateSelection () const

Interface Category:

API.

Purpose:

Returns the presenter state selection part of the filtered current selection. If the real current selection applies to a different component, then NIL is returned.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the filtered current presenter state selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetCurrentModelSelection

const TModelSelection * GetCurrentModelSelection () const

Interface Category:

API.

Purpose:

Returns the model selection part of the filtered current selection. If the real current selection applies to a different component, then NIL is returned.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the filtered current model selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetRawCurrentSelection

  1. const TDocumentComponentSelection * GetRawCurrentSelection () const
  2. TDocumentComponentSelection * GetRawCurrentSelection ()

Interface Category:

API.

Purpose:

  1. Returns a const pointer to the current selection.
  2. Returns a non-const pointer to the current selection.

Calling Context:

  1. Called by clients interested in the unfiltered current selection.
  2. Called by clients interested in the unfiltered current selection.

Parameters:

Return Value:

Returns a pointer to the current selection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

The current selection may or may not apply to the document component that's associated with a particular MGUIBundle mixin. Clients usually call GetCurrentSelection, GetCurrentPresenterStateSelection, or GetCurrentModelSelection instead.

Member Function: TGUIBundle::GetMenu

TMenu * GetMenu () const

Interface Category:

API.

Purpose:

Returns the menu associated with this bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the menu associated with this bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::GetLocale

TLocale GetLocale () const

Interface Category:

API.

Purpose:

Returns the locale associated with this bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the locale associated with this bundle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGUIBundle::AdoptCurrentSelectionMaster

TPseudoTimeStamp AdoptCurrentSelectionMaster (TDocumentComponentSelection * adoptedSelection)

Interface Category:

API.

Purpose:

Adopt a current selection as a new selection master. TGUIBundle maintains a shared reference counted master selection. When a new TGUIBUndle is created from another, it adds a reference to the source bundles selection and shares it. This member functions allows a new, independent master selection to be set for this gui bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the time stamp of the current new selection master.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None

Member Function: TGUIBundle::GetSelectionChangedForPresenterInterest

TPresenterInterest GetSelectionChangedForPresenterInterest () const

Interface Category:

API.

Purpose:

Get an interest in selection changes for the presenter that owns this GUIBundle. Only notifications caused by selections set on this bundle's presenter will be received.

Calling Context:

Call this function directly.

Parameters:

Return Value:

TPresenterInterest -The interest used to connect.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.