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

Change language: German

XmDialog Class Reference

List of all members.

Detailed Description

Application specific representation of a dialog as counterpart to XmUIDialog.

This class provide all basic features to control a dialog by the application without the need of knowing anything about the underlying user interface. The user interface will be encapsulated by an instance of an XmUIDialog, which will be contained by this class. Every dialog get a base object, which will be the "root" for the data controlled by this dialog. The basic features are:

  • Open/Close a modal dialog
  • Allow navigation within the connected base object.
  • Allow modifying data or executing object functions.
  • Initiate a refresh of all or a partion of the object data.
  • Initiate the insertion/deletion of object data.
  • Ensure single thread access to the dialog resources by the dialog lock.
    See Dialog synchronization and SetDlgLock()

More information in section Dialog handling.


Public Member Functions

 XmDialog (int prop)
 Construct a dialog using the given properties.
 XmDialog (const char *dlgName, int prop)
 Construct a dialog with specified properties and dialog name.
Retrieve dialog attributes
XmDialogGetMotherDlg () const
 Return the mother dialog.
const XmPathGetBasePath () const
 Return the path of the basobject.
XmObjectGetBase () const
 Return the base object.
XmUIDialogUIDlg () const
 Return the contained user interface dialog.
bool GetDlgModified () const
 Return true if object was modified.
const XmStringGetDlgName () const
 Return the name of the dialog.
int GetDlgLevel () const
 Return the level of nested dialogs.
XmLockGetDlgLock () const
 Return the dialog lock - more info at SetDlgLock().
Modal dialog handling
RET_DLG DoModalObj (XmObject &o)
 Open a model dialog with given base object.
RET_DLG DoModalPath (const XmPath &p)
 Open a model dialog with object referenced by the given path.
void CloseDlg (RET_DLG ret)
 Close the dialog.
Modify general dialog attributes
bool ConnectUIDialog (XmUIDialog &dlg)
 Connect the user interface specified dialog.
bool SetDlgBase (const XmPath &p)
 Change the path to the base object.
bool SetDlgBaseObj (XmObject &o)
 Set a new base object.
void SetDlgModified (bool modified)
 Set flag, if base object was modified.
void SetDlgLock (XmLock &lock)
 Can be used to ensure single thread access to the dialog and its base object from only one thread at a time.
Perform User actions
ACN_RES DoFunction (const XmPath &function, const XmFcnParams *params=NULL)
 Execute the specified function using the optional parameters.
ACN_RES ChangeAtom (const XmPath &atom, const XmData &newVal)
 Change the specified atom to the given value.
Notify changes/update of the dialog base object
void RefreshDlg (const XmPath *basePath=NULL, RefreshDlgMode refreshMode=REFRESH_VALUES)
 Refresh all data below the given path. If path = NULL all data is refreshed.
void NotifyChangedPath (const XmPath &newPath, const XmPath &oldPath)
 Nofify about the changed path of an XmArray item.
void NotifyDeletedItem (const XmPath &p)
 Notify that XmArray item was deleted.
void NotifyNewItem (const XmPath &p)
 Notify the creation of new XmArray item.


Constructor & Destructor Documentation

XmDialog const char *  dlgName,
int  prop
 

Construct a dialog with specified properties and dialog name.

Parameters:
dlgName name should be language independent - english by convention. Localization will be dann un user interface specific code.
prop dialog properties.


Member Function Documentation

void SetDlgLock XmLock lock  ) 
 

Can be used to ensure single thread access to the dialog and its base object from only one thread at a time.

This lock will be gained every time, the dialog execute a user action or if it is notified about an update of its base object by calls to DoFunction(), ChangeAtom() or Notify...().

By default the dialog lock will initialized by an instance of XmNoLock. Use a XmCriticalSection if synchronization becomes necessary. E.g. when writting "progress" dialogs.

ACN_RES DoFunction const XmPath function,
const XmFcnParams params = NULL
 

Execute the specified function using the optional parameters.

The function will be executed, if it exist and enabled in user interface. Enabled/disabled can be set via XmObject::MemberState().

ACN_RES ChangeAtom const XmPath atom,
const XmData newVal
 

Change the specified atom to the given value.

The atom will be changed only, if it exist and enabled in user interface. Enabled/disabled can be set via XmObject::MemberState().


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