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
|
|
|
|
2006-06-24 05:00:57 +00:00
|
|
|
#ifndef _ADVANCEDFRAME_H_
|
|
|
|
#define _ADVANCEDFRAME_H_
|
2004-04-11 04:37:10 +00:00
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2006-06-24 05:00:57 +00:00
|
|
|
#pragma interface "AdvancedFrame.cpp"
|
2004-04-11 04:37:10 +00:00
|
|
|
#endif
|
|
|
|
|
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()
|
|
|
|
};
|
|
|
|
|
2005-11-27 01:28:56 +00:00
|
|
|
|
2006-06-24 05:00:57 +00:00
|
|
|
class CAdvancedFrame : public CBOINCBaseFrame
|
2004-04-10 09:11:03 +00:00
|
|
|
{
|
2006-06-24 05:00:57 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(CAdvancedFrame)
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
public:
|
2006-06-24 05:00:57 +00:00
|
|
|
CAdvancedFrame();
|
|
|
|
CAdvancedFrame(wxString title, wxIcon* icon);
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2006-06-24 05:00:57 +00:00
|
|
|
~CAdvancedFrame(void);
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-10-24 07:38:38 +00:00
|
|
|
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 );
|
2006-06-23 08:20:08 +00:00
|
|
|
void OnSwitchGUI( wxCommandEvent& event );
|
2006-08-28 08:12:39 +00:00
|
|
|
#ifdef __WXMAC__
|
|
|
|
void OnCloseWindow( wxCommandEvent& event );
|
|
|
|
#endif
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2005-10-05 19:01:28 +00:00
|
|
|
void OnCommandsRetryCommunications( wxCommandEvent& event );
|
|
|
|
|
2005-09-06 08:58:56 +00:00
|
|
|
void OnProjectsAttachToAccountManager( wxCommandEvent& event );
|
2006-02-02 12:32:21 +00:00
|
|
|
void OnAccountManagerUpdate( wxCommandEvent& event );
|
|
|
|
void OnAccountManagerDetach( wxCommandEvent& event );
|
2005-09-06 08:58:56 +00:00
|
|
|
void OnProjectsAttachToProject( wxCommandEvent& event );
|
|
|
|
|
|
|
|
void OnOptionsOptions( wxCommandEvent& event );
|
2005-05-05 06:07:14 +00:00
|
|
|
|
2005-06-21 17:21:16 +00:00
|
|
|
void OnHelp( wxHelpEvent& event );
|
2005-06-17 04:53:35 +00:00
|
|
|
void OnHelpBOINCManager( wxCommandEvent& event );
|
2005-05-05 06:07:14 +00:00
|
|
|
void OnHelpBOINCWebsite( wxCommandEvent& event );
|
|
|
|
void OnHelpAbout( wxCommandEvent& event );
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2006-04-14 03:09:24 +00:00
|
|
|
void OnShow( wxShowEvent& event );
|
2004-12-02 07:43:47 +00:00
|
|
|
|
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
|
|
|
|
2006-06-23 08:20:08 +00:00
|
|
|
void OnRefreshView( CFrameEvent& event );
|
|
|
|
void OnConnect( CFrameEvent& event );
|
|
|
|
void OnUpdateStatus( CFrameEvent& event );
|
2006-02-09 21:51:07 +00:00
|
|
|
|
2006-02-17 20:59:15 +00:00
|
|
|
void ResetReminderTimers();
|
|
|
|
|
|
|
|
void SetFrameListPanelRenderTimerRate(); // TODO: refactor out of the frame and put the
|
|
|
|
// relevent code in OnPageChanged function
|
|
|
|
// and the base/statistics view.
|
|
|
|
|
2005-08-25 22:00:39 +00:00
|
|
|
wxTimer* m_pRefreshStateTimer;
|
|
|
|
wxTimer* m_pFrameRenderTimer;
|
|
|
|
wxTimer* m_pFrameListPanelRenderTimer;
|
|
|
|
|
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;
|
2006-02-13 10:20:42 +00:00
|
|
|
|
2004-10-28 22:51:38 +00:00
|
|
|
wxString m_strBaseTitle;
|
2004-10-28 07:03:06 +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
|
|
|
|
2006-10-30 22:42:12 +00:00
|
|
|
void SaveWindowDimensions();
|
|
|
|
void RestoreWindowDimensions();
|
|
|
|
|
2006-09-12 09:29:03 +00:00
|
|
|
void UpdateActivityModeControls( CC_STATUS& status );
|
|
|
|
void UpdateNetworkModeControls( CC_STATUS& status );
|
|
|
|
|
2005-04-08 04:23:37 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
2004-05-21 06:27:15 +00:00
|
|
|
|
2005-03-31 23:54:12 +00:00
|
|
|
|
2004-04-11 05:09:18 +00:00
|
|
|
#endif
|
|
|
|
|