// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "bmpbuttn.h"
-#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#ifdef __VMS
#define XtScreen XTSCREEN
m_bmpNormal = m_bmpNormalOriginal = bitmap;
m_bmpSelected = m_bmpSelectedOriginal = bitmap;
- /*
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
- */
-
Widget parentWidget = (Widget) parent->GetClientWidget();
/*
m_mainWidget = (WXWidget) buttonWidget;
- ChangeFont(FALSE);
+ ChangeFont(false);
ChangeBackgroundColour ();
XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
(XtPointer) this);
- SetCanAddEventHandler(TRUE);
-
wxSize best = m_bmpNormal.Ok() ? GetBestSize() : wxSize(30, 30);
if( size.x != -1 ) best.x = size.x;
if( size.y != -1 ) best.y = size.y;
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
pos.x, pos.y, best.x, best.y);
- return TRUE;
+ return true;
}
wxBitmapButton::~wxBitmapButton()
else
armPixmap = (Pixmap) m_bitmapCache.GetArmPixmap(m_mainWidget);
-#if 0
- // <- the Get...Pixmap()-functions return the same pixmap!
- if (insensPixmap == pixmap)
- {
- insensPixmap =
- XCreateInsensitivePixmap(DisplayOfScreen(XtScreen((Widget) m_mainWidget)), pixmap);
- m_insensPixmap = (WXPixmap) insensPixmap;
- }
-#endif
-
XtVaSetValues ((Widget) m_mainWidget,
XmNlabelPixmap, pixmap,
XmNlabelInsensitivePixmap, insensPixmap,
void wxBitmapButton::ChangeBackgroundColour()
{
- DoChangeBackgroundColour(m_mainWidget, m_backgroundColour, TRUE);
+ wxDoChangeBackgroundColour(m_mainWidget, m_backgroundColour, true);
// Must reset the bitmaps since the colours have changed.
DoSetBitmap();