X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08e5319b03f80c8554a49c1ef4c9d2adaa8587ce..d896a793a01cf7dc02ed04dcadb51591438eb32f:/src/motif/checkbox.cpp diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 79ae861a60..99587b1713 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "checkbox.h" #endif @@ -41,6 +41,10 @@ void wxCheckBoxCallback (Widget w, XtPointer clientData, IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) +wxCheckBoxBase::wxCheckBoxBase() +{ +} + // Single check box item bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, @@ -56,13 +60,12 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, wxXmString text( label1 ); Widget parentWidget = (Widget) parent->GetClientWidget(); - XmFontList fontList = - (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget)); m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle", xmToggleButtonWidgetClass, parentWidget, - XmNfontList, fontList, + wxFont::GetFontTag(), m_font.GetFontType(XtDisplay(parentWidget)), XmNlabelString, text(), + XmNrecomputeSize, False, NULL); XtAddCallback( (Widget)m_mainWidget, @@ -71,7 +74,6 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE); - SetCanAddEventHandler(TRUE); AttachWidget( parent, m_mainWidget, (WXWidget)NULL, pos.x, pos.y, size.x, size.y ); @@ -123,7 +125,7 @@ void wxCheckBox::ChangeBackgroundColour() XmNforeground, g_itemColors[wxFORE_INDEX].pixel, NULL); - int selectPixel = wxBLACK->AllocColour(wxGetDisplay()); + int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget)); // Better to have the checkbox selection in black, or it's // hard to determine what state it is in.