#include <mgui/dlgbase.h>
Public Types | |
| enum | BUTTONS { BUTTONS_Default = 0x00, BUTTON_OK = 0x01, BUTTON_Cancel = 0x02, BUTTON_Apply = 0x04, BUTTON_Close = 0x08, BUTTON_Help = 0x10 } |
| enum | STYLE { STYLE_Default = 0x00, STYLE_Resizable = 0x01, STYLE_ContextHelp = 0x02, STYLE_AllowMinimize = 0x04, STYLE_AllowMaximize = 0x08, STYLE_CenterOnScreen = 0x10, STYLE_CenterOnMouse = 0x20, STYLE_DeleteOnClose = 0x40 } |
Public Member Functions | |
| void | Close (bool notify=true) |
| ERRVALUE | CreateModeless (MDLGPARENT dlgparent, bool AllowMinimize=false) |
| ERRVALUE | DoModal (MDLGPARENT dlgparent) |
| MDLGPARENT | GetDlgParent () const |
| void | GetWindowPlacement (WINDOWPLACEMENT &placement) const |
| bool | IsCreated () const |
| bool | IsOpen () const |
| virtual void | OnApply () |
| virtual void | OnCancel () |
| virtual void | OnClose () |
| virtual void | OnDestroy () |
| virtual void | OnOK () |
| virtual void | OnOpen () |
| ERRVALUE | Open () |
| operator MDLGPARENT () const | |
| void | SetApplyEnabled (bool enabled=true) |
| void | SetOkEnabled (bool enabled=true) |
| void | SetTitle (TEXTID textid) |
| void | SetTitle (const MIUNICODE *title) |
| bool | SetWindowPlacement (const WINDOWPLACEMENT &placement) |
| virtual | ~DLG_BASE ()=0 |
Protected Member Functions | |
| MGUI::CTRL_PUSHBUTTON & | CreateButton (BUTTONS button, const char *label=0) |
| void | CreateButtons (BUTTONS buttons=BUTTONS_Default) |
| DLG_BASE (STYLE style=STYLE_Default) | |
| MGUI::LAYOUT_PANE & | GetButtonPane () |
| MGUI::COMMAND_ROUTER * | GetCmdRouter () const |
| virtual const char * | GetDialogHelpID () const |
| virtual const char * | GetDialogName () const =0 |
| MGUI::LAYOUT_PANE_MAIN & | GetMainPane () |
| virtual ERRVALUE | OnInitDialog ()=0 |
| void | SetIgnoreNonVisible (bool IgnoreNonVisible=true) |
| void | SetReturnValue (int RetValue) |
| void | SetRootSpacing (int RootSpacing) |
| void | SetStatusBar (MGUI::CTRL_STATUSBAR &StatusBar) |
| void | SetStatusBar (CStatusBar *StatusBar) |
| void | SetStyle (STYLE style) |
| void | UpdateLayout () |
Definition at line 113 of file dlgbase.h.
|
|
Standard dialog button selections, may be combined for some methods.
|
|
|
|
Destructor.
|
|
|
Default constructor, initializes only.
|
|
|
Close the dialog if modeless.
|
|
||||||||||||
|
Create standard button.
|
|
|
Create standard buttons at bottom of dialog. Default button labels will depend on the dialog style. Modal dialog buttons will be 'OK', 'Cancel' and 'Help'. Modeless dialog buttons will be 'OK', 'Cancel', 'Apply' and 'Help'. For modeless dialogs, pressing 'OK' has the same effect as pressing 'Apply' followed by 'Close'.
|
|
||||||||||||
|
Create 'modeless' dialog (without opening it).
|
|
|
Open dialog in modal state and wait for user to dismiss via OK/Cancel.
|
|
|
Get pane to create buttons at bottom of dialog. This allows additional 'non-standard' buttons to be added to the dialog. This will create the pane if it has not been created already. |
|
|
Get "command router" for dialog.
|
|
|
Get dialog HelpID.
|
|
|
Get dialog name for title resource.
|
|
|
Get MDLGPARENT for use as parent for child dialogs.
|
|
|
Get main layout pane.
|
|
|
Get current window placement (MFC only).
|
|
|
Determine if dialog window has been created.
|
|
|
Determine if dialog is currently open.
|
|
|
Called when user presses 'Apply' button. Will also be called when 'OK' button is pressed UNLESS 'Apply' button exists AND is disabled. Derived class must call base class OnApply() method BEFORE performing its own processing. |
|
|
Called when 'Cancel' button is pressed. Derived class must call base class OnCancel() method AFTER performing its own processing to properly close the dialog. In some cases the user may be given an opportunity to verify that they intended to press the Cancel button. If they elect not to cancel then the base class OnCancel() method should not be called. This will cause the dialog to remain open and allow the user to retain the settings. |
|
|
Called when dialog is closed. Derived class must call base class OnClose() method AFTER performing its own processing to properly close the dialog. |
|
|
Called when dialog is destroyed.
|
|
|
Create dialog contents. Derived class MUST implement this. Function must return 0 for success or an error code. This will be called by the dialog creation code and thus should not be called directly. This is normally overridden only by the specific dialog implementation and not by the code that actually uses that dialog implementation. The implementation should call GetMainForm() or GetMainPane() to determine the form widget or pane to create the controls in. |
|
|
Called when 'OK' button is pressed. Derived class must call base class OnOK() method AFTER performing its own processing to properly close the dialog. If the dialog settings do not pass their associated validation test then an appropriate message should be displayed for the user and the base class OnOK() method should not be called. This will cause the dialog to remain open and allow the user to correct the settings. |
|
|
Called when dialog is opened after the dialog is actually "managed" and displayed. Derived class must call base class OnOpen() method BEFORE performing its own processing. |
|
|
Open dialog if created in modeless state.
|
|
|
Cast to MDLGPARENT for use as parent for other dialogs.
|
|
|
Set whether 'Apply' (if exists) button is enabled.
|
|
|
Set to ignore nonvisible items when doing layout. This must be called before CreateModeless() or DoModal() and is usually done in the subclass constructor. |
|
|
Set whether 'OK' button (if exists) is enabled.
|
|
|
Set value to return from dialog.
|
|
|
Set spacing for root pane. This must be called before CreateModeless() or DoModal() and is usually done in the subclass constructor. |
|
|
Set status bar so dialog allows for in layout (MFC only). StatusBar must be created before OnInitDialog() returns. |
|
|
Set status bar so dialog allows for in layout (MFC only). StatusBar must be created before OnInitDialog() returns.
|
|
|
Set dialog style. This must be called before CreateModeless() or DoModal() and not in OnInitDialog() for proper behavior. |
|
|
Set dialog title from TEXTID.
|
|
|
Set dialog title from MIUNICODE string.
|
|
|
Set window placement (MFC only).
|
|
|
Force update of dialog layout.
|
1.3.8-20040913