m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
- m_windowFont = parent->GetFont();
+ m_font = parent->GetFont();
Widget parentWidget = (Widget) parent->GetClientWidget();
m_mainWidget = m_buttonWidget;
XtManageChild ((Widget) m_buttonWidget);
-
+
// New code from Roland Haenel (roland_haenel@ac.cybercity.de)
// Some time ago, I reported a problem with wxChoice-items under
// Linux and Motif 2.0 (they caused sporadic GPFs). Now it seems
#if XmVersion >= 1002
#if XmVersion < 2000
Widget optionLabel = XmOptionLabelGadget ((Widget) m_buttonWidget);
- XtUnmanageChild (optionLabel);
+ // JACS, 24/1/99: this seems to cause a malloc crash later on, e.g.
+ // in controls sample.
+ // XtUnmanageChild (optionLabel);
#endif
#endif
-
+
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
ChangeFont(FALSE);
-
+
AttachWidget (parent, m_buttonWidget, m_formWidget, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
DoChangeBackgroundColour((WXWidget) w, m_backgroundColour);
- if (m_windowFont.Ok())
+ if (m_font.Ok())
XtVaSetValues (w,
- XmNfontList, (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) m_formWidget)),
+ XmNfontList, (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_formWidget)),
NULL);
WXWidget *new_widgetList = new WXWidget[m_noStrings + 1];
XmProcessTraversal(XtParent((Widget)m_mainWidget), XmTRAVERSE_CURRENT);
}
-void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
+void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_ANY, NULL);
bool managed = XtIsManaged((Widget) m_formWidget);
XtManageChild ((Widget) m_formWidget);
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
- wxControl::SetSize (x, y, width, height, sizeFlags);
+ wxControl::DoSetSize (x, y, width, height, sizeFlags);
}
wxString wxChoice::GetStringSelection () const
// Note that this causes the widget to be resized back
// to its original size! We therefore have to set the size
// back again. TODO: a better way in Motif?
- if (m_windowFont.Ok())
+ if (m_font.Ok())
{
int width, height, width1, height1;
GetSize(& width, & height);
- XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay((Widget) m_mainWidget));
+ XmFontList fontList = (XmFontList) m_font.GetFontList(1.0, XtDisplay((Widget) m_mainWidget));
XtVaSetValues ((Widget) m_mainWidget, XmNfontList, fontList, NULL);
XtVaSetValues ((Widget) m_buttonWidget, XmNfontList, fontList, NULL);