]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/choicdlg.h
Add NUM_CUSTOM
[wxWidgets.git] / interface / wx / choicdlg.h
index 118f09048f6901d969adda6ea293daad73c5acfd..8358aa4bd7b10584b0e225d3deee32d4778ed3c2 100644 (file)
@@ -3,9 +3,27 @@
 // Purpose:     interface of wx[Multi|Single]ChoiceDialog
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+/**
+    Default width of the choice dialog.
+*/
+#define wxCHOICE_WIDTH 150
+
+/**
+    Default height of the choice dialog.
+*/
+#define wxCHOICE_HEIGHT 200
+
+/**
+    Default style of the choice dialog.
+
+    @remarks wxRESIZE_BORDER is not used under WinCE.
+*/
+#define wxCHOICEDLG_STYLE (wxDEFAULT_DIALOG_STYLE | wxOK | wxCANCEL | wxCENTRE | wxRESIZE_BORDER)
+
+
 /**
     @class wxMultiChoiceDialog
 
@@ -60,6 +78,10 @@ public:
         strings.
 
         @endWxPythonOnly
+
+        @beginWxPerlOnly
+        Not supported by wxPerl.
+        @endWxPerlOnly
     */
     wxMultiChoiceDialog(wxWindow* parent, const wxString& message,
                         const wxString& caption,
@@ -103,6 +125,10 @@ public:
         strings.
 
         @endWxPythonOnly
+
+        @beginWxPerlOnly
+        Use an array reference for the @a choices parameter.
+        @endWxPerlOnly
     */
     wxMultiChoiceDialog(wxWindow* parent,
                         const wxString& message,
@@ -115,7 +141,7 @@ public:
     /**
         Returns array with indexes of selected items.
     */
-    wxArrayInt GetSelection() const;
+    wxArrayInt GetSelections() const;
 
     /**
         Sets selected items from the array of selected items' indexes.
@@ -162,7 +188,7 @@ public:
             An array of strings, or a string list, containing the choices.
         @param clientData
             An array of client data to be associated with the items. See
-            GetSelectionClientData().
+            GetSelectionData().
         @param style
             A dialog style (bitlist) containing flags chosen from standard
             dialog styles and the ones listed below. The default value is
@@ -189,6 +215,10 @@ public:
         strings.
 
         @endWxPythonOnly
+
+        @beginWxPerlOnly
+        Not supported by wxPerl.
+        @endWxPerlOnly
     */
     wxSingleChoiceDialog(wxWindow* parent, const wxString& message,
                          const wxString& caption,
@@ -210,7 +240,7 @@ public:
             An array of strings, or a string list, containing the choices.
         @param clientData
             An array of client data to be associated with the items. See
-            GetSelectionClientData().
+            GetSelectionData().
         @param style
             A dialog style (bitlist) containing flags chosen from standard
             dialog styles and the ones listed below. The default value is
@@ -237,6 +267,10 @@ public:
         strings.
 
         @endWxPythonOnly
+
+        @beginWxPerlOnly
+        Use an array reference for the @a choices parameter.
+        @endWxPerlOnly
     */
     wxSingleChoiceDialog(wxWindow* parent,
                          const wxString& message,
@@ -254,8 +288,10 @@ public:
 
     /**
         Returns the client data associated with the selection.
+
+        @since 2.9.4
     */
-    char* GetSelectionClientData() const;
+    void* GetSelectionData() const;
 
     /**
         Returns the selected string.
@@ -287,27 +323,46 @@ public:
     selected string. If the user pressed cancel, -1 is returned.
 
     @header{wx/choicdlg.h}
+
+    @beginWxPerlOnly
+    Use an array reference for the @a aChoices parameter.
+    @endWxPerlOnly
 */
 int wxGetSingleChoiceIndex(const wxString& message,
                            const wxString& caption,
                            const wxArrayString& aChoices,
                            wxWindow* parent = NULL,
-                           int x = -1,
-                           int y = -1,
+                           int x = wxDefaultCoord,
+                           int y = wxDefaultCoord,
                            bool centre = true,
-                           int width = 150,
-                           int height = 200);
+                           int width = wxCHOICE_WIDTH,
+                           int height = wxCHOICE_HEIGHT,
+                           int initialSelection = 0);
+
 int wxGetSingleChoiceIndex(const wxString& message,
                            const wxString& caption,
                            int n,
                            const wxString& choices[],
                            wxWindow* parent = NULL,
-                           int x = -1,
-                           int y = -1,
+                           int x = wxDefaultCoord,
+                           int y = wxDefaultCoord,
                            bool centre = true,
-                           int width = 150,
-                           int height = 200);
+                           int width = wxCHOICE_WIDTH,
+                           int height = wxCHOICE_HEIGHT,
+                           int initialSelection = 0);
+
+
+int wxGetSingleChoiceIndex(const wxString& message,
+                           const wxString& caption,
+                           const wxArrayString& choices,
+                           int initialSelection,
+                           wxWindow *parent = NULL);
 
+int wxGetSingleChoiceIndex(const wxString& message,
+                           const wxString& caption,
+                           int n, const wxString *choices,
+                           int initialSelection,
+                           wxWindow *parent = NULL);
 //@}
 
 /** @addtogroup group_funcmacro_dialog */
@@ -328,26 +383,45 @@ int wxGetSingleChoiceIndex(const wxString& message,
     characters) is centred; if @false, the message is left-justified.
 
     @header{wx/choicdlg.h}
+
+    @beginWxPerlOnly
+    Use an array reference for the @a choices parameter.
+    @endWxPerlOnly
 */
 wxString wxGetSingleChoice(const wxString& message,
                            const wxString& caption,
                            const wxArrayString& aChoices,
                            wxWindow* parent = NULL,
-                           int x = -1,
-                           int y = -1,
+                           int x = wxDefaultCoord,
+                           int y = wxDefaultCoord,
                            bool centre = true,
-                           int width = 150,
-                           int height = 200);
+                           int width = wxCHOICE_WIDTH,
+                           int height = wxCHOICE_HEIGHT,
+                           int initialSelection = 0);
 wxString wxGetSingleChoice(const wxString& message,
                            const wxString& caption,
                            int n,
                            const wxString& choices[],
                            wxWindow* parent = NULL,
-                           int x = -1,
-                           int y = -1,
+                           int x = wxDefaultCoord,
+                           int y = wxDefaultCoord,
                            bool centre = true,
-                           int width = 150,
-                           int height = 200);
+                           int width = wxCHOICE_WIDTH,
+                           int height = wxCHOICE_HEIGHT,
+                           int initialSelection = 0);
+
+
+wxString wxGetSingleChoice(const wxString& message,
+                           const wxString& caption,
+                           const wxArrayString& choices,
+                           int initialSelection,
+                           wxWindow *parent = NULL);
+
+wxString wxGetSingleChoice(const wxString& message,
+                           const wxString& caption,
+                           int n, const wxString *choices,
+                           int initialSelection,
+                           wxWindow *parent = NULL);
 
 //@}
 
@@ -361,28 +435,49 @@ wxString wxGetSingleChoice(const wxString& message,
     of elements as @c choices or @c aChoices!
 
     @header{wx/choicdlg.h}
+
+    @beginWxPerlOnly
+    Use an array reference for the @a aChoices and @a client_data parameters.
+    @endWxPerlOnly
 */
 wxString wxGetSingleChoiceData(const wxString& message,
                                const wxString& caption,
                                const wxArrayString& aChoices,
                                const wxString& client_data[],
                                wxWindow* parent = NULL,
-                               int x = -1,
-                               int y = -1,
+                               int x = wxDefaultCoord,
+                               int y = wxDefaultCoord,
                                bool centre = true,
-                               int width = 150,
-                               int height = 200);
+                               int width = wxCHOICE_WIDTH,
+                               int height = wxCHOICE_HEIGHT,
+                               int initialSelection = 0);
+
 wxString wxGetSingleChoiceData(const wxString& message,
                                const wxString& caption,
                                int n,
                                const wxString& choices[],
                                const wxString& client_data[],
                                wxWindow* parent = NULL,
-                               int x = -1,
-                               int y = -1,
+                               int x = wxDefaultCoord,
+                               int y = wxDefaultCoord,
                                bool centre = true,
-                               int width = 150,
-                               int height = 200);
+                               int width = wxCHOICE_WIDTH,
+                               int height = wxCHOICE_HEIGHT,
+                               int initialSelection = 0);
+
+void* wxGetSingleChoiceData(const wxString& message,
+                            const wxString& caption,
+                            const wxArrayString& choices,
+                            void **client_data,
+                            int initialSelection,
+                            wxWindow *parent = NULL);
+
+void* wxGetSingleChoiceData(const wxString& message,
+                            const wxString& caption,
+                            int n, const wxString *choices,
+                            void **client_data,
+                            int initialSelection,
+                            wxWindow *parent = NULL);
 
 //@}
 
@@ -405,28 +500,35 @@ wxString wxGetSingleChoiceData(const wxString& message,
     characters) is centred; if @false, the message is left-justified.
 
     @header{wx/choicdlg.h}
+
+    @beginWxPerlOnly
+    Use an array reference for the @a choices parameter.
+    In wxPerl there is no @a selections parameter; the function
+    returns an array containing the user selections.
+    @endWxPerlOnly
 */
 int wxGetSelectedChoices(wxArrayInt& selections,
                             const wxString& message,
                             const wxString& caption,
                             const wxArrayString& aChoices,
                             wxWindow* parent = NULL,
-                            int x = -1,
-                            int y = -1,
+                            int x = wxDefaultCoord,
+                            int y = wxDefaultCoord,
                             bool centre = true,
-                            int width = 150,
-                            int height = 200);
+                            int width = wxCHOICE_WIDTH,
+                            int height = wxCHOICE_HEIGHT);
+
 int wxGetSelectedChoices(wxArrayInt& selections,
                             const wxString& message,
                             const wxString& caption,
                             int n,
                             const wxString& choices[],
                             wxWindow* parent = NULL,
-                            int x = -1,
-                            int y = -1,
+                            int x = wxDefaultCoord,
+                            int y = wxDefaultCoord,
                             bool centre = true,
-                            int width = 150,
-                            int height = 200);
+                            int width = wxCHOICE_WIDTH,
+                            int height = wxCHOICE_HEIGHT);
 
 //@}