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:
Julian Smart
2005-04-02 17:44:12 +00:00
parent 5497e635e0
commit aa66250ba4
6 changed files with 32 additions and 6 deletions

View File

@@ -261,6 +261,12 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
const wxPoint& pos,
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) )
return false;
@@ -277,7 +283,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
if ( n > 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
#ifdef __SMARTPHONE__
@@ -296,14 +302,15 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
#endif // !__SMARTPHONE__
SetAutoLayout( true );
SetSizer( topsizer );
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
topsizer->SetSizeHints( this );
topsizer->Fit( this );
if ( styleDlg & wxCENTRE )
Centre(wxBOTH);
#endif
m_listbox->SetFocus();

View File

@@ -93,7 +93,11 @@ bool wxGenericFindReplaceDialog::Create(wxWindow *parent,
{
if ( !wxDialog::Create(parent, wxID_ANY, title,
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | style) )
wxDEFAULT_DIALOG_STYLE
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
| wxRESIZE_BORDER
#endif
| style) )
{
return false;
}
@@ -210,10 +214,12 @@ bool wxGenericFindReplaceDialog::Create(wxWindow *parent,
SetAutoLayout( true );
SetSizer( topsizer );
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
topsizer->SetSizeHints( this );
topsizer->Fit( this );
Centre( wxBOTH );
#endif
m_textFind->SetFocus();

View File

@@ -412,11 +412,13 @@ void wxGenericFontDialog::CreateWidgets()
pointSizeChoice->SetSelection(dialogFont.GetPointSize()-1);
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
GetSizer()->SetItemMinSize(m_previewer, is_pda ? 100 : 430, is_pda ? 40 : 100);
GetSizer()->SetSizeHints(this);
GetSizer()->Fit(this);
Centre(wxBOTH);
#endif
delete[] families;
delete[] styles;

View File

@@ -150,10 +150,12 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
SetSizer( topsizer );
SetAutoLayout( true );
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
topsizer->SetSizeHints( this );
topsizer->Fit( this );
Centre( wxBOTH );
#endif
m_spinctrl->SetSelection(-1, -1);
m_spinctrl->SetFocus();

View File

@@ -106,7 +106,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
m_textctrl = new wxTextCtrl(this, wxID_TEXT, value,
wxDefaultPosition, wxSize(300, wxDefaultCoord),
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
wxTextValidator validator( wxFILTER_NONE, &m_value );
@@ -134,11 +134,13 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
SetAutoLayout( true );
SetSizer( topsizer );
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
topsizer->SetSizeHints( this );
topsizer->Fit( this );
if ( style & wxCENTRE )
Centre( wxBOTH );
#endif
m_textctrl->SetSelection(-1, -1);
m_textctrl->SetFocus();

View File

@@ -219,7 +219,11 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
bool showAtStartup)
: wxDialog(parent, wxID_ANY, _("Tip of the Day"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
wxDEFAULT_DIALOG_STYLE
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
| wxRESIZE_BORDER
#endif
)
{
m_tipProvider = tipProvider;
bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
@@ -255,7 +259,8 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
wxTE_READONLY |
wxTE_NO_VSCROLL |
wxTE_RICH | // a hack to get rid of vert scrollbar
wxSUNKEN_BORDER);
wxDEFAULT_CONTROL_BORDER
);
#if defined(__WXMSW__)
m_text->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxNORMAL));
#endif
@@ -315,10 +320,12 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
SetSizer( topsizer );
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
topsizer->SetSizeHints( this );
topsizer->Fit( this );
Centre(wxBOTH | wxCENTER_FRAME);
#endif
}
// ----------------------------------------------------------------------------