2005-01-20 23:22:22 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
2004-04-10 09:11:03 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2004-05-17 22:15:10 +00:00
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-04-11 04:37:10 +00:00
|
|
|
#ifndef _MAINFRAME_H_
|
|
|
|
#define _MAINFRAME_H_
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "MainFrame.cpp"
|
|
|
|
#endif
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2005-03-10 05:07:01 +00:00
|
|
|
class CStatusBar : public wxStatusBar
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(CStatusBar)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CStatusBar();
|
|
|
|
CStatusBar(wxWindow *parent);
|
|
|
|
~CStatusBar();
|
|
|
|
|
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
|
|
|
|
wxStaticBitmap* m_pbmpConnected;
|
|
|
|
wxStaticText* m_ptxtConnected;
|
|
|
|
wxStaticBitmap* m_pbmpDisconnect;
|
|
|
|
wxStaticText* m_ptxtDisconnect;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
class CMainFrame : public wxFrame
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(CMainFrame)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CMainFrame();
|
|
|
|
CMainFrame(wxString strTitle);
|
|
|
|
|
|
|
|
~CMainFrame(void);
|
|
|
|
|
2004-10-24 07:38:38 +00:00
|
|
|
void OnHide( wxCommandEvent& event );
|
|
|
|
void OnActivitySelection( wxCommandEvent& event );
|
|
|
|
void OnNetworkSelection( wxCommandEvent& event );
|
2004-10-27 23:19:50 +00:00
|
|
|
void OnRunBenchmarks( wxCommandEvent& event );
|
2004-10-28 07:03:06 +00:00
|
|
|
void OnSelectComputer( wxCommandEvent& event );
|
2004-10-21 14:29:59 +00:00
|
|
|
void OnExit( wxCommandEvent& event );
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2005-03-11 22:10:56 +00:00
|
|
|
void OnToolsUpdateAccounts( wxCommandEvent& event );
|
2004-10-21 14:29:59 +00:00
|
|
|
void OnToolsOptions( wxCommandEvent& event );
|
|
|
|
void OnAbout( wxCommandEvent& event );
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-10-24 07:38:38 +00:00
|
|
|
void OnClose( wxCloseEvent& event );
|
2004-12-02 07:43:47 +00:00
|
|
|
void OnChar( wxKeyEvent& event );
|
|
|
|
|
2005-03-07 23:52:28 +00:00
|
|
|
void OnRefreshState( wxTimerEvent& event );
|
2004-10-28 22:51:38 +00:00
|
|
|
void OnFrameRender( wxTimerEvent& event );
|
2004-10-21 14:29:59 +00:00
|
|
|
void OnListPanelRender( wxTimerEvent& event );
|
2004-12-10 20:46:43 +00:00
|
|
|
|
|
|
|
void OnNotebookSelectionChanged( wxNotebookEvent& event );
|
2004-05-21 06:27:15 +00:00
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
wxMenuBar* m_pMenubar;
|
|
|
|
wxNotebook* m_pNotebook;
|
2005-03-10 05:07:01 +00:00
|
|
|
CStatusBar* m_pStatusbar;
|
2005-03-07 23:52:28 +00:00
|
|
|
wxTimer* m_pRefreshStateTimer;
|
2004-10-28 22:51:38 +00:00
|
|
|
wxTimer* m_pFrameRenderTimer;
|
2004-09-25 21:33:24 +00:00
|
|
|
wxTimer* m_pFrameListPanelRenderTimer;
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-10-28 22:51:38 +00:00
|
|
|
wxString m_strBaseTitle;
|
2004-10-28 07:03:06 +00:00
|
|
|
|
2005-02-07 04:47:18 +00:00
|
|
|
wxInt32 m_iSelectedLanguage;
|
2005-03-30 09:24:31 +00:00
|
|
|
wxArrayString m_aSelectedComputerMRU;
|
2005-02-07 04:47:18 +00:00
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
bool CreateMenu();
|
|
|
|
bool DeleteMenu();
|
|
|
|
|
|
|
|
bool CreateNotebook();
|
2004-05-27 06:17:58 +00:00
|
|
|
template < class T >
|
|
|
|
bool CreateNotebookPage( T pwndNewNotebookPage );
|
2004-04-10 09:11:03 +00:00
|
|
|
bool DeleteNotebook();
|
|
|
|
|
|
|
|
bool CreateStatusbar();
|
|
|
|
bool DeleteStatusbar();
|
|
|
|
|
2004-05-21 06:27:15 +00:00
|
|
|
bool SaveState();
|
|
|
|
bool RestoreState();
|
2004-05-27 06:17:58 +00:00
|
|
|
|
2004-05-21 06:27:15 +00:00
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2004-10-26 01:59:44 +00:00
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
};
|
2004-04-11 04:37:10 +00:00
|
|
|
|
|
|
|
|
2004-04-11 05:09:18 +00:00
|
|
|
#endif
|
|
|
|
|