-
-wxString wxStaticBox::GetLabel() const
-{
- if (!m_labelWidget)
- return wxEmptyString;
-
- XmString text = 0;
- char *s;
- XtVaGetValues ((Widget) m_labelWidget,
- XmNlabelString, &text,
- NULL);
-
- if (!text)
- return wxEmptyString;
-
- if (XmStringGetLtoR (text, XmSTRING_DEFAULT_CHARSET, &s))
- {
- wxString str(s);
- XtFree (s);
- return str;
- }
- else
- {
- return wxEmptyString;
- }
-}
-
-void wxStaticBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
-{
- wxControl::DoSetSize (x, y, width, height, sizeFlags);
-
- if (m_labelWidget)
- {
- Dimension xx, yy;
- XtVaGetValues ((Widget) m_labelWidget, XmNwidth, &xx, XmNheight, &yy, NULL);
-
- if (width > -1)
- XtVaSetValues ((Widget) m_mainWidget, XmNwidth, width,
- NULL);
- if (height > -1)
- XtVaSetValues ((Widget) m_mainWidget, XmNheight, height - yy,
- NULL);
- }
-}
-
-void wxStaticBox::ChangeFont(bool keepOriginalSize)
-{
- wxWindow::ChangeFont(keepOriginalSize);
-}
-
-void wxStaticBox::ChangeBackgroundColour()
-{
- wxWindow::ChangeBackgroundColour();
- if (m_labelWidget)
- DoChangeBackgroundColour(m_labelWidget, m_backgroundColour);
-}
-
-void wxStaticBox::ChangeForegroundColour()
-{
- wxWindow::ChangeForegroundColour();
- if (m_labelWidget)
- DoChangeForegroundColour(m_labelWidget, m_foregroundColour);
-}
-