]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/bmpbuttn.cpp
use symbolic name for the shell menu bar too; include resources.h in wince.rc directl...
[wxWidgets.git] / src / motif / bmpbuttn.cpp
index de320bafb0882dec52cb60b28314241b5b21293c..5e94188ba4b5ce900e57de42b680b846515bce80 100644 (file)
@@ -51,6 +51,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
 {
     if( !CreateControl( parent, id, pos, size, style, validator, name ) )
         return false;
+    PreCreation();
 
     m_bmpNormal = m_bmpNormalOriginal = bitmap;
     m_bmpSelected = m_bmpSelectedOriginal = bitmap;
@@ -81,12 +82,6 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
 
     m_mainWidget = (WXWidget) buttonWidget;
 
-    ChangeFont(false);
-
-    ChangeBackgroundColour ();
-
-    DoSetBitmap();
-
     XtAddCallback (buttonWidget,
                    XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
                    (XtPointer) this);
@@ -95,6 +90,9 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
     if( size.x != -1 ) best.x = size.x;
     if( size.y != -1 ) best.y = size.y;
 
+    PostCreation();
+    DoSetBitmap();
+
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
                   pos.x, pos.y, best.x, best.y);
 
@@ -152,7 +150,7 @@ void wxBitmapButton::DoSetBitmap()
         // in the current widget background colour.
         if (m_bmpNormalOriginal.GetMask())
         {
-            int backgroundPixel;
+            WXPixel backgroundPixel;
             XtVaGetValues((Widget) m_mainWidget,
                           XmNbackground, &backgroundPixel,
                           NULL);
@@ -177,7 +175,7 @@ void wxBitmapButton::DoSetBitmap()
         {
             if (m_bmpDisabledOriginal.GetMask())
             {
-                int backgroundPixel;
+                WXPixel backgroundPixel;
                 XtVaGetValues((Widget) m_mainWidget,
                               XmNbackground, &backgroundPixel,
                               NULL);
@@ -202,7 +200,7 @@ void wxBitmapButton::DoSetBitmap()
         {
             if (m_bmpSelectedOriginal.GetMask())
             {
-                int backgroundPixel;
+                WXPixel backgroundPixel;
                 XtVaGetValues((Widget) m_mainWidget,
                               XmNarmColor, &backgroundPixel,
                               NULL);