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

Annotation of /wxCpuThrottle/src/wxcputhrottle.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (hide annotations) (download)
Wed Aug 8 19:04:07 2007 UTC (16 years, 10 months ago) by torben
File size: 1295 byte(s)
Initial import...

1 torben 19 #include <wx/wx.h>
2     #include "wxcputhrottle.h"
3    
4     BEGIN_EVENT_TABLE( wxCpuThrottleFrame, wxFrame )
5     EVT_MENU( Menu_File_Quit, wxCpuThrottleFrame::OnQuit )
6     EVT_MENU( Menu_File_About, wxCpuThrottleFrame::OnAbout )
7     END_EVENT_TABLE()
8    
9     IMPLEMENT_APP(wxCpuThrottleapp)
10    
11    
12     bool
13     wxCpuThrottleapp::OnInit()
14     {
15     wxCpuThrottleFrame *frame = new wxCpuThrottleFrame( wxT( "Hello World" ), wxPoint(50,50), wxSize(450,340) );
16    
17     frame->Show(TRUE);
18     SetTopWindow(frame);
19     return TRUE;
20     }
21    
22     wxCpuThrottleFrame::wxCpuThrottleFrame( const wxString& title, const wxPoint& pos, const wxSize& size )
23     : wxFrame((wxFrame *)NULL, -1, title, pos, size)
24     {
25     wxMenu *menuFile = new wxMenu;
26    
27     menuFile->Append( Menu_File_About, wxT( "&About..." ) );
28     menuFile->AppendSeparator();
29     menuFile->Append( Menu_File_Quit, wxT( "E&xit" ) );
30    
31     wxMenuBar *menuBar = new wxMenuBar;
32     menuBar->Append( menuFile, wxT( "&File" ) );
33    
34     SetMenuBar( menuBar );
35    
36     CreateStatusBar();
37     SetStatusText( wxT( "Welcome to Kdevelop wxWidgets app!" ) );
38     }
39    
40     void
41     wxCpuThrottleFrame::OnQuit( wxCommandEvent& WXUNUSED( event ) )
42     {
43     Close(TRUE);
44     }
45    
46     void
47     wxCpuThrottleFrame::OnAbout( wxCommandEvent& WXUNUSED( event ) )
48     {
49     wxMessageBox( wxT( "This is a wxWidgets Hello world sample" ),
50     wxT( "About Hello World" ), wxOK | wxICON_INFORMATION, this );
51     }

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.20