]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/statbox.cpp
Don't generate wxEVT_COMMAND_DATAVIEW_CACHE_HINT for empty control.
[wxWidgets.git] / src / os2 / statbox.cpp
index 2464ee04b0ca65132b865fdeacce365a13c1b0bc..c1512ea6a8653592182b4404445143440e71915a 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        statbox.cpp
+// Name:        src/os2/statbox.cpp
 // Purpose:     wxStaticBox
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxStaticBox
 // Author:      David Webster
 // Modified by:
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // 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
 
 #ifndef WX_PRECOMP
-#include "wx/app.h"
-#include "wx/dcclient.h"
+    #include "wx/app.h"
+    #include "wx/dcclient.h"
+    #include "wx/window.h"
 #endif
 
 #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
 {
     if(!CreateControl( pParent
                       ,vId
@@ -43,11 +39,11 @@ bool wxStaticBox::Create(
                       ,rsName
                      ))
     {
                       ,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
 
     if (!OS2CreateControl( wxT("STATIC")
                           ,SS_GROUPBOX
@@ -56,7 +52,7 @@ bool wxStaticBox::Create(
                           ,rsLabel
                          ))
     {
                           ,rsLabel
                          ))
     {
-        return FALSE;
+        return false;
     }
 
     //
     }
 
     //
@@ -64,9 +60,7 @@ bool wxStaticBox::Create(
     //
     SetBackgroundColour(GetParent()->GetBackgroundColour());
 
     //
     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)
     ::WinSetPresParam( m_hWnd
                       ,PP_FOREGROUNDCOLOR
                       ,sizeof(LONG)
@@ -84,7 +78,7 @@ bool wxStaticBox::Create(
             ,rSize.x
             ,rSize.y
            );
             ,rSize.x
             ,rSize.y
            );
-    return TRUE;
+    return true;
 } // end of wxStaticBox::Create
 
 wxSize wxStaticBox::DoGetBestSize() const
 } // end of wxStaticBox::Create
 
 wxSize wxStaticBox::DoGetBestSize() const
@@ -108,13 +102,9 @@ wxSize wxStaticBox::DoGetBestSize() const
                  );
 } // end of wxStaticBox::DoGetBestSize
 
                  );
 } // 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
 {
     return wxControl::OS2WindowProc(nMsg, wParam, lParam);
 } // end of wxStaticBox::OS2WindowProc
-
-