NIREP
|
00001 00002 // Name: GaugeNotification.cpp 00003 // Purpose: 00004 // Author: 00005 // Modified by: 00006 // Created: 19/01/2010 17:13:40 00007 // RCS-ID: 00008 // Copyright: 00009 // Licence: 00011 00012 // For compilers that support precompilation, includes "wx/wx.h". 00013 #include "wx/wxprec.h" 00014 00015 #ifdef __BORLANDC__ 00016 #pragma hdrstop 00017 #endif 00018 00019 #ifndef WX_PRECOMP 00020 #include "wx/wx.h" 00021 #endif 00022 00025 00026 #include "GaugeNotification.h" 00027 00030 00031 00036 IMPLEMENT_CLASS( GaugeNotification, wxFrame ) 00037 00038 00039 00043 BEGIN_EVENT_TABLE( GaugeNotification, wxFrame ) 00044 00047 //EVT_TIMER(TIMER_ID, GaugeNotification::OnTimer) 00048 00049 END_EVENT_TABLE() 00050 00051 00056 GaugeNotification::GaugeNotification() 00057 { 00058 Init(); 00059 } 00060 00061 GaugeNotification::GaugeNotification( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) 00062 { 00063 Init(); 00064 Create( parent, id, caption, pos, size, style ); 00065 } 00066 00067 00072 bool GaugeNotification::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) 00073 { 00075 wxFrame::Create( parent, id, caption, pos, size, style ); 00076 00077 CreateControls(); 00078 Centre(); 00080 return true; 00081 } 00082 00083 00088 GaugeNotification::~GaugeNotification() 00089 { 00092 } 00093 00094 00099 void GaugeNotification::Init() 00100 { 00103 } 00104 00105 00110 void GaugeNotification::CreateControls() 00111 { 00113 GaugeNotification* itemFrame1 = this; 00114 00115 wxPanel* itemPanel2 = new wxPanel( itemFrame1, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); 00116 00117 wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); 00118 itemPanel2->SetSizer(itemBoxSizer3); 00119 00120 //wxStaticText* itemStaticText4 = new wxStaticText( itemPanel2, wxID_STATIC, _("Creating Panel"), wxDefaultPosition, wxDefaultSize, 0 ); 00121 //itemStaticText4->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Tahoma"))); 00122 //itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00123 00124 //itemGauge5 = new wxGauge( itemPanel2, ID_GAUGE1, 100, wxDefaultPosition, wxSize(200, 50), wxGA_HORIZONTAL ); 00125 //itemGauge5->SetValue(1); 00126 //itemBoxSizer3->Add(itemGauge5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00127 00128 itemTextCtrl6 = new wxTextCtrl( itemPanel2, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxSize(200, 150), wxTE_MULTILINE|wxTE_READONLY ); 00129 itemBoxSizer3->Add(itemTextCtrl6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00130 00131 //my_timer = new wxTimer(this,TIMER_ID); 00132 //my_timer->Start(100); 00133 00135 } 00136 00137 00142 bool GaugeNotification::ShowToolTips() 00143 { 00144 return true; 00145 } 00146 00151 wxBitmap GaugeNotification::GetBitmapResource( const wxString& name ) 00152 { 00153 // Bitmap retrieval 00155 wxUnusedVar(name); 00156 return wxNullBitmap; 00158 } 00159 00164 wxIcon GaugeNotification::GetIconResource( const wxString& name ) 00165 { 00166 // Icon retrieval 00168 wxUnusedVar(name); 00169 return wxNullIcon; 00171 } 00172 00173 void GaugeNotification::AddItem( std::string item ) 00174 { 00175 std::string tempString = "Loading " + item + "\n"; 00176 itemTextCtrl6->AppendText(wxString(tempString.c_str(), wxConvUTF8)); 00177 } 00178 00179 void GaugeNotification::OnTimer(wxTimerEvent& event) 00180 { 00181 //itemGauge5->Pulse(); 00182 } 00183