Added ifdef for Zeta build
[pwlib.git] / samples / xmpptest / MainFrame.cxx
blobd5d48a53ef325c55fbfed2b6571be12c2f4f22e6
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: MainFrame.cxx
3 // Purpose:
4 // Author: Federico Pinna
5 // Modified by:
6 // Created: 05/02/04 23:19:32
7 // RCS-ID:
8 // Copyright: (c) 2004 Reitek S.p.A.
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
12 #if defined(__GNUG__) && !defined(__APPLE__)
13 #pragma implementation "MainFrame.h"
14 #endif
16 // For compilers that support precompilation, includes "wx/wx.h".
17 #include "wx/wxprec.h"
19 #ifdef __BORLANDC__
20 #pragma hdrstop
21 #endif
23 #ifndef WX_PRECOMP
24 #include "wx/wx.h"
25 #endif
27 ////@begin includes
28 ////@end includes
30 #include "MainFrame.h"
32 ////@begin XPM images
33 ////@end XPM images
35 /*!
36 * MainFrame type definition
39 IMPLEMENT_CLASS( MainFrame, wxFrame )
41 /*!
42 * MainFrame event table definition
45 BEGIN_EVENT_TABLE( MainFrame, wxFrame )
47 ////@begin MainFrame event table entries
48 EVT_MENU( ID_MENU, MainFrame::OnConnect )
50 EVT_MENU( ID_MENU1, MainFrame::OnDisconnect )
52 EVT_MENU( ID_MENU2, MainFrame::OnQuit )
54 ////@end MainFrame event table entries
56 END_EVENT_TABLE()
58 /*!
59 * MainFrame constructors
62 MainFrame::MainFrame( )
66 MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
68 Create( parent, id, caption, pos, size, style );
71 /*!
72 * MainFrame creator
75 bool MainFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
77 ////@begin MainFrame member initialisation
78 m_RosterTree = NULL;
79 ////@end MainFrame member initialisation
81 ////@begin MainFrame creation
82 wxFrame::Create( parent, id, caption, pos, size, style );
84 CreateControls();
85 Centre();
86 ////@end MainFrame creation
87 return TRUE;
90 /*!
91 * Control creation for MainFrame
94 void MainFrame::CreateControls()
96 ////@begin MainFrame content construction
98 MainFrame* item1 = this;
100 wxStatusBar* item8 = new wxStatusBar( item1, ID_STATUSBAR, wxST_SIZEGRIP|wxNO_BORDER );
101 item8->SetFieldsCount(2);
102 item1->SetStatusBar(item8);
104 wxPanel* item9 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxSize(100, 80), wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
106 wxGridSizer* item10 = new wxGridSizer(1, 1, 0, 0);
107 item9->SetSizer(item10);
108 item9->SetAutoLayout(TRUE);
110 wxTreeCtrl* item11 = new wxTreeCtrl( item9, ID_TREECTRL, wxDefaultPosition, wxSize(100, 100), wxTR_HAS_BUTTONS |wxTR_HIDE_ROOT|wxTR_SINGLE );
111 m_RosterTree = item11;
112 item10->Add(item11, 0, wxGROW|wxGROW, 5);
114 wxMenuBar* menuBar = new wxMenuBar;
116 wxMenu* item3 = new wxMenu;
117 item3->Append(ID_MENU, _("Connect"), _T(""), wxITEM_NORMAL);
118 item3->Append(ID_MENU1, _("&Disconnect"), _T(""), wxITEM_NORMAL);
119 item3->AppendSeparator();
120 item3->Append(ID_MENU2, _("E&xit"), _T(""), wxITEM_NORMAL);
121 menuBar->Append(item3, _("File"));
122 item1->SetMenuBar(menuBar);
124 ////@end MainFrame content construction
128 * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU
131 void MainFrame::OnConnect( wxCommandEvent& event )
133 // Insert custom code here
134 event.Skip();
138 * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU1
141 void MainFrame::OnDisconnect( wxCommandEvent& event )
143 // Insert custom code here
144 event.Skip();
148 * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU2
151 void MainFrame::OnQuit( wxCommandEvent& event )
153 // Insert custom code here
154 event.Skip();
158 * Should we show tooltips?
161 bool MainFrame::ShowToolTips()
163 return TRUE;