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 _VIEWWORKGRID_H_
21
#define _VIEWWORKGRID_H_
23
#if defined(__GNUG__) && !defined(__APPLE__)
24
#pragma interface "ViewWorkGrid.cpp"
27
// Set to TRUE to prevent mutliple selections
28
#define PREVENT_MULTIPLE_TASK_SELECTIONS FALSE
30
#include "BOINCBaseView.h"
31
#include "BOINCGridCtrl.h"
33
class CViewWorkGrid : public CBOINCBaseView
35
DECLARE_DYNAMIC_CLASS( CViewWorkGrid )
40
CViewWorkGrid(wxNotebook* pNotebook);
44
virtual wxString& GetViewName();
45
virtual wxString& GetViewDisplayName();
46
virtual const char** GetViewIcon();
48
virtual wxInt32 GetDocCount();
50
void OnWorkSuspend( wxCommandEvent& event );
51
void OnWorkShowGraphics( wxCommandEvent& event );
52
void OnWorkAbort( wxCommandEvent& event );
54
void OnProjectWebsiteClicked( wxEvent& event );
57
#if PREVENT_MULTIPLE_TASK_SELECTIONS
58
virtual void OnCellLeftClick( wxGridEvent& event );
59
virtual void OnGridSelectRange( wxGridRangeSelectEvent& event );
61
virtual void UpdateSelection();
63
virtual bool OnSaveState( wxConfigBase* pConfig );
64
virtual bool OnRestoreState( wxConfigBase* pConfig );
65
virtual void OnListRender( wxTimerEvent& event );
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;
77
void UpdateWebsiteSelection(long lControlGroup, PROJECT* project);
79
CBOINCGridCtrl* m_pGridPane;