]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/checkbox.cpp
removed obsolete files and added missing ones
[wxWidgets.git] / src / os2 / checkbox.cpp
index 6e9787ba075d881e7447af37cff30fa96aabe5c0..9f5c9663b8cb7abbf8e75823b9e14e6c1a588e5d 100644 (file)
 // macros
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
-#endif
 
 // ============================================================================
 // implementation
@@ -49,11 +47,15 @@ bool wxCheckBox::OS2Command(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
 bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
            const wxValidator& validator,
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     if (parent) parent->AddChild(this);
 
     SetBackgroundColour(parent->GetBackgroundColour()) ;
@@ -80,6 +82,14 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     // Subclass again for purposes of dialog editing mode
     SubclassWin(m_hWnd);
 
+    LONG                            lColor = (LONG)m_backgroundColour.GetPixel();
+
+    ::WinSetPresParam( m_hWnd
+                      ,PP_BACKGROUNDCOLOR
+                      ,sizeof(LONG)
+                      ,(PVOID)&lColor
+                     );
+
     SetFont(parent->GetFont());
 
     SetSize(x, y, width, height);
@@ -92,7 +102,7 @@ void wxCheckBox::SetLabel(const wxString& label)
     // TODO
 }
 
-wxSize wxCheckBox::DoGetBestSize()
+wxSize wxCheckBox::DoGetBestSize() const
 {
     int wCheckbox, hCheckbox;
 
@@ -176,11 +186,15 @@ void wxCheckBox::Command (wxCommandEvent & event)
 bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
            const wxValidator& validator,
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     if (parent) parent->AddChild(this);
 
     SetBackgroundColour(parent->GetBackgroundColour()) ;
@@ -199,7 +213,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
 
     checkWidth = -1 ;
     checkHeight = -1 ;
-    long msStyle = CHECK_FLAGS;
+//    long msStyle = CHECK_FLAGS;
 
     HWND wx_button = 0; // TODO: Create the bitmap checkbox