1
// Berkeley Open Infrastructure for Network Computing
2
// http://boinc.berkeley.edu
3
// Copyright (C) 2005 University of California
5
// This is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation;
8
// either version 2.1 of the License, or (at your option) any later version.
10
// This software 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
// To view the GNU Lesser General Public License visit
16
// http://www.gnu.org/copyleft/lesser.html
17
// or write to the Free Software Foundation, Inc.,
18
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
#ifndef _IMAGEBUTTON_H_
21
#define _IMAGEBUTTON_H_
23
#if defined(__GNUG__) && !defined(__APPLE__)
24
#pragma interface "sg_ImageButton.cpp"
27
#define TAB_STATUS_RUNNING 1
28
#define TAB_STATUS_PREEMPTED 2
29
#define TAB_STATUS_PAUSED_USER_ACTIVE 3
30
#define TAB_STATUS_PAUSED_USER_REQ 4
31
#define TAB_STATUS_PAUSED_POWER 5
32
#define TAB_STATUS_PAUSED_TIME_OF_DAY 6
33
#define TAB_STATUS_PAUSED_BENCHMARKS 7
34
#define TAB_STATUS_PAUSED 8
35
#define TAB_STATUS_INITIAL_DELAY 9
37
class CImageButton : public wxPanel
41
CImageButton(wxWindow* parent,wxBitmap bg,wxPoint coord, wxSize size, bool drawText, int initStatus);
43
void SetImage(wxBitmap bg);
44
void OnPaint(wxPaintEvent& event);
45
void OnLeftUp(wxMouseEvent& event);
46
void OnEraseBackground(wxEraseEvent& event);
47
void SetEnableShowGraphics(bool show);
48
void SetStatus(int status);
51
//static const int MaxWidth = 320;
52
//static const int MaxHeight = 240;
54
bool m_enableShowGraphics;
56
wxString GetStatusText();
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/>.
18
#ifndef _IMAGEBUTTON_H_
19
#define _IMAGEBUTTON_H_
21
#if defined(__GNUG__) && !defined(__APPLE__)
22
#pragma interface "sg_ImageButton.cpp"
25
#define TAB_STATUS_RUNNING 1
26
#define TAB_STATUS_PREEMPTED 2
27
#define TAB_STATUS_PAUSED_USER_ACTIVE 3
28
#define TAB_STATUS_PAUSED_USER_REQ 4
29
#define TAB_STATUS_PAUSED_POWER 5
30
#define TAB_STATUS_PAUSED_TIME_OF_DAY 6
31
#define TAB_STATUS_PAUSED_BENCHMARKS 7
32
#define TAB_STATUS_PAUSED 8
33
#define TAB_STATUS_INITIAL_DELAY 9
35
class CImageButton : public wxPanel
39
CImageButton(wxWindow* parent,wxBitmap bg,wxPoint coord, wxSize size, bool drawText, int initStatus);
41
void SetImage(wxBitmap bg);
42
void OnPaint(wxPaintEvent& event);
43
void OnLeftUp(wxMouseEvent& event);
44
void OnEraseBackground(wxEraseEvent& event);
45
void SetEnableShowGraphics(bool show);
46
void SetStatus(int status);
49
//static const int MaxWidth = 320;
50
//static const int MaxHeight = 240;
52
bool m_enableShowGraphics;
54
wxString GetStatusText();