]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/ownerdrw.cpp
Rename delegates to try and stop name clashes, probably with wxWebKitCtrl.
[wxWidgets.git] / src / palmos / ownerdrw.cpp
index 83dc9bc3665ca251023e2c97167e7f21705d40ce..e3e02226c28384d2e6928dc27abc1ccaceae1062 100644 (file)
@@ -1,39 +1,35 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        palmos/ownerdrw.cpp
+// Name:        src/palmos/ownerdrw.cpp
 // Purpose:     implementation of wxOwnerDrawn class
-// Author:      William Osborne
+// Author:      William Osborne - minimal working wxPalmOS port
 // Modified by:
 // Created:     10/13/04
-// RCS-ID:      $Id
+// RCS-ID:      $Id$
 // Copyright:   (c) William Osborne
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #ifndef WX_PRECOMP
-  #include "wx/window.h"
-  #include "wx/font.h"
-  #include "wx/bitmap.h"
-  #include "wx/dcmemory.h"
-  #include "wx/menu.h"
-  #include "wx/utils.h"
+    #include "wx/window.h"
+    #include "wx/font.h"
+    #include "wx/bitmap.h"
+    #include "wx/dcmemory.h"
+    #include "wx/menu.h"
+    #include "wx/utils.h"
+    #include "wx/settings.h"
+    #include "wx/menuitem.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/settings.h"
 #include "wx/ownerdrw.h"
-#include "wx/menuitem.h"
 #include "wx/fontutil.h"
-#include "wx/module.h"
 
 #if wxUSE_OWNER_DRAWN
 
@@ -44,28 +40,12 @@ public:
     virtual bool OnInit()
     {
         ms_systemMenuFont = new wxFont;
-
-#if defined(__WXMSW__) && defined(__WIN32__) && defined(SM_CXMENUCHECK)
-        NONCLIENTMETRICS nm;
-        nm.cbSize = sizeof(NONCLIENTMETRICS);
-        SystemParametersInfo(SPI_GETNONCLIENTMETRICS,0,&nm,0);
-
-        ms_systemMenuButtonWidth = nm.iMenuHeight;
-        ms_systemMenuHeight = nm.iMenuHeight;
-
-        // create menu font
-        wxNativeFontInfo info;
-        memcpy(&info.lf, &nm.lfMenuFont, sizeof(LOGFONT));
-        ms_systemMenuFont->Create(info);
-#endif
-
         return true;
     }
 
     virtual void OnExit()
     {
-        delete ms_systemMenuFont;
-        ms_systemMenuFont = NULL;
+        wxDELETE(ms_systemMenuFont);
     }
 
     static wxFont* ms_systemMenuFont;
@@ -127,4 +107,3 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
 
 
 #endif // wxUSE_OWNER_DRAWN
-