#include <mgui/dlgshell.h>
Inheritance diagram for MGUI::DLGSHELL:

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, STYLE_ToolWindow = 0x80 } |
Public Member Functions | |
| void | Close (bool notify=true) |
| ERRVALUE | CreateModeless (MDLGPARENT dlgparent, bool AllowMinimize=false) |
| ERRVALUE | DoModal (MDLGPARENT dlgparent) |
| bool | IsOpen () const |
| ERRVALUE | Open () |
| operator MDLGPARENT () const | |
| void | SetApplyEnabled (bool enabled=true) |
| void | SetDeleteOnClose (bool DeleteOnClose=true) |
| void | SetOkEnabled (bool enabled=true) |
| virtual | ~DLGSHELL ()=0 |
Protected Member Functions | |
| MGUI::CTRL_PUSHBUTTON & | CreateButton (BUTTONS button, const char *label=0) |
| void | CreateButtons (BUTTONS buttons=BUTTONS_Default) |
| DLGSHELL (const MISTRING &title, HELPID HelpID, STYLE style=STYLE_Default) | |
| MGUI::LAYOUT_PANE & | GetButtonPane (bool AddSpace=true) |
| bool | IsModal () const |
| void | NotifyCancel () |
| void | NotifyOK () |
| void | SetIgnoreNonVisible (bool IgnoreNonVisible=true) |
| void | SetReturnValue (int RetValue) |
| void | SetRootMargin (int RootMargin) |
| void | SetRootSpacing (int RootSpacing) |
| void | SetStyle (STYLE style) |
| void | UpdateLayout () |
| virtual void | v_OnCancel () |
| virtual void | v_OnOK () |
Private Member Functions | |
| virtual ERRVALUE | v_CreateContent ()=0 |
| virtual void | v_OnApply () |
| virtual void | v_OnClose () |
| virtual void | v_OnCloseRequest () |
| virtual void | v_OnDestroy () |
| virtual void | v_OnOpen () |
This class is available for both X and MFC with identical public and protected interfaces. The derived dialog implementation class must override the v_CreateContent() method. Most derived classes will also override v_OnApply to perform the desired update of the external data when the user presses 'OK' or 'Apply'. When overriding the protected v_On...() virtual methods pay close attention to when the corresponding base method is to be called to ensure correct behavior.
Definition at line 74 of file dlgshell.h.
|
|
Standard dialog button selections, may be combined for some methods.
Definition at line 91 of file dlgshell.h. |
|
|
Style settings, may be combined.
Reimplemented in RVC::DLG_IMAGE_HISTOGRAM. Definition at line 78 of file dlgshell.h. |
|
|
Destructor.
|
|
||||||||||||||||
|
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.
|
|
|
Determine if dialog was open as modal.
Definition at line 177 of file dlgshell.h. |
|
|
Determine if dialog is currently open.
|
|
|
Send 'Cancel' notification to dialog.
Definition at line 188 of file dlgshell.h. |
|
|
Send 'OK' notification to dialog.
Definition at line 192 of file dlgshell.h. |
|
|
Open dialog if created in modeless state.
|
|
|
Cast to MDLGPARENT for use as parent for other dialogs.
Definition at line 105 of file dlgshell.h. |
|
|
Set whether 'Apply' (if exists) button is enabled.
Definition at line 134 of file dlgshell.h. |
|
|
Set to delete shell instance when closed (for modal dialogs). This allows the dialog to be created via 'new' without retaining the pointer instance. |
|
|
Set to ignore nonvisible items when doing layout. This must be called before CreateModeless() or DoModal() and is usually done in the subclass constructor. Definition at line 198 of file dlgshell.h. |
|
|
Set whether 'OK' button (if exists) is enabled.
Definition at line 146 of file dlgshell.h. |
|
|
Set value to return from dialog.
Definition at line 203 of file dlgshell.h. |
|
|
Set margin for root pane. This must be called before CreateModeless() or DoModal() and is usually done in the subclass constructor. Definition at line 210 of file dlgshell.h. |
|
|
Set spacing for root pane. This must be called before CreateModeless() or DoModal() and is usually done in the subclass constructor. Definition at line 217 of file dlgshell.h. |
|
|
Set dialog style. This must be called before CreateModeless() or DoModal() and not in v_OnInitDialog() for proper behavior. Definition at line 224 of file dlgshell.h. |
|
|
Force update of dialog layout.
Definition at line 229 of file dlgshell.h. |
|
|
Create dialog shell 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 must 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. Implementation should call GetMainForm() or GetMainPane() to determine the form or pane to create the controls in. Note that you cannot override the dialog title in v_CreateContent, title must be set first. Implements MGUI::SHELL. Implemented in GRE::DLG_VIEWZOOM, and MGUI::FRAMESTYLEDLG. |
|
|
Called when user presses 'Apply' button. Will also be called by default v_OnOK implementation if 'Apply' button exists and is not disabled. Reimplemented in GRE::DLG_VIEWZOOM, and MGUI::FRAMESTYLEDLG. |
|
|
Called when 'Cancel' button is pressed. Derived class must call base class v_OnCancel() method AFTER performing its own processing to actually 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 v_OnCancel() method should not be called. This will cause the dialog to remain open and allow the user to retain the settings. Derived classes should generally declare this method as private. |
|
|
Called when dialog gets closed.
|
|
|
Called when user requests that shell be 'closed'. Default implementation simply calls Close(). May be overridden if different behavior desired. Implements MGUI::SHELL. |
|
|
Called when dialog is destroyed.
|
|
|
Called when 'OK' button is pressed. Derived class must call base class v_OnOK() method AFTER performing its own processing to actually 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 v_OnOK() method should not be called. This will cause the dialog to remain open and allow the user to correct the settings. In addition, if an 'Apply' button has been created using the appropriate DLGSHELL methods then v_OnApply will be called before closing. Derived classes should generally declare this method as private. |
|
|
Called after dialog is actually opened.
|
1.3.8-20040913