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.,
|
2007-10-09 11:35:47 +00:00
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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();
|
2008-06-23 17:54:44 +00:00
|
|
|
CAdvancedFrame(wxString title, wxIcon* icon, wxIcon* icon32);
|
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
|
|
|
|
2007-05-22 16:27:27 +00:00
|
|
|
void OnSwitchView( wxCommandEvent& event );
|
2006-06-23 08:20:08 +00:00
|
|
|
void OnSwitchGUI( wxCommandEvent& event );
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2007-01-26 16:38:44 +00:00
|
|
|
void OnActivitySelection( wxCommandEvent& event );
|
|
|
|
void OnNetworkSelection( wxCommandEvent& event );
|
2005-10-05 19:01:28 +00:00
|
|
|
|
2007-01-26 16:38:44 +00:00
|
|
|
void OnProjectsAttachToProject( 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 OnOptionsOptions( wxCommandEvent& event );
|
2007-01-17 18:13:33 +00:00
|
|
|
void OnDlgPreferences( wxCommandEvent& event );
|
2007-01-26 16:38:44 +00:00
|
|
|
void OnSelectComputer( wxCommandEvent& event );
|
|
|
|
void OnClientShutdown( wxCommandEvent& event );
|
|
|
|
void OnRunBenchmarks( wxCommandEvent& event );
|
|
|
|
void OnCommandsRetryCommunications( wxCommandEvent& event );
|
|
|
|
void Onread_prefs( wxCommandEvent& event );
|
|
|
|
void Onread_config( wxCommandEvent& event );
|
2005-05-05 06:07:14 +00:00
|
|
|
|
2005-06-21 17:21:16 +00:00
|
|
|
void OnHelp( wxHelpEvent& event );
|
2007-04-03 13:14:30 +00:00
|
|
|
void OnHelpBOINC( wxCommandEvent& event );
|
2005-05-05 06:07:14 +00:00
|
|
|
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();
|
|
|
|
|
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
|
|
|
|
2007-01-30 15:50:16 +00:00
|
|
|
bool m_bDisplayShutdownClientWarning;
|
2007-05-22 16:27:27 +00:00
|
|
|
wxInt32 m_iDisplayViewType;
|
2007-01-30 15:50:16 +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();
|
2007-05-22 16:27:27 +00:00
|
|
|
bool RepopulateNotebook();
|
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();
|
2007-05-22 16:27:27 +00:00
|
|
|
bool SaveViewState();
|
2004-05-21 06:27:15 +00:00
|
|
|
bool RestoreState();
|
2007-05-22 16:27:27 +00:00
|
|
|
bool RestoreViewState();
|
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 );
|
2007-05-22 17:20:41 +00:00
|
|
|
void UpdateRefreshTimerInterval( wxInt32 iCurrentNotebookPage );
|
2006-09-12 09:29:03 +00:00
|
|
|
|
2006-12-29 16:35:33 +00:00
|
|
|
void StartTimers();
|
|
|
|
void StopTimers();
|
|
|
|
|
2006-12-16 07:57:26 +00:00
|
|
|
#ifdef __WXMAC__
|
|
|
|
protected:
|
|
|
|
|
|
|
|
wxAcceleratorEntry m_Shortcuts[1]; // For HELP keyboard shortcut
|
|
|
|
wxAcceleratorTable* m_pAccelTable;
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
|
2008-06-23 17:54:44 +00:00
|
|
|
|