]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/statbox.cpp
Add virtual ~wxAnyScrollHelperBase() to fix compiler warning.
[wxWidgets.git] / src / os2 / statbox.cpp
index ef75d915d0bb40d757e8fb5f5efbceeb5928a766..94d826ec8d4eef1364074832814cabf67e04a5fe 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        statbox.cpp
+// Name:        src/os2/statbox.cpp
 // Purpose:     wxStaticBox
 // Author:      David Webster
 // Modified by:
 // Created:     ??/??/98
-// RCS-ID:      $Id$
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/window.h"
-#include "wx/os2/private.h"
+#include "wx/statbox.h"
 
 #ifndef WX_PRECOMP
-#include "wx/app.h"
-#include "wx/dcclient.h"
+    #include "wx/app.h"
+    #include "wx/dcclient.h"
+    #include "wx/window.h"
 #endif
 
-#include "wx/statbox.h"
-
-IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
+#include "wx/os2/private.h"
 
-bool wxStaticBox::Create(
-  wxWindow*                         pParent
-, wxWindowID                        vId
-, const wxString&                   rsLabel
-, const wxPoint&                    rPos
-, const wxSize&                     rSize
-, long                              lStyle
-, const wxString&                   rsName
-)
+bool wxStaticBox::Create( wxWindow*       pParent,
+                          wxWindowID      vId,
+                          const wxString& rsLabel,
+                          const wxPoint&  rPos,
+                          const wxSize&   rSize,
+                          long            lStyle,
+                          const wxString& rsName )
 {
     if(!CreateControl( pParent
                       ,vId
@@ -43,11 +38,11 @@ bool wxStaticBox::Create(
                       ,rsName
                      ))
     {
-        return FALSE;
+        return false;
     }
 
-    wxPoint                         vPos(0,0);
-    wxSize                          vSize(0,0);
+    wxPoint  vPos(0,0);
+    wxSize   vSize(0,0);
 
     if (!OS2CreateControl( wxT("STATIC")
                           ,SS_GROUPBOX
@@ -56,7 +51,7 @@ bool wxStaticBox::Create(
                           ,rsLabel
                          ))
     {
-        return FALSE;
+        return false;
     }
 
     //
@@ -64,31 +59,25 @@ bool wxStaticBox::Create(
     //
     SetBackgroundColour(GetParent()->GetBackgroundColour());
 
-    wxColour                        vColour;
-
-    vColour.Set(wxString(wxT("BLACK")));
-
-    LONG                            lColor = (LONG)vColour.GetPixel();
-
+    LONG lColor = (LONG)wxBLACK->GetPixel();
     ::WinSetPresParam( m_hWnd
                       ,PP_FOREGROUNDCOLOR
                       ,sizeof(LONG)
                       ,(PVOID)&lColor
                      );
-    lColor = (LONG)m_backgroundColour.GetPixel();
 
+    lColor = (LONG)m_backgroundColour.GetPixel();
     ::WinSetPresParam( m_hWnd
                       ,PP_BACKGROUNDCOLOR
                       ,sizeof(LONG)
                       ,(PVOID)&lColor
                      );
-    SetFont(*wxSMALL_FONT);
     SetSize( rPos.x
             ,rPos.y
             ,rSize.x
             ,rSize.y
            );
-    return TRUE;
+    return true;
 } // end of wxStaticBox::Create
 
 wxSize wxStaticBox::DoGetBestSize() const
@@ -112,13 +101,9 @@ wxSize wxStaticBox::DoGetBestSize() const
                  );
 } // end of wxStaticBox::DoGetBestSize
 
-MRESULT wxStaticBox::OS2WindowProc(
-  WXUINT                            nMsg
-, WXWPARAM                          wParam
-, WXLPARAM                          lParam
-)
+MRESULT wxStaticBox::OS2WindowProc( WXUINT    nMsg,
+                                    WXWPARAM  wParam,
+                                    WXLPARAM  lParam )
 {
     return wxControl::OS2WindowProc(nMsg, wParam, lParam);
 } // end of wxStaticBox::OS2WindowProc
-
-