2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC 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 3 of the License, or (at your option) any later version.
|
2004-04-10 09:11:03 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// 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
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
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
|
|
|
|
|
- client: include precompiled header in rr_sim.cpp so memory
leak detection will work.
- MGR: Have the BaseFrame call a function to determine if the
selection list should be saved instead of traversing
the application pointer. Each view just overrides the function
returning a true/false value. We don't have to worry about null
pointers and the like.
- MGR: BOINCGUIApp should never need to know how either the views
work or the document. Move the code that determines which
RPCs should be fired into each of the views. Have the document
look for it there.
- MGR: Reduce duplicate code for hiding and showing an application
- MGR: Move some Windows and Mac specific code into functions
and streamline the application startup and shutdown rountines.
- MGR: Move the event processing that was in BOINCGUIApp into the
BaseFrame.
- MGR: General cleanup.
- MGR: Doxygen comments.
- MGR: Cleanup some warnings.
client/
rr_sim.cpp
clientgui/
AdvancedFrame.cpp, .h
AsyncRPC.cpp, .h
BOINCBaseFrame.cpp, .h
BOINCBaseView.cpp, .h
BOINCClientManager.cpp
BOINCGUIApp.cpp, .h
BOINCTaskBar.cpp
MainDocument.cpp, .h
sg_BoincSimpleGUI.cpp, .h
ViewProjects.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h
WelcomePage.cpp
win_build/installerv2/
BOINC.ism
BOINCx64.ism
win_build/
sim.vcproj
svn path=/trunk/boinc/; revision=16357
2008-10-29 22:44:55 +00:00
|
|
|
|
2009-10-14 17:11:57 +00:00
|
|
|
class CBOINCBaseView;
|
|
|
|
|
- client: include precompiled header in rr_sim.cpp so memory
leak detection will work.
- MGR: Have the BaseFrame call a function to determine if the
selection list should be saved instead of traversing
the application pointer. Each view just overrides the function
returning a true/false value. We don't have to worry about null
pointers and the like.
- MGR: BOINCGUIApp should never need to know how either the views
work or the document. Move the code that determines which
RPCs should be fired into each of the views. Have the document
look for it there.
- MGR: Reduce duplicate code for hiding and showing an application
- MGR: Move some Windows and Mac specific code into functions
and streamline the application startup and shutdown rountines.
- MGR: Move the event processing that was in BOINCGUIApp into the
BaseFrame.
- MGR: General cleanup.
- MGR: Doxygen comments.
- MGR: Cleanup some warnings.
client/
rr_sim.cpp
clientgui/
AdvancedFrame.cpp, .h
AsyncRPC.cpp, .h
BOINCBaseFrame.cpp, .h
BOINCBaseView.cpp, .h
BOINCClientManager.cpp
BOINCGUIApp.cpp, .h
BOINCTaskBar.cpp
MainDocument.cpp, .h
sg_BoincSimpleGUI.cpp, .h
ViewProjects.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h
WelcomePage.cpp
win_build/installerv2/
BOINC.ism
BOINCx64.ism
win_build/
sim.vcproj
svn path=/trunk/boinc/; revision=16357
2008-10-29 22:44:55 +00:00
|
|
|
///
|
|
|
|
/// Bitmask values for CMainDocument::RunPeriodicRPCs()
|
|
|
|
///
|
|
|
|
#define VW_PROJ 1
|
|
|
|
#define VW_TASK 2
|
|
|
|
#define VW_XFER 4
|
|
|
|
#define VW_MSGS 8
|
|
|
|
#define VW_STAT 16
|
|
|
|
#define VW_DISK 32
|
|
|
|
|
|
|
|
|
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
|
|
|
{
|
2009-10-14 17:11: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();
|
2009-10-14 17:11:57 +00:00
|
|
|
CAdvancedFrame( wxString title, wxIcon* icon, wxIcon* icon32, wxPoint position, wxSize size );
|
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
|
|
|
|
2009-10-14 17:11:57 +00:00
|
|
|
void OnChangeView( wxCommandEvent& event );
|
|
|
|
void OnChangeGUI( wxCommandEvent& event );
|
|
|
|
|
|
|
|
void OnWizardAttach( wxCommandEvent& event );
|
|
|
|
void OnWizardUpdate( wxCommandEvent& event );
|
|
|
|
void OnWizardDetach( 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
|
|
|
|
2009-10-14 17:11:57 +00:00
|
|
|
void OnOptions( wxCommandEvent& event );
|
|
|
|
void OnPreferences( wxCommandEvent& event );
|
2007-01-26 16:38:44 +00:00
|
|
|
void OnSelectComputer( wxCommandEvent& event );
|
|
|
|
void OnClientShutdown( wxCommandEvent& event );
|
|
|
|
void OnRunBenchmarks( wxCommandEvent& event );
|
2009-10-14 17:11:57 +00:00
|
|
|
void OnRetryCommunications( wxCommandEvent& event );
|
|
|
|
void OnReadPreferences( wxCommandEvent& event );
|
|
|
|
void OnReadConfig( 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
|
|
|
|
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-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 );
|
2009-03-09 18:02:37 +00:00
|
|
|
|
2006-06-23 08:20:08 +00:00
|
|
|
void OnUpdateStatus( CFrameEvent& event );
|
2006-02-09 21:51:07 +00:00
|
|
|
|
2006-02-17 20:59:15 +00:00
|
|
|
void ResetReminderTimers();
|
|
|
|
|
2009-03-12 09:25:31 +00:00
|
|
|
bool SaveState();
|
|
|
|
|
2005-08-25 22:00:39 +00:00
|
|
|
wxTimer* m_pRefreshStateTimer;
|
|
|
|
wxTimer* m_pFrameRenderTimer;
|
|
|
|
|
- client: include precompiled header in rr_sim.cpp so memory
leak detection will work.
- MGR: Have the BaseFrame call a function to determine if the
selection list should be saved instead of traversing
the application pointer. Each view just overrides the function
returning a true/false value. We don't have to worry about null
pointers and the like.
- MGR: BOINCGUIApp should never need to know how either the views
work or the document. Move the code that determines which
RPCs should be fired into each of the views. Have the document
look for it there.
- MGR: Reduce duplicate code for hiding and showing an application
- MGR: Move some Windows and Mac specific code into functions
and streamline the application startup and shutdown rountines.
- MGR: Move the event processing that was in BOINCGUIApp into the
BaseFrame.
- MGR: General cleanup.
- MGR: Doxygen comments.
- MGR: Cleanup some warnings.
client/
rr_sim.cpp
clientgui/
AdvancedFrame.cpp, .h
AsyncRPC.cpp, .h
BOINCBaseFrame.cpp, .h
BOINCBaseView.cpp, .h
BOINCClientManager.cpp
BOINCGUIApp.cpp, .h
BOINCTaskBar.cpp
MainDocument.cpp, .h
sg_BoincSimpleGUI.cpp, .h
ViewProjects.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h
WelcomePage.cpp
win_build/installerv2/
BOINC.ism
BOINCx64.ism
win_build/
sim.vcproj
svn path=/trunk/boinc/; revision=16357
2008-10-29 22:44:55 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int _GetCurrentViewPage();
|
|
|
|
|
2009-04-18 11:52:48 +00:00
|
|
|
wxAcceleratorEntry m_Shortcuts[1]; // For HELP keyboard shortcut
|
- client: include precompiled header in rr_sim.cpp so memory
leak detection will work.
- MGR: Have the BaseFrame call a function to determine if the
selection list should be saved instead of traversing
the application pointer. Each view just overrides the function
returning a true/false value. We don't have to worry about null
pointers and the like.
- MGR: BOINCGUIApp should never need to know how either the views
work or the document. Move the code that determines which
RPCs should be fired into each of the views. Have the document
look for it there.
- MGR: Reduce duplicate code for hiding and showing an application
- MGR: Move some Windows and Mac specific code into functions
and streamline the application startup and shutdown rountines.
- MGR: Move the event processing that was in BOINCGUIApp into the
BaseFrame.
- MGR: General cleanup.
- MGR: Doxygen comments.
- MGR: Cleanup some warnings.
client/
rr_sim.cpp
clientgui/
AdvancedFrame.cpp, .h
AsyncRPC.cpp, .h
BOINCBaseFrame.cpp, .h
BOINCBaseView.cpp, .h
BOINCClientManager.cpp
BOINCGUIApp.cpp, .h
BOINCTaskBar.cpp
MainDocument.cpp, .h
sg_BoincSimpleGUI.cpp, .h
ViewProjects.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h
WelcomePage.cpp
win_build/installerv2/
BOINC.ism
BOINCx64.ism
win_build/
sim.vcproj
svn path=/trunk/boinc/; revision=16357
2008-10-29 22:44:55 +00:00
|
|
|
wxAcceleratorTable* m_pAccelTable;
|
|
|
|
|
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
|
|
|
|
2009-10-14 17:11:57 +00:00
|
|
|
bool CreateMenu( bool bRPCsSafe = true );
|
2004-04-10 09:11:03 +00:00
|
|
|
bool DeleteMenu();
|
|
|
|
|
2009-10-14 17:11:57 +00:00
|
|
|
bool CreateNotebook( bool bRPCsSafe = true );
|
2007-05-22 16:27:27 +00:00
|
|
|
bool RepopulateNotebook();
|
2009-10-14 17:11:57 +00:00
|
|
|
bool CreateNotebookPage( CBOINCBaseView* pwndNewNotebookPage );
|
2004-04-10 09:11:03 +00:00
|
|
|
bool DeleteNotebook();
|
|
|
|
|
2009-10-14 17:11:57 +00:00
|
|
|
bool CreateStatusbar( bool bRPCsSafe = true );
|
2004-04-10 09:11:03 +00:00
|
|
|
bool DeleteStatusbar();
|
|
|
|
|
2004-05-21 06:27:15 +00:00
|
|
|
bool RestoreState();
|
2004-05-27 06:17:58 +00:00
|
|
|
|
2006-10-30 22:42:12 +00:00
|
|
|
void SaveWindowDimensions();
|
|
|
|
|
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();
|
|
|
|
|
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
|
|
|
|