2004-05-17 22:15:10 +00:00
|
|
|
// $Id$
|
|
|
|
//
|
2004-04-10 09:11:03 +00:00
|
|
|
// The contents of this file are subject to the BOINC Public License
|
|
|
|
// Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
// compliance with the License. You may obtain a copy of the License at
|
|
|
|
// http://boinc.berkeley.edu/license_1.0.txt
|
|
|
|
//
|
|
|
|
// Software distributed under the License is distributed on an "AS IS"
|
|
|
|
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing rights and limitations
|
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Contributor(s):
|
|
|
|
//
|
2004-05-17 22:15:10 +00:00
|
|
|
// Revision History:
|
|
|
|
//
|
|
|
|
|
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
|
|
|
|
|
|
|
class CMainFrame : public wxFrame
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(CMainFrame)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CMainFrame();
|
|
|
|
CMainFrame(wxString strTitle);
|
|
|
|
|
|
|
|
~CMainFrame(void);
|
|
|
|
|
2004-10-09 03:05:01 +00:00
|
|
|
bool UpdateStatusbar( const wxString& strStatusbarText );
|
|
|
|
|
2004-10-21 14:29:59 +00:00
|
|
|
void OnExit( wxCommandEvent& event );
|
|
|
|
void OnClose( wxCloseEvent& event );
|
2004-04-10 09:11:03 +00:00
|
|
|
|
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-21 14:29:59 +00:00
|
|
|
void OnIdle ( wxIdleEvent& event );
|
|
|
|
|
|
|
|
void OnNotebookSelectionChanged( wxNotebookEvent& event );
|
2004-10-09 03:05:01 +00:00
|
|
|
|
2004-10-05 02:55:26 +00:00
|
|
|
void OnListCacheHint( wxListEvent& event );
|
|
|
|
void OnListSelected( wxListEvent& event );
|
|
|
|
void OnListDeselected( wxListEvent& event );
|
|
|
|
|
2004-10-21 14:29:59 +00:00
|
|
|
void OnListPanelRender( wxTimerEvent& event );
|
|
|
|
void OnTaskPanelRender( wxTimerEvent& event );
|
2004-05-21 06:27:15 +00:00
|
|
|
|
2004-04-10 09:11:03 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
wxMenuBar* m_pMenubar;
|
|
|
|
wxNotebook* m_pNotebook;
|
|
|
|
wxStatusBar* m_pStatusbar;
|
2004-09-25 21:33:24 +00:00
|
|
|
wxTimer* m_pFrameTaskPanelRenderTimer;
|
|
|
|
wxTimer* m_pFrameListPanelRenderTimer;
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-10-21 14:29:59 +00:00
|
|
|
bool m_bPostCreateInitializationCompleted;
|
2004-10-09 03:05:01 +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();
|
2004-05-27 06:17:58 +00:00
|
|
|
template < class T >
|
|
|
|
bool FireSaveStateEvent( T pPage, wxConfigBase* pConfig );
|
|
|
|
|
2004-05-21 06:27:15 +00:00
|
|
|
bool RestoreState();
|
2004-05-27 06:17:58 +00:00
|
|
|
template < class T >
|
|
|
|
bool FireRestoreStateEvent( T pPage, wxConfigBase* pConfig );
|
|
|
|
|
|
|
|
template < class T >
|
2004-10-05 02:55:26 +00:00
|
|
|
void FireListOnCacheHintEvent( T pView, wxListEvent& event );
|
|
|
|
template < class T >
|
|
|
|
void FireListOnSelectedEvent( T pView, wxListEvent& event );
|
|
|
|
template < class T >
|
|
|
|
void FireListOnDeselectedEvent( T pView, wxListEvent& event );
|
|
|
|
template < class T >
|
|
|
|
void FireListPanelRenderEvent( T pPage, wxTimerEvent& event );
|
|
|
|
|
2004-09-25 21:33:24 +00:00
|
|
|
template < class T >
|
2004-10-05 02:55:26 +00:00
|
|
|
void FireTaskPanelRenderEvent( T pPage, wxTimerEvent& event );
|
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-04-11 04:37:10 +00:00
|
|
|
|
|
|
|
|
2004-04-11 05:09:18 +00:00
|
|
|
#endif
|
|
|
|
|