/[projects]/wxCpuThrottle/src/wxcputhrottle.cpp
ViewVC logotype

Diff of /wxCpuThrottle/src/wxcputhrottle.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 19 by torben, Wed Aug 8 19:04:07 2007 UTC revision 20 by torben, Wed Aug 8 21:00:34 2007 UTC
# Line 1  Line 1 
1  #include <wx/wx.h>  #include <wx/wx.h>
2  #include "wxcputhrottle.h"  #include "wxcputhrottle.h"
3    
4  BEGIN_EVENT_TABLE( wxCpuThrottleFrame, wxFrame )  #include "wxcputhrottleframe.h"
         EVT_MENU( Menu_File_Quit, wxCpuThrottleFrame::OnQuit )  
         EVT_MENU( Menu_File_About, wxCpuThrottleFrame::OnAbout )  
 END_EVENT_TABLE()  
5    
6  IMPLEMENT_APP(wxCpuThrottleapp)  IMPLEMENT_APP(wxCpuThrottleapp)
7                    
8    
9  bool  bool wxCpuThrottleapp::OnInit()
 wxCpuThrottleapp::OnInit()  
10  {  {
11          wxCpuThrottleFrame *frame = new wxCpuThrottleFrame( wxT( "Hello World" ), wxPoint(50,50), wxSize(450,340) );          wxCpuThrottleFrame *frame = new wxCpuThrottleFrame( wxT( "Hello World" ), wxPoint(50,50), wxSize(450,340) );
12    
13          frame->Show(TRUE);          frame->Show(false);
14          SetTopWindow(frame);          SetTopWindow(frame);
15            
16    
17          return TRUE;          return TRUE;
18  }  }
19    
 wxCpuThrottleFrame::wxCpuThrottleFrame( const wxString& title, const wxPoint& pos, const wxSize& size )  
         : wxFrame((wxFrame *)NULL, -1, title, pos, size)  
 {  
         wxMenu *menuFile = new wxMenu;  
           
         menuFile->Append( Menu_File_About, wxT( "&About..." ) );  
         menuFile->AppendSeparator();  
         menuFile->Append( Menu_File_Quit, wxT( "E&xit" ) );  
           
         wxMenuBar *menuBar = new wxMenuBar;  
         menuBar->Append( menuFile, wxT( "&File" ) );  
           
         SetMenuBar( menuBar );  
           
         CreateStatusBar();  
         SetStatusText( wxT( "Welcome to Kdevelop wxWidgets app!" ) );  
 }  
20    
 void  
 wxCpuThrottleFrame::OnQuit( wxCommandEvent& WXUNUSED( event ) )  
 {  
         Close(TRUE);  
 }  
21    
22  void  
 wxCpuThrottleFrame::OnAbout( wxCommandEvent& WXUNUSED( event ) )  
 {  
         wxMessageBox( wxT( "This is a wxWidgets Hello world sample" ),  
                         wxT( "About Hello World" ), wxOK | wxICON_INFORMATION, this );  
 }  
23    

Legend:
Removed from v.19  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.20