Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TBooleanActionState
Inherited By:
None.
Purpose:
TBooleanMenuActionControlState sends a Boolean menu action when a Boolean menu item is selected.
Instantiation:
Always allocate on the heap.
Deriving Classes:
Derive from this class if you want to add information to the Boolean action or do some other behavior in addition to posting the action. When plugged into a Boolean menu item, it is called like any other MBooleanControlState.When SetBooleanState is called, it sends a Boolean control action that contains the semantic message passed in at construction.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TBooleanMenuActionControlState (TViewHandle targetView, MMenuItem * itemToAlias, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
- TBooleanMenuActionControlState (TMenu * targetToAlias, MMenuItem * itemToAlias, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
- TBooleanMenuActionControlState (const TBooleanMenuActionControlState & copy)
- TBooleanMenuActionControlState ()
Interface Category:
API.
Purpose:
- Constructs a usable instance associated with a TView.
- Construct a usable instance associated with a TMenu.
- Copy constructor.
- Default constructor.
Calling Context:
- Called to construct an instance for a TView which can then be adopted into a TBooleanMenuItem.
- Called to construct an instance for a TMenu which can then be adopted into a TBooleanMenuItem.
- Called to copy an object.
- Called by the stream-in operators and when the requisite information is not available.
Parameters:
- TViewHandle targetView -The control that is associated with this instance and which will be the initial target for action distribution.
- MMenuItem * itemToAlias -The item to include in the action.
- const TSemanticActionType & message =TStandardActions :: kDefaultMessage -The message to include in the action.
- TMenu * targetToAlias -The item to include in the action.
- MMenuItem * itemToAlias -The item to include in the action.
- const TSemanticActionType & message =TStandardActions :: kDefaultMessage -The message to include in the action.
- const TBooleanMenuActionControlState & copy -The object to be copied.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TBooleanMenuActionControlState & operator =(const TBooleanMenuActionControlState & assign)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TBooleanMenuActionControlState ()
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:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
Return Value:
Returns a reference to the stream to which the object streams itself.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
Return Value:
Returns a reference to the stream from which the object streams itself.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
MMenuItem * GetMenuItem ()
Interface Category:
API.
Purpose:
Gets the menu item associated with this state.
Calling Context:
Called to obtain the menu item for this state.
Parameters:
Return Value:
An alias to the item that will be included in generated actions.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetMenuItem (MMenuItem * itemAlias)
Interface Category:
API.
Purpose:
Specifies the menu item alias to be used in generated actions.
Calling Context:
Called to set or change the menu item referenced by generated actions.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetBooleanState (EBooleanState state)
Interface Category:
API.
Purpose:
Creates a TBooleanMenuAction object and queues it for propagation. The initial view for the propagation is the menu associated with the item that owns the control state. If the action is not handled by the menu, it is passed up the view hierarchy for the menu. If the top if the hierarchy is reached and the action still has not been handled, it is passed up the menu hierarchy, if one exists, otherwise it is forwarded to the presenter that owns the menu.
The action generated is TStandardControlActions::kValueChanged.
Calling Context:
Called by the menu item that references or owns the TBooleanMenuActionControlState when the menu item is selected. You could override this to do some more work, then called inherited SetBooleanState to let it post the action.
Parameters:
- EBooleanState state -The state for the menu item, one of kTrue, kFalse, or kUnknown.
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.