X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aab52ea550049163dc767d02dca5012285929f26..2cfcf22d47b7d9cf3c85edfe498c5f23a18a9a19:/src/motif/checkbox.cpp diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 681d9482f0..0fca4f3ebd 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -9,13 +9,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "checkbox.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#ifdef __VMS +#define XtDisplay XTDISPLAY +#endif + #include "wx/defs.h" #include "wx/checkbox.h" @@ -34,8 +34,7 @@ #endif // define symbols that are missing in old versions of Motif. -#if defined(__VMS) || (XmVersion < 2000) -#define XtDisplay XTDISPLAY +#if (XmVersion < 2000) #define XmNtoggleMode 0 #define XmTOGGLE_INDETERMINATE 1 #define XmTOGGLE_BOOLEAN 2 @@ -61,7 +60,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, { if( !wxControl::CreateControl( parent, id, pos, size, style, validator, name ) ) - return FALSE; + return false; wxString label1(wxStripMenuCodes(label)); wxXmString text( label1 ); @@ -70,7 +69,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle", xmToggleButtonWidgetClass, parentWidget, - wxFont::GetFontTag(), m_font.GetFontType(XtDisplay(parentWidget)), + wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)), XmNlabelString, text(), XmNrecomputeSize, False, // XmNindicatorOn, XmINDICATOR_CHECK_BOX, @@ -82,13 +81,13 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback, (XtPointer)this ); - XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE); + XmToggleButtonSetState ((Widget) m_mainWidget, False, True); AttachWidget( parent, m_mainWidget, (WXWidget)NULL, pos.x, pos.y, size.x, size.y ); ChangeBackgroundColour(); - return TRUE; + return true; } void wxCheckBox::SetValue(bool val)