Further WinCE adaptations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -261,6 +261,12 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
long styleLbox)
|
long styleLbox)
|
||||||
{
|
{
|
||||||
|
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
||||||
|
styleDlg &= ~wxBORDER_MASK;
|
||||||
|
styleDlg &= ~wxRESIZE_BORDER;
|
||||||
|
styleDlg &= ~wxCAPTION;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
|
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -277,7 +283,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
if ( n > 0 )
|
if ( n > 0 )
|
||||||
m_listbox->SetSelection(0);
|
m_listbox->SetSelection(0);
|
||||||
|
|
||||||
topsizer->Add( m_listbox, 1, wxEXPAND | wxLEFT|wxRIGHT, wxLARGESMALL(15,0) );
|
topsizer->Add( m_listbox, 1, wxEXPAND|wxLEFT|wxRIGHT, wxLARGESMALL(15,0) );
|
||||||
|
|
||||||
// smart phones does not support or do not waste space for wxButtons
|
// smart phones does not support or do not waste space for wxButtons
|
||||||
#ifdef __SMARTPHONE__
|
#ifdef __SMARTPHONE__
|
||||||
@@ -296,14 +302,15 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
|
|
||||||
#endif // !__SMARTPHONE__
|
#endif // !__SMARTPHONE__
|
||||||
|
|
||||||
SetAutoLayout( true );
|
|
||||||
SetSizer( topsizer );
|
SetSizer( topsizer );
|
||||||
|
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
topsizer->SetSizeHints( this );
|
topsizer->SetSizeHints( this );
|
||||||
topsizer->Fit( this );
|
topsizer->Fit( this );
|
||||||
|
|
||||||
if ( styleDlg & wxCENTRE )
|
if ( styleDlg & wxCENTRE )
|
||||||
Centre(wxBOTH);
|
Centre(wxBOTH);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_listbox->SetFocus();
|
m_listbox->SetFocus();
|
||||||
|
|
||||||
|
@@ -93,7 +93,11 @@ bool wxGenericFindReplaceDialog::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
if ( !wxDialog::Create(parent, wxID_ANY, title,
|
if ( !wxDialog::Create(parent, wxID_ANY, title,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | style) )
|
wxDEFAULT_DIALOG_STYLE
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
|
| wxRESIZE_BORDER
|
||||||
|
#endif
|
||||||
|
| style) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -210,10 +214,12 @@ bool wxGenericFindReplaceDialog::Create(wxWindow *parent,
|
|||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
SetSizer( topsizer );
|
SetSizer( topsizer );
|
||||||
|
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
topsizer->SetSizeHints( this );
|
topsizer->SetSizeHints( this );
|
||||||
topsizer->Fit( this );
|
topsizer->Fit( this );
|
||||||
|
|
||||||
Centre( wxBOTH );
|
Centre( wxBOTH );
|
||||||
|
#endif
|
||||||
|
|
||||||
m_textFind->SetFocus();
|
m_textFind->SetFocus();
|
||||||
|
|
||||||
|
@@ -412,11 +412,13 @@ void wxGenericFontDialog::CreateWidgets()
|
|||||||
|
|
||||||
pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1);
|
pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1);
|
||||||
|
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
GetSizer()->SetItemMinSize(m_previewer, is_pda ? 100 : 430, is_pda ? 40 : 100);
|
GetSizer()->SetItemMinSize(m_previewer, is_pda ? 100 : 430, is_pda ? 40 : 100);
|
||||||
GetSizer()->SetSizeHints(this);
|
GetSizer()->SetSizeHints(this);
|
||||||
GetSizer()->Fit(this);
|
GetSizer()->Fit(this);
|
||||||
|
|
||||||
Centre(wxBOTH);
|
Centre(wxBOTH);
|
||||||
|
#endif
|
||||||
|
|
||||||
delete[] families;
|
delete[] families;
|
||||||
delete[] styles;
|
delete[] styles;
|
||||||
|
@@ -150,10 +150,12 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
|
|||||||
SetSizer( topsizer );
|
SetSizer( topsizer );
|
||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
|
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
topsizer->SetSizeHints( this );
|
topsizer->SetSizeHints( this );
|
||||||
topsizer->Fit( this );
|
topsizer->Fit( this );
|
||||||
|
|
||||||
Centre( wxBOTH );
|
Centre( wxBOTH );
|
||||||
|
#endif
|
||||||
|
|
||||||
m_spinctrl->SetSelection(-1, -1);
|
m_spinctrl->SetSelection(-1, -1);
|
||||||
m_spinctrl->SetFocus();
|
m_spinctrl->SetFocus();
|
||||||
|
@@ -106,7 +106,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
|
|||||||
m_textctrl = new wxTextCtrl(this, wxID_TEXT, value,
|
m_textctrl = new wxTextCtrl(this, wxID_TEXT, value,
|
||||||
wxDefaultPosition, wxSize(300, wxDefaultCoord),
|
wxDefaultPosition, wxSize(300, wxDefaultCoord),
|
||||||
style & ~wxTextEntryDialogStyle);
|
style & ~wxTextEntryDialogStyle);
|
||||||
topsizer->Add( m_textctrl, 1, wxEXPAND | wxLEFT|wxRIGHT, wxLARGESMALL(15,0) );
|
topsizer->Add( m_textctrl, style & wxTE_MULTILINE ? 1 : 0, wxEXPAND | wxLEFT|wxRIGHT, wxLARGESMALL(15,0) );
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
wxTextValidator validator( wxFILTER_NONE, &m_value );
|
wxTextValidator validator( wxFILTER_NONE, &m_value );
|
||||||
@@ -134,11 +134,13 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
|
|||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
SetSizer( topsizer );
|
SetSizer( topsizer );
|
||||||
|
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
topsizer->SetSizeHints( this );
|
topsizer->SetSizeHints( this );
|
||||||
topsizer->Fit( this );
|
topsizer->Fit( this );
|
||||||
|
|
||||||
if ( style & wxCENTRE )
|
if ( style & wxCENTRE )
|
||||||
Centre( wxBOTH );
|
Centre( wxBOTH );
|
||||||
|
#endif
|
||||||
|
|
||||||
m_textctrl->SetSelection(-1, -1);
|
m_textctrl->SetSelection(-1, -1);
|
||||||
m_textctrl->SetFocus();
|
m_textctrl->SetFocus();
|
||||||
|
@@ -219,7 +219,11 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
|||||||
bool showAtStartup)
|
bool showAtStartup)
|
||||||
: wxDialog(parent, wxID_ANY, _("Tip of the Day"),
|
: wxDialog(parent, wxID_ANY, _("Tip of the Day"),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDEFAULT_DIALOG_STYLE
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
|
| wxRESIZE_BORDER
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
m_tipProvider = tipProvider;
|
m_tipProvider = tipProvider;
|
||||||
bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
|
bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
|
||||||
@@ -255,7 +259,8 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
|||||||
wxTE_READONLY |
|
wxTE_READONLY |
|
||||||
wxTE_NO_VSCROLL |
|
wxTE_NO_VSCROLL |
|
||||||
wxTE_RICH | // a hack to get rid of vert scrollbar
|
wxTE_RICH | // a hack to get rid of vert scrollbar
|
||||||
wxSUNKEN_BORDER);
|
wxDEFAULT_CONTROL_BORDER
|
||||||
|
);
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
m_text->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxNORMAL));
|
m_text->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxNORMAL));
|
||||||
#endif
|
#endif
|
||||||
@@ -315,10 +320,12 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
|||||||
|
|
||||||
SetSizer( topsizer );
|
SetSizer( topsizer );
|
||||||
|
|
||||||
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
topsizer->SetSizeHints( this );
|
topsizer->SetSizeHints( this );
|
||||||
topsizer->Fit( this );
|
topsizer->Fit( this );
|
||||||
|
|
||||||
Centre(wxBOTH | wxCENTER_FRAME);
|
Centre(wxBOTH | wxCENTER_FRAME);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user