]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
suppress triple clicks generation completely for GTK2 as it makes long click series...
[wxWidgets.git] / src / univ / combobox.cpp
index 2ee283fb935a8e65fa38e9f754474fabf7d7d669..83ecde8dc1266749838e93fd2741802828a1f64c 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "univcombobox.h"
 #endif
 
     #pragma implementation "univcombobox.h"
 #endif
 
@@ -123,6 +123,8 @@ public:
 
     // implement wxComboPopup methods
     virtual bool SetSelection(const wxString& value);
 
     // implement wxComboPopup methods
     virtual bool SetSelection(const wxString& value);
+    virtual void SetSelection(int n, bool select)
+        { wxListBox::SetSelection( n, select); };
     virtual wxControl *GetControl() { return this; }
     virtual void OnShow();
     virtual wxCoord GetBestWidth() const;
     virtual wxControl *GetControl() { return this; }
     virtual void OnShow();
     virtual wxCoord GetBestWidth() const;
@@ -655,13 +657,44 @@ void wxComboBox::Init()
     m_lbox = (wxListBox *)NULL;
 }
 
     m_lbox = (wxListBox *)NULL;
 }
 
+wxComboBox::wxComboBox(wxWindow *parent,
+                       wxWindowID id,
+                       const wxString& value,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       const wxArrayString& choices,
+                       long style,
+                       const wxValidator& validator,
+                       const wxString& name)
+{
+    Init();
+
+    Create(parent, id, value, pos, size, choices, style, validator, name);
+}
+
+bool wxComboBox::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& value,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        long style,
+                        const wxValidator& validator,
+                        const wxString& name)
+{
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, value, pos, size, chs.GetCount(),
+                  chs.GetStrings(), style, validator, name);
+}
+
 bool wxComboBox::Create(wxWindow *parent,
                         wxWindowID id,
                         const wxString& value,
                         const wxPoint& pos,
                         const wxSize& size,
                         int n,
 bool wxComboBox::Create(wxWindow *parent,
                         wxWindowID id,
                         const wxString& value,
                         const wxPoint& pos,
                         const wxSize& size,
                         int n,
-                        const wxString *choices,
+                        const wxString choices[],
                         long style,
                         const wxValidator& validator,
                         const wxString& name)
                         long style,
                         const wxValidator& validator,
                         const wxString& name)