]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinbutt.cpp
add support for alpha in color dialog on OSX, see #14127
[wxWidgets.git] / src / os2 / spinbutt.cpp
index a7b3237f2519668198a25eca7634feff970d63e0..05af314aa86a4ad33277d90543837633637e4b0a 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        spinbutt.cpp
+// Name:        src/os2/spinbutt.cpp
 // Purpose:     wxSpinButton
 // Author:      David Webster
 // Modified by:
@@ -28,8 +28,6 @@ extern void  wxAssociateWinWithHandle( HWND         hWnd
                                       ,wxWindowOS2* pWin
                                      );
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-
 #include "wx/os2/private.h"
 
 // ============================================================================
@@ -40,8 +38,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-
 bool wxSpinButton::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
@@ -63,8 +59,11 @@ bool wxSpinButton::Create(
         m_windowId = NewControlId();
     else
         m_windowId = vId;
-    m_backgroundColour = pParent->GetBackgroundColour();
-    m_foregroundColour = pParent->GetForegroundColour();
+    if (pParent)
+    {
+        m_backgroundColour = pParent->GetBackgroundColour();
+        m_foregroundColour = pParent->GetForegroundColour();
+    }
     SetName(rsName);
     SetParent(pParent);
     m_windowStyle      = lStyle;
@@ -86,12 +85,10 @@ bool wxSpinButton::Create(
     if (nY < 0 )
         nY = 0;
 
-    long                            lSstyle = 0L;
-
-    lSstyle = WS_VISIBLE      |
-              WS_TABSTOP      |
-              SPBS_MASTER     | // We use only single field spin buttons
-              SPBS_NUMERICONLY; // We default to numeric data
+    long lSstyle = WS_VISIBLE      |
+                   WS_TABSTOP      |
+                   SPBS_MASTER     | // We use only single field spin buttons
+                   SPBS_NUMERICONLY; // We default to numeric data
 
     if (m_windowStyle & wxCLIP_SIBLINGS )
         lSstyle |= WS_CLIPSIBLINGS;