]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/listbox.h
Add new methods to transform coordinates expressed in Cocoa's bounds rect to
[wxWidgets.git] / include / wx / msw / listbox.h
index 657c2c344a98efac1d9a7ce7645e5ed3361b12b9..e8c921e6a43f980551eb99e66a7a82af5b84f24d 100644 (file)
@@ -32,7 +32,7 @@
 #endif // wxUSE_OWNER_DRAWN
 
 // forward decl for GetSelections()
-class wxArrayInt;
+class WXDLLIMPEXP_BASE wxArrayInt;
 
 // ----------------------------------------------------------------------------
 // List box control
@@ -49,7 +49,20 @@ public:
             int n = 0, const wxString choices[] = NULL,
             long style = 0,
             const wxValidator& validator = wxDefaultValidator,
-            const wxString& name = wxListBoxNameStr);
+            const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, id, pos, size, n, choices, style, validator, name);
+    }
+    wxListBox(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos,
+            const wxSize& size,
+            const wxArrayString& choices,
+            long style = 0,
+            const wxValidator& validator = wxDefaultValidator,
+            const wxString& name = wxListBoxNameStr)
+    {
+        Create(parent, id, pos, size, choices, style, validator, name);
+    }
 
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
@@ -58,6 +71,13 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
+    bool Create(wxWindow *parent, wxWindowID id,
+                const wxPoint& pos,
+                const wxSize& size,
+                const wxArrayString& choices,
+                long style = 0,
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxListBoxNameStr);
 
     virtual ~wxListBox();
 
@@ -71,7 +91,7 @@ public:
     virtual int FindString(const wxString& s) const;
 
     virtual bool IsSelected(int n) const;
-    virtual void SetSelection(int n, bool select = TRUE);
+    virtual void SetSelection(int n, bool select = true);
     virtual int GetSelection() const;
     virtual int GetSelections(wxArrayInt& aSelections) const;
 
@@ -109,9 +129,25 @@ public:
     // Windows callbacks
     bool MSWCommand(WXUINT param, WXWORD id);
 
-    virtual void SetupColours();
+    virtual wxVisualAttributes GetDefaultAttributes() const
+    {
+        return GetClassDefaultAttributes(GetWindowVariant());
+    }
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
+    {
+        return GetCompositeControlsDefaultAttributes(variant);
+    }
 
 protected:
+    WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
+    virtual WXHBRUSH MSWControlColor(WXHDC pDC)
+    {
+        return MSWControlColorSolid(pDC);
+    }
+
     // free memory (common part of Clear() and dtor)
     void Free();