Peparation for native Smartphone controls based on Spinners.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -206,6 +206,26 @@ wxSize wxControl::DoGetBestSize() const
|
||||
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))
|
||||
{
|
||||
@@ -236,25 +256,6 @@ wxControl::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(varian
|
||||
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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user