]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/choicdgg.h
1. wxFileDialog patch for multiple selection applied (with some small changes),
[wxWidgets.git] / include / wx / generic / choicdgg.h
index 945b699ed1f04f37c474a724a276fa5957b1b40b..7dbf48525ab792c55b44f52111438324bfbf7ab4 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __CHOICEDLGH_G__
     #pragma interface "choicdgg.h"
 #endif
 
-#include "wx/setup.h"
 #include "wx/dialog.h"
 
+class WXDLLEXPORT wxListBox;
+
 #define wxCHOICE_HEIGHT 150
 #define wxCHOICE_WIDTH 200
 
-#define wxCHOICEDLG_STYLE (wxOK | wxCANCEL | wxCENTRE)
+#define wxCHOICEDLG_STYLE (wxDEFAULT_DIALOG_STYLE|wxOK | wxCANCEL | wxCENTRE)
 
 class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog
 {
@@ -63,13 +64,10 @@ public:
                 long style = wxCHOICEDLG_STYLE,
                 const wxPoint& pos = wxDefaultPosition);
 
-    void SetSelection(int sel) ;
+    void SetSelection(int sel);
     int GetSelection() const { return m_selection; }
     wxString GetStringSelection() const { return m_stringSelection; }
 
-    // get client data associated with selection
-    void *GetClientData() const { return m_clientData; }
-
     // obsolete function (NB: no need to make it return wxChar, it's untyped)
     char *GetSelectionClientData() const { return (char *)m_clientData; }
 
@@ -78,10 +76,9 @@ public:
     void OnListBoxDClick(wxCommandEvent& event);
 
 protected:
-    long        m_dialogStyle;
     int         m_selection;
+    int         m_dialogStyle;
     wxString    m_stringSelection;
-    void       *m_clientData;
     wxListBox  *m_listbox;
 
 private:
@@ -111,15 +108,14 @@ WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString&
                            int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
 
 // Return client data instead
-// FIXME: this is horrible, using "char *" instead of "void *" belongs to the 70s!
-WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
-                            int n, const wxString *choices, char **client_data,
+WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
+                            int n, const wxString *choices, void **client_data,
                             wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
                             bool centre = TRUE,
                             int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
 
-WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
-                            int n, wxChar *choices[], char **client_data,
+WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
+                            int n, wxChar *choices[], void **client_data,
                             wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
                             bool centre = TRUE,
                             int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);