Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTextMenu
Inherited By:
None.
Purpose:
Used by the Text Editing Framework to define a set of standard text menus. Text menu objects may be associated with text views, providing an interface to the end user for applying commands on text. This derived class is designed to work with TDocumentTextViews, which interact with text components.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
At present, this class is not intended to be derived. In the future, a mechanism will be provided to customize text menus in documents.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
TDocumentTextMenu (TGUIBundleConnection * theBundleConnectionToAlias)
Interface Category:
API.
Purpose:
Constructs a text menu object for a specified document text view.
Calling Context:
May be called directly by clients
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TDocumentTextMenu ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object. Typically not called directly by clients.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AddTextMenus (TMenu & menu)
Interface Category:
API.
Purpose:
Adds text-related menus to a menu object.
Calling Context:
May be called directly by clients.
Parameters:
- TMenu & menu -Reference to menu object that text menus will be added to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TDocumentTextMenu::CreateComponentMenu
virtual MMenuItem * CreateComponentMenu ()
Interface Category:
API.
Purpose:
Create a menu containing items related to text components.
Calling Context:
Called by Text Editing Framework. May be called directly by clients.
Parameters:
Return Value:
Pointer to MMenuItem created.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TDocumentTextMenu::CreateCommandMenuItem
virtual TMomentaryMenuItem * CreateCommandMenuItem (const TText & itemLabel, TCommandOn < MTextSelection > * command, TTextLabel * adoptCommandLabel =NIL, MMenuItem :: ESeparatorType =MMenuItem :: kNone, bool updateSelection =false)
Interface Category:
API.
Purpose:
Create a menu item associated with a command.
Calling Context:
Typically called by Text Editing Framework. May be called directly by clients.
Parameters:
- const TText & itemLabel -Label for menu item. For example, _New York for a setting a font.
- TCommandOn < MTextSelection > * command -The command associated with menu item.
- TTextLabel * adoptCommandLabel =NIL -The text label for type of command. For example "Font Change"
- MMenuItem :: ESeparatorType =-The separator type for this menu item.
- bool updateSelection =false -Boolean to specify selection state after the command is applied. Some commands my alter the selection, others do not.
Return Value:
Pointer to TMomentaryMenuItem object created.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TDocumentTextMenu::CreateTextColorMenuItem
virtual TMomentaryMenuItem * CreateTextColorMenuItem (const int colorTableIndex, MMenuItem :: ESeparatorType =MMenuItem :: kNone)
Interface Category:
API.
Purpose:
Creates a menu item representing a color that could be applied to text. This differs from the inherited member function because the command and selection reflect the component's GUIBundle.
Calling Context:
Typically called by Text Editing Framework. May be called directly by clients.
Parameters:
- const int colorTableIndex -An index into color table for color value associated with this menu item.
- MMenuItem :: ESeparatorType =The menu separator to be associated with this menu item. Default is none.
Return Value:
Returns pointer to TMomentaryMenuItem created.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TDocumentTextMenu::CreateFillColorMenuItem
virtual TMomentaryMenuItem * CreateFillColorMenuItem (const int colorTableIndex, MMenuItem :: ESeparatorType =MMenuItem :: kNone)
Interface Category:
API.
Purpose:
Creates a menu item representing a color that could be applied to text. This differs from the inherited member function because the command and selection reflect the component's GUIBundle.
Calling Context:
Typically called by Text Editing Framework. May be called directly by clients.
Parameters:
- const int colorTableIndex -An index into color table for color value associated with this menu item.
- MMenuItem :: ESeparatorType =The menu separator to be associated with this menu item. Default is none.
Return Value:
Returns pointer to TMomentaryMenuItem created.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void RemoveTextMenus (TMenu & menu)
Interface Category:
API.
Purpose:
Removes text-related menus to a menu object.
Calling Context:
Called directly by clients.
Parameters:
- TMenu & menu -Reference to menu object that text menus will be removed from.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not 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.