~ubuntu-branches/debian/sid/boinc/sid

« back to all changes in this revision

Viewing changes to clientgui/sg_PanelBase.h

  • Committer: Package Import Robot
  • Author(s): Steffen Moeller
  • Date: 2011-08-08 01:36:51 UTC
  • mfrom: (6.1.11 experimental)
  • Revision ID: package-import@ubuntu.com-20110808013651-m1hs3cltiveuteyn
Tags: 6.13.1+dfsg-2
* Bringing notify patch to unstable.
* Adjusted build dependency to libjpeg-dev (Closes: #641093)
* Further improvements on stripchart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This file is part of BOINC.
 
2
// http://boinc.berkeley.edu
 
3
// Copyright (C) 2008 University of California
 
4
//
 
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.
 
9
//
 
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.
 
14
//
 
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/>.
 
17
 
 
18
#ifndef __sg_PanelBase__
 
19
#define __sg_PanelBase__
 
20
 
 
21
#include "sg_CustomControls.h" 
 
22
#include "sg_BoincSimpleFrame.h"
 
23
 
 
24
 
 
25
// TODO: Move these to events.h
 
26
enum{
 
27
    ID_CHANGE_SLIDE_TIMER = 14000,
 
28
        WEBSITE_URL_MENU_ID = 34500,
 
29
        WEBSITE_URL_MENU_ID_REMOVE_PROJECT = 34550,
 
30
        WEBSITE_URL_MENU_ID_HOMEPAGE = 34551,
 
31
};
 
32
 
 
33
 
 
34
 
 
35
///////////////////////////////////////////////////////////////////////////
 
36
 
 
37
#ifdef __WXMAC__
 
38
#define SMALL_FONT 12
 
39
#define MEDIUM_FONT 16
 
40
#define LARGE_FONT 20
 
41
#else
 
42
#define SMALL_FONT 9
 
43
#define MEDIUM_FONT 12
 
44
#define LARGE_FONT 16
 
45
#endif
 
46
 
 
47
#define SIDEMARGINS 30
 
48
 
 
49
 
 
50
///////////////////////////////////////////////////////////////////////////////
 
51
/// Class CSimplePanelBase
 
52
///////////////////////////////////////////////////////////////////////////////
 
53
 
 
54
#ifdef __WXMAC__
 
55
#include "MacBitmapComboBox.h"
 
56
#else
 
57
// TODO: Subclass CBOINCBitmapComboBox to be accessible on Windows.  Either:
 
58
// Add WxBitmapComboBoxAccessible class (like CNoticeListCtrlAccessible for CNoticeListCtrl)
 
59
// or simulate bitmap combo box using accessible standard Windows controls (as done for 
 
60
// CBOINCBitmapComboBox on Mac)
 
61
// TODO: Add wx/bmpcbox.h to stdwx.h
 
62
#include <wx/bmpcbox.h>
 
63
#define CBOINCBitmapComboBox wxBitmapComboBox
 
64
#define EVT_BOINCBITMAPCOMBOBOX EVT_COMBOBOX
 
65
#endif
 
66
 
 
67
 
 
68
class CSimplePanelBase : public wxPanel 
 
69
{
 
70
    DECLARE_DYNAMIC_CLASS( CSimplePanelBase )
 
71
    DECLARE_EVENT_TABLE()
 
72
 
 
73
        public:
 
74
        CSimplePanelBase();
 
75
                CSimplePanelBase( wxWindow* parent);
 
76
                ~CSimplePanelBase();
 
77
 
 
78
    void ReskinInterface();
 
79
    virtual wxRect GetProgressRect() { return wxRect(0, 0, 0, 0); }
 
80
    void UpdateStaticText(CTransparentStaticText **whichText, wxString s);
 
81
    void EllipseStringIfNeeded(wxString& s, wxWindow *win);
 
82
 
 
83
        protected:
 
84
        void MakeBGBitMap();
 
85
        void OnPaint(wxPaintEvent& event);
 
86
 
 
87
        wxBitmap                    m_TaskPanelBGBitMap;
 
88
        bool                        m_GotBGBitMap;
 
89
};
 
90
 
 
91
#endif //__sg_PanelBase__