return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
}
+// This is a helper for all wxControls made with UPDOWN native control.
+// In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in
+// WinCE of Smartphones this happens also for native wxTextCtrl,
+// wxChoice and others.
+wxSize wxControl::GetBestSpinerSize(const bool is_vertical) const
+{
+ if (is_vertical)
+ {
+ // vertical control
+ return wxSize(GetSystemMetrics(SM_CXVSCROLL),
+ 2*GetSystemMetrics(SM_CYVSCROLL));
+ }
+ else
+ {
+ // horizontal control
+ return wxSize(2*GetSystemMetrics(SM_CXHSCROLL),
+ GetSystemMetrics(SM_CYHSCROLL));
+ }
+}
+
/* static */ wxVisualAttributes
wxControl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{
return attrs;
}
-// This is a helper for all wxControls derived from UPDOWN native control.
-// In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in
-// Smartphones this happens also for native wxTextCtrl, wxChoice and others.
-wxSize wxControl::GetBestSpinerSize(bool is_vertical)
-{
- if (is_vertical)
- {
- // vertical control
- return wxSize(GetSystemMetrics(SM_CXVSCROLL),
- 2*GetSystemMetrics(SM_CYVSCROLL));
- }
- else
- {
- // horizontal control
- return wxSize(2*GetSystemMetrics(SM_CXHSCROLL),
- GetSystemMetrics(SM_CYHSCROLL));
- }
-}
-
// ----------------------------------------------------------------------------
// message handling
// ----------------------------------------------------------------------------