Fixes for Smartphone builds. Sample does not work yet but at least creates exacutable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-06-24 06:59:48 +00:00
parent b6352c09e9
commit 960a83ccad
3 changed files with 29 additions and 0 deletions

View File

@@ -183,6 +183,7 @@ public:
MyPanel *GetPanel() const { return m_panel; } MyPanel *GetPanel() const { return m_panel; }
private: private:
#if wxUSE_STATUSBAR
void UpdateStatusBar(const wxPoint& pos, const wxSize& size) void UpdateStatusBar(const wxPoint& pos, const wxSize& size)
{ {
if ( m_frameStatusBar ) if ( m_frameStatusBar )
@@ -198,6 +199,7 @@ private:
SetStatusText(msg, 1); SetStatusText(msg, 1);
} }
} }
#endif // wxUSE_STATUSBAR
MyPanel *m_panel; MyPanel *m_panel;
@@ -1560,7 +1562,9 @@ MyFrame::MyFrame(const wxChar *title, int x, int y)
SetMenuBar(menu_bar); SetMenuBar(menu_bar);
#if wxUSE_STATUSBAR
CreateStatusBar(2); CreateStatusBar(2);
#endif // wxUSE_STATUSBAR
m_panel = new MyPanel( this, 10, 10, 300, 100 ); m_panel = new MyPanel( this, 10, 10, 300, 100 );
@@ -1629,14 +1633,18 @@ void MyFrame::OnEnableAll(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnMove( wxMoveEvent& event ) void MyFrame::OnMove( wxMoveEvent& event )
{ {
#if wxUSE_STATUSBAR
UpdateStatusBar(event.GetPosition(), GetSize()); UpdateStatusBar(event.GetPosition(), GetSize());
#endif // wxUSE_STATUSBAR
event.Skip(); event.Skip();
} }
void MyFrame::OnSize( wxSizeEvent& event ) void MyFrame::OnSize( wxSizeEvent& event )
{ {
#if wxUSE_STATUSBAR
UpdateStatusBar(GetPosition(), event.GetSize()); UpdateStatusBar(GetPosition(), event.GetSize());
#endif // wxUSE_STATUSBAR
event.Skip(); event.Skip();
} }
@@ -1663,7 +1671,9 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
#endif #endif
); );
#if wxUSE_STATUSBAR
SetStatusText(msg); SetStatusText(msg);
#endif // wxUSE_STATUSBAR
} }
} }

View File

@@ -119,7 +119,9 @@ public:
void OnShow(wxCommandEvent &event); void OnShow(wxCommandEvent &event);
void OnOption(wxCommandEvent &event); void OnOption(wxCommandEvent &event);
#if wxUSE_COLOURDLG
wxColour SelectColour(); wxColour SelectColour();
#endif // wxUSE_COLOURDLG
void PrepareDC(wxDC& dc); void PrepareDC(wxDC& dc);
int m_backgroundMode; int m_backgroundMode;
@@ -228,9 +230,11 @@ enum
LogicalOrigin_Set, LogicalOrigin_Set,
LogicalOrigin_Restore, LogicalOrigin_Restore,
#if wxUSE_COLOURDLG
Colour_TextForeground, Colour_TextForeground,
Colour_TextBackground, Colour_TextBackground,
Colour_Background, Colour_Background,
#endif // wxUSE_COLOURDLG
Colour_BackgroundMode, Colour_BackgroundMode,
Colour_TextureBackgound, Colour_TextureBackgound,
@@ -1009,6 +1013,7 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event))
void MyCanvas::OnMouseMove(wxMouseEvent &event) void MyCanvas::OnMouseMove(wxMouseEvent &event)
{ {
#if wxUSE_STATUSBAR
wxClientDC dc(this); wxClientDC dc(this);
PrepareDC(dc); PrepareDC(dc);
m_owner->PrepareDC(dc); m_owner->PrepareDC(dc);
@@ -1019,6 +1024,9 @@ void MyCanvas::OnMouseMove(wxMouseEvent &event)
wxString str; wxString str;
str.Printf( wxT("Current mouse position: %d,%d"), (int)x, (int)y ); str.Printf( wxT("Current mouse position: %d,%d"), (int)x, (int)y );
m_owner->SetStatusText( str ); m_owner->SetStatusText( str );
#else
wxUnusedVar(event);
#endif // wxUSE_STATUSBAR
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1092,9 +1100,11 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
menuLogical->Append( LogicalOrigin_Restore, _T("&Restore to normal\tShift-Ctrl-0") ); menuLogical->Append( LogicalOrigin_Restore, _T("&Restore to normal\tShift-Ctrl-0") );
wxMenu *menuColour = new wxMenu; wxMenu *menuColour = new wxMenu;
#if wxUSE_COLOURDLG
menuColour->Append( Colour_TextForeground, _T("Text &foreground...") ); menuColour->Append( Colour_TextForeground, _T("Text &foreground...") );
menuColour->Append( Colour_TextBackground, _T("Text &background...") ); menuColour->Append( Colour_TextBackground, _T("Text &background...") );
menuColour->Append( Colour_Background, _T("Background &colour...") ); menuColour->Append( Colour_Background, _T("Background &colour...") );
#endif // wxUSE_COLOURDLG
menuColour->AppendCheckItem( Colour_BackgroundMode, _T("&Opaque/transparent\tCtrl-B") ); menuColour->AppendCheckItem( Colour_BackgroundMode, _T("&Opaque/transparent\tCtrl-B") );
menuColour->AppendCheckItem( Colour_TextureBackgound, _T("Draw textured back&ground\tCtrl-T") ); menuColour->AppendCheckItem( Colour_TextureBackgound, _T("Draw textured back&ground\tCtrl-T") );
@@ -1110,8 +1120,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
// ... and attach this menu bar to the frame // ... and attach this menu bar to the frame
SetMenuBar(menuBar); SetMenuBar(menuBar);
#if wxUSE_STATUSBAR
CreateStatusBar(2); CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWidgets!")); SetStatusText(_T("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
m_mapMode = wxMM_TEXT; m_mapMode = wxMM_TEXT;
m_xUserScale = 1.0; m_xUserScale = 1.0;
@@ -1224,6 +1236,7 @@ void MyFrame::OnOption(wxCommandEvent& event)
m_xAxisReversed = !m_xAxisReversed; m_xAxisReversed = !m_xAxisReversed;
break; break;
#if wxUSE_COLOURDLG
case Colour_TextForeground: case Colour_TextForeground:
m_colourForeground = SelectColour(); m_colourForeground = SelectColour();
break; break;
@@ -1239,6 +1252,8 @@ void MyFrame::OnOption(wxCommandEvent& event)
} }
} }
break; break;
#endif // wxUSE_COLOURDLG
case Colour_BackgroundMode: case Colour_BackgroundMode:
m_backgroundMode = m_backgroundMode == wxSOLID ? wxTRANSPARENT m_backgroundMode = m_backgroundMode == wxSOLID ? wxTRANSPARENT
: wxSOLID; : wxSOLID;
@@ -1264,6 +1279,7 @@ void MyFrame::PrepareDC(wxDC& dc)
dc.SetMapMode( m_mapMode ); dc.SetMapMode( m_mapMode );
} }
#if wxUSE_COLOURDLG
wxColour MyFrame::SelectColour() wxColour MyFrame::SelectColour()
{ {
wxColour col; wxColour col;
@@ -1277,4 +1293,5 @@ wxColour MyFrame::SelectColour()
return col; return col;
} }
#endif // wxUSE_COLOURDLG

View File

@@ -331,7 +331,9 @@ MyFrame::MyFrame(const wxString& title)
SetMenuBar(menuBar); SetMenuBar(menuBar);
// also create status bar which we use in OnWizardCancel // also create status bar which we use in OnWizardCancel
#if wxUSE_STATUSBAR
CreateStatusBar(); CreateStatusBar();
#endif // wxUSE_STATUSBAR
} }
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))