]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/dialog.h
Add wxPopupWindow
[wxWidgets.git] / interface / dialog.h
index c84301bc3a984e58bfe48f9e5b463e5f29faa8c0..6c34363b9fa2697d0181df0492cf31f55af93ad6 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        dialog.h
-// Purpose:     documentation for wxDialog class
+// Purpose:     interface of wxDialog
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
     overview_autoscrollingdialogs "Automatic scrolling dialogs" for further details.
 
     @beginStyleTable
-    @style{wxCAPTION}:
+    @style{wxCAPTION}
            Puts a caption on the dialog box.
-    @style{wxDEFAULT_DIALOG_STYLE}:
+    @style{wxDEFAULT_DIALOG_STYLE}
            Equivalent to a combination of wxCAPTION, wxCLOSE_BOX and
            wxSYSTEM_MENU (the last one is not used under Unix)
-    @style{wxRESIZE_BORDER}:
+    @style{wxRESIZE_BORDER}
            Display a resizeable frame around the window.
-    @style{wxSYSTEM_MENU}:
+    @style{wxSYSTEM_MENU}
            Display a system menu.
-    @style{wxCLOSE_BOX}:
+    @style{wxCLOSE_BOX}
            Displays a close box on the frame.
-    @style{wxMAXIMIZE_BOX}:
+    @style{wxMAXIMIZE_BOX}
            Displays a maximize box on the dialog.
-    @style{wxMINIMIZE_BOX}:
+    @style{wxMINIMIZE_BOX}
            Displays a minimize box on the dialog.
-    @style{wxTHICK_FRAME}:
+    @style{wxTHICK_FRAME}
            Display a thick frame around the window.
-    @style{wxSTAY_ON_TOP}:
+    @style{wxSTAY_ON_TOP}
            The dialog stays on top of all other windows.
-    @style{wxNO_3D}:
+    @style{wxNO_3D}
            Under Windows, specifies that the child controls should not have 3D
            borders unless specified in the control.
-    @style{wxDIALOG_NO_PARENT}:
+    @style{wxDIALOG_NO_PARENT}
            By default, a dialog created with a @NULL parent window will be
            given the application's top level window as parent. Use this style
            to prevent this from happening and create an orphan dialog. This is
            not recommended for modal dialogs.
-    @style{wxDIALOG_EX_CONTEXTHELP}:
+    @style{wxDIALOG_EX_CONTEXTHELP}
            Under Windows, puts a query button on the caption. When pressed,
            Windows will go into a context-sensitive help mode and wxWidgets
            will send a wxEVT_HELP event if the user clicked on an application
            window. Note that this is an extended style and must be set by
            calling SetExtraStyle before Create is called (two-step
            construction).
-    @style{wxDIALOG_EX_METAL}:
+    @style{wxDIALOG_EX_METAL}
            On Mac OS X, frames with this style will be shown with a metallic
            look. This is an extra style.
     @endStyleTable
@@ -60,8 +60,7 @@
     @library{wxcore}
     @category{cmndlg}
 
-    @seealso
-    @ref overview_wxdialogoverview, wxFrame, @ref overview_validatoroverview
+    @see @ref overview_wxdialogoverview, wxFrame, @ref overview_validatoroverview
     "Validator overview"
 */
 class wxDialog : public wxTopLevelWindow
@@ -70,7 +69,7 @@ public:
     //@{
     /**
         Constructor.
-        
+
         @param parent
             Can be @NULL, a frame or another dialog box.
         @param id
@@ -90,7 +89,7 @@ public:
             Used to associate a name with the window,
             allowing the application user to set Motif resource values for
             individual dialog boxes.
-        
+
         @see Create()
     */
     wxDialog();
@@ -126,7 +125,7 @@ public:
 
     /**
         Centres the dialog box on the display.
-        
+
         @param direction
             May be wxHORIZONTAL, wxVERTICAL or wxBOTH.
     */
@@ -201,10 +200,10 @@ public:
     /**
         Ends a modal dialog, passing a value to be returned from the ShowModal()
         invocation.
-        
+
         @param retCode
             The value that should be returned by ShowModal.
-        
+
         @see ShowModal(), GetReturnCode(), SetReturnCode()
     */
     void EndModal(int retCode);
@@ -212,10 +211,10 @@ public:
     /**
         Gets the identifier of the button which works like standard OK button in this
         dialog.
-        
+
         @see SetAffirmativeId()
     */
-    int GetAffirmativeId();
+    int GetAffirmativeId() const;
 
     /**
         Override this to return a window containing the main content of the dialog.
@@ -225,15 +224,15 @@ public:
         and allows the @ref overview_wxdialogoverview "layout adaptation code" to know
         that only the pages need to be made scrollable.
     */
-    wxWindow* GetContentWindow();
+    wxWindow* GetContentWindow() const;
 
     /**
         Gets the identifier of the button to map presses of @c ESC
         button to.
-        
+
         @see SetEscapeId()
     */
-    int GetEscapeId();
+    int GetEscapeId() const;
 
     /**
         Returns @true if the dialog has been adapted, usually by making it scrollable
@@ -241,7 +240,7 @@ public:
         See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
         more on layout adaptation.
     */
-    bool GetLayoutAdaptationDone();
+    bool GetLayoutAdaptationDone() const;
 
     /**
         Gets a value representing the aggressiveness of search for buttons and sizers
@@ -258,7 +257,7 @@ public:
         See also SetLayoutAdaptationMode() and @ref overview_autoscrollingdialogs
         "Automatic scrolling dialogs".
     */
-    wxDialogLayoutAdaptationMode GetLayoutAdaptationMode();
+    wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const;
 
     /**
         A static function getting the current layout adapter object.
@@ -277,10 +276,10 @@ public:
 
     /**
         Gets the return code for this window.
-        
+
         @remarks A return code is normally associated with a modal dialog, where
                  ShowModal() returns a code to the application.
-        
+
         @see SetReturnCode(), ShowModal(), EndModal()
     */
     int GetReturnCode();
@@ -292,14 +291,14 @@ public:
         arbitrary controls are not currently supported.
         This function is not available on any other platform.
     */
-    wxToolBar* GetToolBar();
+    wxToolBar* GetToolBar() const;
 
     /**
         Iconizes or restores the dialog. Windows only.
-        
+
         @param iconize
             If @true, iconizes the dialog box; if @false, shows and restores it.
-        
+
         @remarks Note that in Windows, iconization has no effect since dialog
                  boxes cannot be iconized. However, applications may
                  need to explicitly restore dialog boxes under Motif
@@ -311,11 +310,11 @@ public:
 
     /**
         Returns @true if the dialog box is iconized. Windows only.
-        
+
         @remarks Always returns @false under Windows since dialogs cannot be
                  iconized.
     */
-    bool IsIconized();
+    bool IsIconized() const;
 
     /**
         A static function returning @true if layout adaptation is enabled for all
@@ -331,19 +330,19 @@ public:
         See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
         more on layout adaptation.
     */
-    bool IsMainButton(wxWindowID& id);
+    bool IsMainButton(wxWindowID& id) const;
 
     /**
         Returns @true if the dialog box is modal, @false otherwise.
     */
-    bool IsModal();
+    bool IsModal() const;
 
     /**
         The default handler for wxEVT_SYS_COLOUR_CHANGED.
-        
+
         @param event
             The colour change event.
-        
+
         @remarks Changes the dialog's colour to conform to the current settings
                  (Windows only). Add an event table entry for your
                  dialog class if you wish the behaviour to be different
@@ -351,7 +350,7 @@ public:
                  you do override this function, call wxEvent::Skip to
                  propagate the notification to child windows and
                  controls.
-        
+
         @see wxSysColourChangedEvent
     */
     void OnSysColourChanged(wxSysColourChangedEvent& event);
@@ -366,7 +365,7 @@ public:
         the special OK button in the PocketPC title bar, an event with this id is
         generated.
         By default, the affirmative id is wxID_OK.
-        
+
         @see GetAffirmativeId(), SetEscapeId()
     */
     void SetAffirmativeId(int id);
@@ -388,7 +387,7 @@ public:
 
     /**
         Sets the icon for this dialog.
-        
+
         @param icon
             The icon to associate with this dialog.
     */
@@ -396,7 +395,7 @@ public:
 
     /**
         Sets the icons for this dialog.
-        
+
         @param icons
             The icons to associate with this dialog.
     */
@@ -423,7 +422,7 @@ public:
     /**
         Sets the adaptation mode, overriding the global adaptation flag. @a mode may be
         one of the following values:
-        
+
         See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
         more on layout adaptation.
     */
@@ -439,12 +438,12 @@ public:
     static wxDialogLayoutAdapter* SetLayoutAdapter(wxDialogLayoutAdapter* adapter);
 
     /**
-        @b NB: This function is deprecated and doesn't work for all ports, just use
+        @note This function is deprecated and doesn't work for all ports, just use
         ShowModal() to show a modal dialog instead.
         Allows the programmer to specify whether the dialog box is modal (Show() blocks
         control
         until the dialog is hidden) or modeless (control returns immediately).
-        
+
         @param flag
             If @true, the dialog will be modal, otherwise it will be modeless.
     */
@@ -452,26 +451,26 @@ public:
 
     /**
         Sets the return code for this window.
-        
+
         @param retCode
             The integer return code, usually a control identifier.
-        
+
         @remarks A return code is normally associated with a modal dialog, where
                  ShowModal() returns a code to the application.
                  The function EndModal() calls SetReturnCode.
-        
+
         @see GetReturnCode(), ShowModal(), EndModal()
     */
     void SetReturnCode(int retCode);
 
     /**
         Hides or shows the dialog.
-        
+
         @param show
             If @true, the dialog box is shown and brought to the front;
             otherwise the box is hidden. If @false and the dialog is
             modal, control is returned to the calling program.
-        
+
         @remarks The preferred way of dismissing a modal dialog is to use
                  EndModal().
     */
@@ -481,13 +480,14 @@ public:
         Shows a modal dialog. Program flow does not return until the dialog has been
         dismissed with
         EndModal().
-        
+
         @returns The return value is the value set with SetReturnCode().
     */
     int ShowModal();
 };
 
 
+
 /**
     @class wxDialogLayoutAdapter
     @wxheader{dialog.h}
@@ -506,8 +506,7 @@ public:
     @library{wxcore}
     @category{FIXME}
 
-    @seealso
-    @ref overview_autoscrollingdialogs "Automatic scrolling dialogs"
+    @see @ref overview_autoscrollingdialogs "Automatic scrolling dialogs"
 */
 class wxDialogLayoutAdapter
 {
@@ -529,3 +528,4 @@ public:
     */
     bool DoLayoutAdaptation(wxDialog* dialog);
 };
+