~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to clientgui/ViewWorkGrid.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Berkeley Open Infrastructure for Network Computing
2
 
// http://boinc.berkeley.edu
3
 
// Copyright (C) 2005 University of California
4
 
//
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.
9
 
//
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.
14
 
//
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
19
 
 
20
 
#ifndef _VIEWWORKGRID_H_
21
 
#define _VIEWWORKGRID_H_
22
 
 
23
 
#if defined(__GNUG__) && !defined(__APPLE__)
24
 
#pragma interface "ViewWorkGrid.cpp"
25
 
#endif
26
 
 
27
 
// Set to TRUE to prevent mutliple selections
28
 
#define PREVENT_MULTIPLE_TASK_SELECTIONS FALSE
29
 
 
30
 
#include "BOINCBaseView.h"
31
 
#include "BOINCGridCtrl.h"
32
 
 
33
 
class CViewWorkGrid : public CBOINCBaseView
34
 
{
35
 
    DECLARE_DYNAMIC_CLASS( CViewWorkGrid )
36
 
    DECLARE_EVENT_TABLE()
37
 
        
38
 
public:
39
 
    CViewWorkGrid();
40
 
    CViewWorkGrid(wxNotebook* pNotebook);
41
 
 
42
 
    ~CViewWorkGrid();
43
 
 
44
 
    virtual wxString&       GetViewName();
45
 
    virtual wxString&       GetViewDisplayName();
46
 
    virtual const char**    GetViewIcon();
47
 
 
48
 
    virtual wxInt32         GetDocCount();
49
 
 
50
 
    void                    OnWorkSuspend( wxCommandEvent& event );
51
 
    void                    OnWorkShowGraphics( wxCommandEvent& event );
52
 
    void                    OnWorkAbort( wxCommandEvent& event );
53
 
 
54
 
    void                    OnProjectWebsiteClicked( wxEvent& event );
55
 
 
56
 
protected:
57
 
#if PREVENT_MULTIPLE_TASK_SELECTIONS
58
 
    virtual void            OnCellLeftClick( wxGridEvent& event );
59
 
    virtual void            OnGridSelectRange( wxGridRangeSelectEvent& event );
60
 
#endif
61
 
    virtual void            UpdateSelection();
62
 
 
63
 
    virtual bool            OnSaveState( wxConfigBase* pConfig );
64
 
    virtual bool            OnRestoreState( wxConfigBase* pConfig );
65
 
    virtual void            OnListRender( wxTimerEvent& event );        
66
 
 
67
 
    wxInt32                 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
68
 
    wxInt32                 FormatApplicationName( wxInt32 item, wxString& strBuffer ) const;
69
 
    wxInt32                 FormatName( wxInt32 item, wxString& strBuffer ) const;
70
 
    wxInt32                 FormatCPUTime( wxInt32 item, wxString& strBuffer ) const;
71
 
    wxInt32                 FormatProgress( wxInt32 item, wxString& strBuffer ) const;
72
 
    wxInt32                 FormatTimeToCompletion( wxInt32 item, wxString& strBuffer ) const;
73
 
    wxInt32                 FormatReportDeadline( wxInt32 item, wxString& strBuffer ) const;
74
 
    wxInt32                 FormatStatus( wxInt32 item, wxString& strBuffer ) const;
75
 
    wxInt32                 FormatProjectURL( wxInt32 item, wxString& strBuffer ) const;
76
 
 
77
 
    void                    UpdateWebsiteSelection(long lControlGroup, PROJECT* project);
78
 
        
79
 
        CBOINCGridCtrl*                 m_pGridPane;
80
 
};
81
 
 
82
 
 
83
 
#endif
84