Home You are here: Home > Support > Reference v1.0

Change language: German

XmActionCx Class Reference

Inheritance diagram for XmActionCx:

XmPathInfo XmParamAccess List of all members.

Detailed Description

Context class used in XmObject::OnAction() for handling user actions.

XmActionCx is the context class in XmObject::OnAction(). It provide information among the execution and provide the possibility to handle this user action. Information among the user actions are the path, the dedicated dialog and optional parameters.

More information in section User interface specific features.


Public Member Functions

bool GetCloseDlg ()
 Return true, if dialog will be closed.
RET_DLG GetRetDlg ()
 Return the manner, in which way the dialog will be closed.
XmDialogGetDlg () const
 Return a dialog reference, in which the action is executed.
bool GetActionModified () const
 Return true, if action made a modification.
void SetActionModified (bool modified)
 Signal that action made a modification.
void CloseDlg (RET_DLG ret)
 Close the dialog, in which the user triggered the action.
void RestoreOldVal ()
 Restore the old value of a member data, after user changed it.
ARESULT CallDeeper ()
 Give the sub object the possibility to handle the user action.
void GetCurPath (XmPath &p) const
 Create a full path up to the current path position.
void NotifyNewArrayItem (int index)
 Notify the dialog about a new array item, within the calling array.


Member Function Documentation

void CloseDlg RET_DLG  ret  ) 
 

Close the dialog, in which the user triggered the action.

Parameters:
ret The manner how to close the dialog.

void GetCurPath XmPath p  )  const
 

Create a full path up to the current path position.

Parameters:
p will get the current path.

void NotifyNewArrayItem int  index  ) 
 

Notify the dialog about a new array item, within the calling array.

Should be called from the OnAction() handler of the array to which the new item was added, because of using the current path.
Implementation:

void    XmActionCx::NotifyNewArrayItem (int index)
{
    XmPath p;
    GetAbsPath (p);
    p.PopPathItem();    // remove function id
    p << index;         // add item index
    GetDlg().NotifyNewItem (p);
    SetActionModified (true);
}

Copyright © 2006 Praetz Software Development - www.exomware.com