2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2004-04-10 09:11:03 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2004-05-17 22:15:10 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2004-05-17 22:15:10 +00:00
|
|
|
|
2004-09-21 01:30:29 +00:00
|
|
|
#ifndef _BOINCBASEVIEW_H_
|
|
|
|
#define _BOINCBASEVIEW_H_
|
2004-04-11 04:37:10 +00:00
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2004-09-21 01:30:29 +00:00
|
|
|
#pragma interface "BOINCBaseView.cpp"
|
2004-04-11 04:37:10 +00:00
|
|
|
#endif
|
|
|
|
|
2010-03-12 01:20:24 +00:00
|
|
|
#define BASEVIEW_STRIPES 1
|
2011-06-09 00:44:59 +00:00
|
|
|
#define BASEVIEW_RULES 1
|
2010-03-05 07:04:58 +00:00
|
|
|
|
2008-12-02 01:24:32 +00:00
|
|
|
#define DEFAULT_TASK_FLAGS wxTAB_TRAVERSAL | wxADJUST_MINSIZE | wxFULL_REPAINT_ON_RESIZE
|
2010-03-05 07:04:58 +00:00
|
|
|
|
2010-03-12 08:33:00 +00:00
|
|
|
#if BASEVIEW_RULES
|
2010-03-04 15:46:37 +00:00
|
|
|
#define DEFAULT_LIST_SINGLE_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES | wxLC_SINGLE_SEL
|
|
|
|
#define DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES
|
2010-03-12 08:33:00 +00:00
|
|
|
#else
|
|
|
|
#define DEFAULT_LIST_SINGLE_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_SINGLE_SEL
|
|
|
|
#define DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL
|
2010-03-05 07:04:58 +00:00
|
|
|
#endif
|
2004-10-27 21:10:22 +00:00
|
|
|
|
2004-10-26 01:59:44 +00:00
|
|
|
|
2004-12-23 01:06:41 +00:00
|
|
|
class CBOINCTaskCtrl;
|
|
|
|
class CBOINCListCtrl;
|
2012-02-08 01:53:19 +00:00
|
|
|
struct PROJECT;
|
2006-01-09 14:03:13 +00:00
|
|
|
|
2004-12-23 01:06:41 +00:00
|
|
|
|
2005-04-10 19:01:23 +00:00
|
|
|
class CTaskItem : wxObject {
|
2005-04-08 06:24:58 +00:00
|
|
|
public:
|
2005-04-20 22:22:41 +00:00
|
|
|
CTaskItem();
|
|
|
|
CTaskItem( wxString strName, wxString strDescription, wxInt32 iEventID ) :
|
2005-11-04 01:35:57 +00:00
|
|
|
m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
|
|
|
|
m_pButton(NULL), m_strWebSiteLink(wxT("")) {};
|
2005-04-27 06:32:40 +00:00
|
|
|
CTaskItem( wxString strName, wxString strDescription, wxString strWebSiteLink, wxInt32 iEventID ) :
|
2005-11-04 01:35:57 +00:00
|
|
|
m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
|
|
|
|
m_pButton(NULL), m_strWebSiteLink(strWebSiteLink) {};
|
2005-04-20 22:22:41 +00:00
|
|
|
~CTaskItem() {};
|
|
|
|
|
|
|
|
wxString m_strName;
|
2012-01-25 11:51:31 +00:00
|
|
|
wxString m_strNameEllipsed;
|
2005-04-20 22:22:41 +00:00
|
|
|
wxString m_strDescription;
|
|
|
|
wxInt32 m_iEventID;
|
|
|
|
|
2008-06-27 04:34:47 +00:00
|
|
|
wxButton* m_pButton;
|
2005-04-21 23:14:10 +00:00
|
|
|
wxString m_strWebSiteLink;
|
2005-04-20 22:22:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CTaskItemGroup : wxObject {
|
|
|
|
public:
|
|
|
|
CTaskItemGroup();
|
|
|
|
CTaskItemGroup( wxString strName ) :
|
2009-11-25 12:43:22 +00:00
|
|
|
m_strName(strName), m_pStaticBox(NULL), m_pStaticBoxSizer(NULL) {
|
|
|
|
m_Tasks.clear();
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
m_pTaskGroupAccessibilityEventHandlerRef = NULL;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
~CTaskItemGroup() {
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
RemoveMacAccessibilitySupport();
|
|
|
|
#endif
|
|
|
|
};
|
2005-04-21 22:21:54 +00:00
|
|
|
wxButton* button(int i) {return m_Tasks[i]->m_pButton;}
|
2005-04-20 22:22:41 +00:00
|
|
|
|
|
|
|
wxString m_strName;
|
|
|
|
|
|
|
|
wxStaticBox* m_pStaticBox;
|
|
|
|
wxStaticBoxSizer* m_pStaticBoxSizer;
|
|
|
|
|
2009-11-25 12:43:22 +00:00
|
|
|
std::vector<CTaskItem*> m_Tasks;
|
|
|
|
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
void SetupMacAccessibilitySupport();
|
|
|
|
void RemoveMacAccessibilitySupport();
|
|
|
|
|
|
|
|
private:
|
|
|
|
EventHandlerRef m_pTaskGroupAccessibilityEventHandlerRef;
|
|
|
|
#endif
|
2005-04-08 06:24:58 +00:00
|
|
|
};
|
|
|
|
|
2008-07-08 15:13:34 +00:00
|
|
|
typedef bool (*ListSortCompareFunc)(int, int);
|
2008-06-26 01:25:31 +00:00
|
|
|
|
2005-04-20 22:22:41 +00:00
|
|
|
|
2012-01-06 23:37:40 +00:00
|
|
|
class CBOINCBaseView : public wxPanel {
|
2004-09-21 01:30:29 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS( CBOINCBaseView )
|
2004-04-10 09:11:03 +00:00
|
|
|
|
|
|
|
public:
|
2004-12-02 07:43:47 +00:00
|
|
|
|
2004-09-21 01:30:29 +00:00
|
|
|
CBOINCBaseView();
|
2004-10-27 21:10:22 +00:00
|
|
|
CBOINCBaseView(
|
2005-09-06 06:18:36 +00:00
|
|
|
wxNotebook* pNotebook
|
2005-07-21 09:43:40 +00:00
|
|
|
);
|
|
|
|
CBOINCBaseView(
|
|
|
|
wxNotebook* pNotebook,
|
2005-04-20 22:22:41 +00:00
|
|
|
wxWindowID iTaskWindowID,
|
|
|
|
int iTaskWindowFlags,
|
2004-10-27 21:10:22 +00:00
|
|
|
wxWindowID iListWindowID,
|
2005-04-21 06:04:26 +00:00
|
|
|
int iListWindowFlags
|
2004-10-27 21:10:22 +00:00
|
|
|
);
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2004-09-21 01:30:29 +00:00
|
|
|
~CBOINCBaseView();
|
2004-04-10 09:11:03 +00:00
|
|
|
|
2005-09-02 21:03:36 +00:00
|
|
|
virtual wxString& GetViewName();
|
- fixes #207 - HTML entities in BOINC Manager have to be decoded
BOINC Manager can now properly decode HTML entites for the
following elements:
Projects Tab:
Project Name
User Name
Team Name
Work Tab:
Project Name
Application Name
Transfers Tab:
Project Name
Messages Tab:
Project Name
Disk Tab:
Project Name
- fixes #212 - Info in columns misaligned on switching views
- Properly restore which tab view the user left from when going
to the advanced view from the simple view
- Fix the problem that caused the manager to wait for 7 seconds
to display anything on initial startup.
- Store the various Grid/List persisted data seperately so that
the different header sizes don't cause problems.
clientgui/
AdvancedFrame.cpp
BOINCBaseView.cpp, .h
BOINCGridCtrl.cpp
ViewMessages.cpp, .h
ViewMessagesGrid.cpp, .h
ViewProjects.cpp, .h
ViewProjectsGrid.cpp, .h
ViewResources.cpp, .h
ViewStatistics.cpp, .h
ViewTransfers.cpp, .h
ViewTransfersGrid.cpp, .h
ViewWork.cpp, .h
ViewWorkGrid.cpp, .h
lib/
gui_rpc_client_ops.C
svn path=/trunk/boinc/; revision=12761
2007-05-29 05:07:35 +00:00
|
|
|
virtual wxString& GetViewDisplayName();
|
2005-04-06 20:40:19 +00:00
|
|
|
virtual const char** GetViewIcon();
|
2006-12-29 16:35:33 +00:00
|
|
|
virtual const int GetViewRefreshRate();
|
2009-12-22 01:22:11 +00:00
|
|
|
virtual const int GetViewCurrentViewPage();
|
|
|
|
|
2008-09-04 13:00:24 +00:00
|
|
|
virtual wxString GetKeyValue1(int iRowIndex);
|
|
|
|
virtual wxString GetKeyValue2(int iRowIndex);
|
|
|
|
virtual int FindRowIndexByKeyValues(wxString& key1, wxString& key2);
|
2004-07-13 05:56:03 +00:00
|
|
|
|
2004-12-02 07:43:47 +00:00
|
|
|
bool FireOnSaveState( wxConfigBase* pConfig );
|
|
|
|
bool FireOnRestoreState( wxConfigBase* pConfig );
|
2005-04-20 22:22:41 +00:00
|
|
|
|
|
|
|
virtual int GetListRowCount();
|
|
|
|
void FireOnListRender( wxTimerEvent& event );
|
2004-12-02 07:43:47 +00:00
|
|
|
void FireOnListSelected( wxListEvent& event );
|
|
|
|
void FireOnListDeselected( wxListEvent& event );
|
|
|
|
wxString FireOnListGetItemText( long item, long column ) const;
|
|
|
|
int FireOnListGetItemImage( long item ) const;
|
2010-03-05 07:04:58 +00:00
|
|
|
#if BASEVIEW_STRIPES
|
|
|
|
wxListItemAttr* FireOnListGetItemAttr( long item ) const;
|
|
|
|
#endif
|
|
|
|
|
2008-06-24 10:52:12 +00:00
|
|
|
int GetProgressColumn() { return m_iProgressColumn; }
|
|
|
|
virtual double GetProgressValue(long item);
|
2008-10-06 11:33:28 +00:00
|
|
|
virtual wxString GetProgressText( long item);
|
2004-12-02 07:43:47 +00:00
|
|
|
|
2008-06-26 11:49:43 +00:00
|
|
|
void InitSort();
|
2008-09-04 13:00:24 +00:00
|
|
|
|
|
|
|
void SaveSelections();
|
|
|
|
void RestoreSelections();
|
|
|
|
void ClearSavedSelections();
|
|
|
|
void ClearSelections();
|
2008-12-05 01:13:16 +00:00
|
|
|
void RefreshTaskPane();
|
2009-10-29 11:13:48 +00:00
|
|
|
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
CBOINCListCtrl* GetListCtrl() { return m_pListPane; }
|
|
|
|
#endif
|
2008-11-12 09:30:22 +00:00
|
|
|
|
2005-04-20 22:22:41 +00:00
|
|
|
std::vector<CTaskItemGroup*> m_TaskGroups;
|
2005-04-06 20:40:19 +00:00
|
|
|
|
2008-06-25 13:12:39 +00:00
|
|
|
int m_iSortColumn;
|
|
|
|
bool m_bReverseSort;
|
|
|
|
|
2008-09-04 13:00:24 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
wxArrayString m_arrSelectedKeys1; //array for remembering the current selected rows by primary key column value
|
|
|
|
wxArrayString m_arrSelectedKeys2; //array for remembering the current selected rows by secondary key column value
|
|
|
|
|
2004-12-02 07:43:47 +00:00
|
|
|
protected:
|
|
|
|
|
2004-09-21 01:30:29 +00:00
|
|
|
virtual bool OnSaveState( wxConfigBase* pConfig );
|
|
|
|
virtual bool OnRestoreState( wxConfigBase* pConfig );
|
|
|
|
|
2005-04-20 22:22:41 +00:00
|
|
|
virtual void OnListRender( wxTimerEvent& event );
|
2004-09-24 02:01:53 +00:00
|
|
|
virtual void OnListSelected( wxListEvent& event );
|
|
|
|
virtual void OnListDeselected( wxListEvent& event );
|
2008-06-27 04:34:47 +00:00
|
|
|
virtual void OnCacheHint(wxListEvent& event);
|
2004-09-24 02:01:53 +00:00
|
|
|
virtual wxString OnListGetItemText( long item, long column ) const;
|
|
|
|
virtual int OnListGetItemImage( long item ) const;
|
2004-07-13 05:56:03 +00:00
|
|
|
|
2008-06-26 01:25:31 +00:00
|
|
|
void OnColClick(wxListEvent& event);
|
|
|
|
|
2005-04-20 22:22:41 +00:00
|
|
|
virtual int GetDocCount();
|
2004-12-02 07:43:47 +00:00
|
|
|
virtual wxString OnDocGetItemImage( long item ) const;
|
|
|
|
virtual wxString OnDocGetItemAttr( long item ) const;
|
|
|
|
|
2005-04-20 22:22:41 +00:00
|
|
|
virtual int AddCacheElement();
|
|
|
|
virtual int EmptyCache();
|
|
|
|
virtual int GetCacheCount();
|
|
|
|
virtual int RemoveCacheElement();
|
2008-06-25 10:38:16 +00:00
|
|
|
virtual int SynchronizeCache();
|
|
|
|
virtual bool SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
|
2008-06-26 01:25:31 +00:00
|
|
|
void sortData();
|
2004-09-24 02:01:53 +00:00
|
|
|
|
2005-04-27 06:32:40 +00:00
|
|
|
virtual void EmptyTasks();
|
|
|
|
|
2006-01-09 14:03:13 +00:00
|
|
|
virtual void PreUpdateSelection();
|
2005-04-20 22:22:41 +00:00
|
|
|
virtual void UpdateSelection();
|
2006-01-09 14:03:13 +00:00
|
|
|
virtual void PostUpdateSelection();
|
|
|
|
|
|
|
|
virtual void UpdateWebsiteSelection(long lControlGroup, PROJECT* project);
|
2004-12-02 07:43:47 +00:00
|
|
|
|
- client: include precompiled header in rr_sim.cpp so memory
leak detection will work.
- MGR: Have the BaseFrame call a function to determine if the
selection list should be saved instead of traversing
the application pointer. Each view just overrides the function
returning a true/false value. We don't have to worry about null
pointers and the like.
- MGR: BOINCGUIApp should never need to know how either the views
work or the document. Move the code that determines which
RPCs should be fired into each of the views. Have the document
look for it there.
- MGR: Reduce duplicate code for hiding and showing an application
- MGR: Move some Windows and Mac specific code into functions
and streamline the application startup and shutdown rountines.
- MGR: Move the event processing that was in BOINCGUIApp into the
BaseFrame.
- MGR: General cleanup.
- MGR: Doxygen comments.
- MGR: Cleanup some warnings.
client/
rr_sim.cpp
clientgui/
AdvancedFrame.cpp, .h
AsyncRPC.cpp, .h
BOINCBaseFrame.cpp, .h
BOINCBaseView.cpp, .h
BOINCClientManager.cpp
BOINCGUIApp.cpp, .h
BOINCTaskBar.cpp
MainDocument.cpp, .h
sg_BoincSimpleGUI.cpp, .h
ViewProjects.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h
WelcomePage.cpp
win_build/installerv2/
BOINC.ism
BOINCx64.ism
win_build/
sim.vcproj
svn path=/trunk/boinc/; revision=16357
2008-10-29 22:44:55 +00:00
|
|
|
|
2008-10-30 01:55:11 +00:00
|
|
|
bool _IsSelectionManagementNeeded();
|
|
|
|
virtual bool IsSelectionManagementNeeded();
|
- client: include precompiled header in rr_sim.cpp so memory
leak detection will work.
- MGR: Have the BaseFrame call a function to determine if the
selection list should be saved instead of traversing
the application pointer. Each view just overrides the function
returning a true/false value. We don't have to worry about null
pointers and the like.
- MGR: BOINCGUIApp should never need to know how either the views
work or the document. Move the code that determines which
RPCs should be fired into each of the views. Have the document
look for it there.
- MGR: Reduce duplicate code for hiding and showing an application
- MGR: Move some Windows and Mac specific code into functions
and streamline the application startup and shutdown rountines.
- MGR: Move the event processing that was in BOINCGUIApp into the
BaseFrame.
- MGR: General cleanup.
- MGR: Doxygen comments.
- MGR: Cleanup some warnings.
client/
rr_sim.cpp
clientgui/
AdvancedFrame.cpp, .h
AsyncRPC.cpp, .h
BOINCBaseFrame.cpp, .h
BOINCBaseView.cpp, .h
BOINCClientManager.cpp
BOINCGUIApp.cpp, .h
BOINCTaskBar.cpp
MainDocument.cpp, .h
sg_BoincSimpleGUI.cpp, .h
ViewProjects.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h
WelcomePage.cpp
win_build/installerv2/
BOINC.ism
BOINCx64.ism
win_build/
sim.vcproj
svn path=/trunk/boinc/; revision=16357
2008-10-29 22:44:55 +00:00
|
|
|
|
2005-01-29 00:58:43 +00:00
|
|
|
bool _EnsureLastItemVisible();
|
2004-12-02 07:43:47 +00:00
|
|
|
virtual bool EnsureLastItemVisible();
|
|
|
|
|
2005-06-13 08:47:51 +00:00
|
|
|
static void append_to_status(wxString& existing, const wxChar* additional);
|
2008-06-25 13:12:39 +00:00
|
|
|
static wxString HtmlEntityEncode(wxString strRaw);
|
|
|
|
static wxString HtmlEntityDecode(wxString strRaw);
|
2005-06-13 08:47:51 +00:00
|
|
|
|
2010-03-05 07:04:58 +00:00
|
|
|
#if BASEVIEW_STRIPES
|
|
|
|
virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
|
|
|
|
|
|
|
|
wxListItemAttr* m_pWhiteBackgroundAttr;
|
|
|
|
wxListItemAttr* m_pGrayBackgroundAttr;
|
|
|
|
#endif
|
|
|
|
|
2004-09-25 21:33:24 +00:00
|
|
|
bool m_bProcessingTaskRenderEvent;
|
|
|
|
bool m_bProcessingListRenderEvent;
|
2004-10-26 01:59:44 +00:00
|
|
|
|
2008-12-04 11:39:51 +00:00
|
|
|
bool m_bForceUpdateSelection;
|
2008-03-18 18:19:49 +00:00
|
|
|
bool m_bIgnoreUIEvents;
|
2008-10-29 10:24:45 +00:00
|
|
|
bool m_bNeedSort;
|
2008-06-24 10:52:12 +00:00
|
|
|
|
|
|
|
int m_iProgressColumn;
|
2005-07-22 20:19:58 +00:00
|
|
|
|
2008-06-26 01:25:31 +00:00
|
|
|
wxImageList * m_SortArrows;
|
|
|
|
ListSortCompareFunc m_funcSortCompare;
|
|
|
|
wxArrayInt m_iSortedIndexes;
|
|
|
|
|
2004-09-21 01:30:29 +00:00
|
|
|
CBOINCTaskCtrl* m_pTaskPane;
|
|
|
|
CBOINCListCtrl* m_pListPane;
|
2004-04-10 09:11:03 +00:00
|
|
|
};
|
2004-04-11 04:37:10 +00:00
|
|
|
|
|
|
|
|
2004-04-11 05:09:18 +00:00
|
|
|
#endif
|
|
|
|
|