DoGetBestSize.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19579
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/motif/private.h"
#include "wx/motif/private.h"
+#define WIDTH_OVERHEAD 48
+#define WIDTH_OVERHEAD_SUBTRACT 40
+#define HEIGHT_OVERHEAD 15
+
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
void wxChoiceCallback (Widget w, XtPointer clientData,
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
void wxChoiceCallback (Widget w, XtPointer clientData,
XmNmarginWidth, 0,
XmNpacking, XmPACK_TIGHT,
XmNorientation, XmHORIZONTAL,
XmNmarginWidth, 0,
XmNpacking, XmPACK_TIGHT,
XmNorientation, XmHORIZONTAL,
+ XmNresizeWidth, False,
+ XmNresizeHeight, False,
NULL);
XtVaSetValues ((Widget) m_formWidget, XmNspacing, 0, NULL);
NULL);
XtVaSetValues ((Widget) m_formWidget, XmNspacing, 0, NULL);
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
ChangeFont(FALSE);
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
ChangeFont(FALSE);
+ ChangeBackgroundColour();
AttachWidget (parent, m_buttonWidget, m_formWidget,
pos.x, pos.y, bestSize.x, bestSize.y);
AttachWidget (parent, m_buttonWidget, m_formWidget,
pos.x, pos.y, bestSize.x, bestSize.y);
- ChangeBackgroundColour();
-
- char mnem = wxFindMnemonic ((char*) (const char*) item);
+ char mnem = wxFindMnemonic (item);
if (mnem != 0)
XtVaSetValues (w, XmNmnemonic, mnem, NULL);
if (mnem != 0)
XtVaSetValues (w, XmNmnemonic, mnem, NULL);
if (managed)
XtUnmanageChild ((Widget) m_formWidget);
if (managed)
XtUnmanageChild ((Widget) m_formWidget);
- int actualWidth = width, actualHeight = height;
+ int actualWidth = width - WIDTH_OVERHEAD_SUBTRACT,
+ actualHeight = height - HEIGHT_OVERHEAD;
size_t i;
for (i = 0; i < m_noStrings; i++)
XtVaSetValues ((Widget) m_widgetArray[i],
XmNheight, actualHeight,
NULL);
size_t i;
for (i = 0; i < m_noStrings; i++)
XtVaSetValues ((Widget) m_widgetArray[i],
XmNheight, actualHeight,
NULL);
XtVaSetValues ((Widget) m_buttonWidget, XmNheight, actualHeight,
NULL);
}
XtVaSetValues ((Widget) m_buttonWidget, XmNheight, actualHeight,
NULL);
}
{
wxSize items = GetItemsSize();
// FIXME arbitrary constants
{
wxSize items = GetItemsSize();
// FIXME arbitrary constants
- return wxSize( ( items.x ? items.x + 50 : 120 ),
- items.y + 15 );
+ return wxSize( ( items.x ? items.x + WIDTH_OVERHEAD : 120 ),
+ items.y + HEIGHT_OVERHEAD );