1
// This file is part of BOINC.
2
// http://boinc.berkeley.edu
3
// Copyright (C) 2008 University of California
5
// BOINC is free software; you can redistribute it and/or modify it
6
// under the terms of the GNU Lesser General Public License
7
// as published by the Free Software Foundation,
8
// either version 3 of the License, or (at your option) any later version.
10
// BOINC is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
// See the GNU Lesser General Public License for more details.
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef _BOINCSIMPLEFRAME_H_
20
#define _BOINCSIMPLEFRAME_H_
22
#include "BOINCBaseFrame.h"
24
#if defined(__GNUG__) && !defined(__APPLE__)
25
#pragma interface "sg_BoincSimpleFrame.cpp"
28
class CSimpleTaskPanel;
29
class CSimpleProjectPanel;
30
class CSimpleTaskPanel;
33
class CSimpleGUIPanel : public wxPanel
35
DECLARE_DYNAMIC_CLASS(CSimpleGUIPanel)
39
CSimpleGUIPanel(wxWindow* parent);
43
// My tasks panel (shown when there are active tasks)
44
CSimpleTaskPanel *m_taskPanel;
46
CSimpleProjectPanel *m_projPanel;
47
////////////////////////////;
49
void SetBackgroundBitmap();
50
void ReskinInterface();
51
void UpdateProjectView();
53
void OnProjectsAttachToProject();
54
void OnShowNotices(wxCommandEvent& event);
55
void OnPauseResume(wxCommandEvent& event);
56
void OnHelp( wxCommandEvent& event );
57
void SetDlgOpen(bool newDlgState) { dlgOpen = newDlgState; }
58
bool GetDlgOpen() { return dlgOpen; }
59
wxBitmap *GetBackgroundBitMap() { return &m_bmpBg; }
60
void OnCheckForNewNotices(wxTimerEvent& WXUNUSED(event));
64
wxBoxSizer *mainSizer;
66
bool m_bNewNoticeAlert;
67
bool m_bNoticesButtonIsRed;
71
void OnPaint(wxPaintEvent& event);
72
void OnEraseBackground(wxEraseEvent& event);
74
// void SetupMacAccessibilitySupport();
75
// void RemoveMacAccessibilitySupport();
77
// EventHandlerRef m_pSGAccessibilityEventHandlerRef;
81
wxButton *m_NoticesButton;
82
wxButton *m_PauseResumeButton;
83
wxButton *m_HelpButton;
84
wxString m_sPauseString;
85
wxString m_sResumeString;
92
wxTimer* checkForNewNoticesTimer;
93
wxString m_sPauseButtonToolTip;
94
wxString m_sResumeButtonToolTip;
99
class CSimpleFrame : public CBOINCBaseFrame
101
DECLARE_DYNAMIC_CLASS(CSimpleFrame)
105
CSimpleFrame(wxString title, wxIcon* icon, wxIcon* icon32, wxPoint position, wxSize size);
109
void OnChangeGUI( wxCommandEvent& event );
110
void OnPreferences( wxCommandEvent& event );
111
void OnOptions( wxCommandEvent& event );
112
void OnOldSG( wxCommandEvent& event );
113
void OnHelp( wxHelpEvent& event );
114
void OnHelpBOINC( wxCommandEvent& event );
115
void OnHelpAbout( wxCommandEvent& event );
117
void OnProjectsAttachToProject();
119
void OnConnect(CFrameEvent& event );
120
void OnReloadSkin( CFrameEvent& event );
121
void OnRefreshView( CFrameEvent& event );
122
void OnNotification( CFrameEvent& event );
124
void SetMsgsDlgOpen(CDlgMessages* newDlgPtr) { dlgMsgsPtr = newDlgPtr; }
125
bool isMessagesDlgOpen() { return (dlgMsgsPtr != NULL); }
131
virtual int _GetCurrentViewPage();
133
wxMenuBar* m_pMenubar;
134
wxAcceleratorEntry m_Shortcuts[1];
135
wxAcceleratorTable* m_pAccelTable;
137
CSimpleGUIPanel* m_pBackgroundPanel;
141
CDlgMessages* dlgMsgsPtr;
143
DECLARE_EVENT_TABLE()
146
#endif // _BOINCSIMPLEFRAME_H_