]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/bmpbuttn.cpp
Corrected image saving to HTML
[wxWidgets.git] / src / motif / bmpbuttn.cpp
index de320bafb0882dec52cb60b28314241b5b21293c..9ebada34b8f8952a758d7395574928f8698fb08c 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __VMS
-#define XtScreen XTSCREEN
-#endif
-
 #include "wx/bmpbuttn.h"
 
 #ifdef __VMS__
@@ -51,6 +47,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 +78,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 +86,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 +146,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 +171,7 @@ void wxBitmapButton::DoSetBitmap()
         {
             if (m_bmpDisabledOriginal.GetMask())
             {
-                int backgroundPixel;
+                WXPixel backgroundPixel;
                 XtVaGetValues((Widget) m_mainWidget,
                               XmNbackground, &backgroundPixel,
                               NULL);
@@ -202,7 +196,7 @@ void wxBitmapButton::DoSetBitmap()
         {
             if (m_bmpSelectedOriginal.GetMask())
             {
-                int backgroundPixel;
+                WXPixel backgroundPixel;
                 XtVaGetValues((Widget) m_mainWidget,
                               XmNarmColor, &backgroundPixel,
                               NULL);