From: Julian Smart <julian@anthemion.co.uk>
Date: Sat, 2 Apr 2005 17:44:12 +0000 (+0000)
Subject: Further WinCE adaptations
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/aa66250ba4e21292258fc3664c2875a89e2220d5

Further WinCE adaptations


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp
index 2b5b11b2a2..81ad3ae1f0 100644
--- a/src/generic/choicdgg.cpp
+++ b/src/generic/choicdgg.cpp
@@ -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();
 
diff --git a/src/generic/fdrepdlg.cpp b/src/generic/fdrepdlg.cpp
index 1d14141be1..716aaf5aef 100644
--- a/src/generic/fdrepdlg.cpp
+++ b/src/generic/fdrepdlg.cpp
@@ -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();
 
diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp
index abf7bd4504..979f05d80a 100644
--- a/src/generic/fontdlgg.cpp
+++ b/src/generic/fontdlgg.cpp
@@ -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;
diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp
index ed2103030d..e148a5d121 100644
--- a/src/generic/numdlgg.cpp
+++ b/src/generic/numdlgg.cpp
@@ -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();
diff --git a/src/generic/textdlgg.cpp b/src/generic/textdlgg.cpp
index 32dbecd26e..8e65b6cdcd 100644
--- a/src/generic/textdlgg.cpp
+++ b/src/generic/textdlgg.cpp
@@ -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();
diff --git a/src/generic/tipdlg.cpp b/src/generic/tipdlg.cpp
index bef711e279..272db7296d 100644
--- a/src/generic/tipdlg.cpp
+++ b/src/generic/tipdlg.cpp
@@ -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
 }
 
 // ----------------------------------------------------------------------------