X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2414cbe8c21931afbb590132232553514da824c..8429bec1e8e3fcb7d071bc3ef7c665c484b5fdc1:/samples/treectrl/treetest.cpp diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 48759220c0..8f3fee1970 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -25,6 +25,10 @@ #include "wx/wx.h" #endif +#ifdef __WXGTK__ +#include "mondrian.xpm" +#endif + #include "wx/treectrl.h" #include "treetest.h" @@ -55,7 +59,7 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "wxTreeCtrl Test", 50, 50, 450, 340); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxTreeCtrl Test", 50, 50, 450, 340); // This reduces flicker effects - even better would be to define OnEraseBackground // to do nothing. When the tree control's scrollbars are show or hidden, the @@ -65,9 +69,8 @@ bool MyApp::OnInit(void) // Give it an icon #ifdef __WXMSW__ frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef __X__ - frame->SetIcon(wxIcon("aiai.xbm")); +#else + frame->SetIcon(wxIcon(mondrian_xpm)); #endif // Make an image list containing small icons @@ -154,8 +157,8 @@ bool MyApp::OnInit(void) MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) { - m_treeCtrl = NULL; - m_logWindow = NULL; + m_treeCtrl = (MyTreeCtrl *) NULL; + m_logWindow = (wxTextCtrl *) NULL; } MyFrame::~MyFrame(void) @@ -163,12 +166,12 @@ MyFrame::~MyFrame(void) delete wxGetApp().m_imageListNormal; } -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) { Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& event) +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) { wxMessageDialog dialog(this, "Tree test sample\nJulian Smart (c) 1997", "About tree test", wxOK|wxCANCEL); @@ -178,7 +181,7 @@ void MyFrame::OnAbout(wxCommandEvent& event) // MyTreeCtrl -void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event) +void MyTreeCtrl::OnBeginDrag(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -195,7 +198,7 @@ void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& event) +void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -212,7 +215,7 @@ void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& event) +void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -229,7 +232,7 @@ void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& event) +void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -246,7 +249,7 @@ void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnDeleteItem(wxTreeEvent& event) +void MyTreeCtrl::OnDeleteItem(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -263,7 +266,7 @@ void MyTreeCtrl::OnDeleteItem(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnGetInfo(wxTreeEvent& event) +void MyTreeCtrl::OnGetInfo(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -280,7 +283,7 @@ void MyTreeCtrl::OnGetInfo(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnSetInfo(wxTreeEvent& event) +void MyTreeCtrl::OnSetInfo(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -297,7 +300,7 @@ void MyTreeCtrl::OnSetInfo(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnItemExpanded(wxTreeEvent& event) +void MyTreeCtrl::OnItemExpanded(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -314,7 +317,7 @@ void MyTreeCtrl::OnItemExpanded(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnItemExpanding(wxTreeEvent& event) +void MyTreeCtrl::OnItemExpanding(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -331,7 +334,7 @@ void MyTreeCtrl::OnItemExpanding(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnSelChanged(wxTreeEvent& event) +void MyTreeCtrl::OnSelChanged(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -348,7 +351,7 @@ void MyTreeCtrl::OnSelChanged(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnSelChanging(wxTreeEvent& event) +void MyTreeCtrl::OnSelChanging(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return; @@ -365,7 +368,7 @@ void MyTreeCtrl::OnSelChanging(wxTreeEvent& event) #endif } -void MyTreeCtrl::OnKeyDown(wxTreeEvent& event) +void MyTreeCtrl::OnKeyDown(wxTreeEvent& WXUNUSED(event) ) { if ( !wxGetApp().GetTopWindow() ) return;