From 492536cafe5b8fc686cfeb764f2656589af14194 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 21 Sep 2004 01:30:29 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4212 --- checkin_notes | 13 +- clientgui/BOINCBaseView.cpp | 195 ++++++++++++ clientgui/{WorkView.h => BOINCBaseView.h} | 54 ++-- clientgui/BOINCGUI.vcproj | 93 +++--- clientgui/BOINCGUIApp.cpp | 10 + clientgui/BOINCListCtrl.cpp | 246 +++++++++++++++ clientgui/BOINCListCtrl.h | 73 +++++ clientgui/BOINCTaskCtrl.cpp | 293 ++++++++++++++++++ clientgui/BOINCTaskCtrl.h | 92 ++++++ clientgui/BaseListCtrlView.cpp | 203 ------------ clientgui/BaseListCtrlView.h | 70 ----- clientgui/Events.h | 8 + clientgui/MainFrame.cpp | 164 +++++----- clientgui/MessagesView.h | 88 ------ clientgui/ProjectsView.cpp | 171 ---------- clientgui/ResourceUtilizationView.cpp | 143 --------- clientgui/ResourceUtilizationView.h | 87 ------ clientgui/TransfersView.h | 87 ------ .../{MessagesView.cpp => ViewMessages.cpp} | 96 +++--- clientgui/{ProjectsView.h => ViewMessages.h} | 43 +-- clientgui/ViewProjects.cpp | 215 +++++++++++++ clientgui/ViewProjects.h | 68 ++++ clientgui/ViewResources.cpp | 89 ++++++ clientgui/{URLValidator.h => ViewResources.h} | 35 ++- .../{TransfersView.cpp => ViewTransfers.cpp} | 94 +++--- clientgui/ViewTransfers.h | 66 ++++ clientgui/{WorkView.cpp => ViewWork.cpp} | 94 +++--- clientgui/{URLValidator.cpp => ViewWork.h} | 57 ++-- clientgui/res/hiddenheader.xpm | 63 ++++ clientgui/res/task.xpm | 54 ++++ clientgui/res/tips.xpm | 25 ++ clientgui/res/visibleheader.xpm | 63 ++++ clientgui/res/web.xpm | 82 +++++ clientgui/stdwx.h | 45 +-- 34 files changed, 2035 insertions(+), 1244 deletions(-) create mode 100644 clientgui/BOINCBaseView.cpp rename clientgui/{WorkView.h => BOINCBaseView.h} (55%) create mode 100644 clientgui/BOINCListCtrl.cpp create mode 100644 clientgui/BOINCListCtrl.h create mode 100644 clientgui/BOINCTaskCtrl.cpp create mode 100644 clientgui/BOINCTaskCtrl.h delete mode 100644 clientgui/BaseListCtrlView.cpp delete mode 100644 clientgui/BaseListCtrlView.h delete mode 100644 clientgui/MessagesView.h delete mode 100644 clientgui/ProjectsView.cpp delete mode 100644 clientgui/ResourceUtilizationView.cpp delete mode 100644 clientgui/ResourceUtilizationView.h delete mode 100644 clientgui/TransfersView.h rename clientgui/{MessagesView.cpp => ViewMessages.cpp} (51%) rename clientgui/{ProjectsView.h => ViewMessages.h} (60%) create mode 100644 clientgui/ViewProjects.cpp create mode 100644 clientgui/ViewProjects.h create mode 100644 clientgui/ViewResources.cpp rename clientgui/{URLValidator.h => ViewResources.h} (63%) rename clientgui/{TransfersView.cpp => ViewTransfers.cpp} (57%) create mode 100644 clientgui/ViewTransfers.h rename clientgui/{WorkView.cpp => ViewWork.cpp} (58%) rename clientgui/{URLValidator.cpp => ViewWork.h} (60%) create mode 100644 clientgui/res/hiddenheader.xpm create mode 100644 clientgui/res/task.xpm create mode 100644 clientgui/res/tips.xpm create mode 100644 clientgui/res/visibleheader.xpm create mode 100644 clientgui/res/web.xpm diff --git a/checkin_notes b/checkin_notes index bedd86a7e6..58b3aabaa4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -17484,5 +17484,16 @@ David 20 Sept 2004 show_user.php Lana 20 Sept 2004 - - Fixed create_work bug. Copy input text files to the download directories tools/ + - Fixed create_work bug. Copy input text files to the download directories + + tools/ backend_lib.C + +Rom 20 Sept 2004 + - NEWGUI: Refactor all view logic to accommodate the new task based interface. + - NEWGUI: Add the new projects task pane. + - NEWGUI: Stub the other tabs. + - NEWGUI: Include new visuals for the task based UI. + + clientgui/ + diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp new file mode 100644 index 0000000000..2d3b192573 --- /dev/null +++ b/clientgui/BOINCBaseView.cpp @@ -0,0 +1,195 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:24 rwalton +// *** empty log message *** +// +// + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "BOINCBaseView.h" +#endif + +#include "stdwx.h" +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "BOINCListCtrl.h" +#include "res/boinc.xpm" + + +IMPLEMENT_DYNAMIC_CLASS(CBOINCBaseView, wxPanel) + + +CBOINCBaseView::CBOINCBaseView() +{ + wxLogTrace("CBOINCBaseView::CBOINCBaseView - Function Begining"); + wxLogTrace("CBOINCBaseView::CBOINCBaseView - Function Ending"); +} + + +CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook, wxWindowID iHtmlWindowID, wxWindowID iListWindowID) : + wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL) +{ + wxLogTrace("CBOINCBaseView::CBOINCBaseView - Function Begining"); + wxASSERT(NULL != pNotebook); + + wxFlexGridSizer* itemFlexGridSizer = new wxFlexGridSizer(2, 0, 0); + wxASSERT(NULL != itemFlexGridSizer); + + itemFlexGridSizer->AddGrowableRow(0); + itemFlexGridSizer->AddGrowableCol(1); + + SetSizer(itemFlexGridSizer); + SetAutoLayout(TRUE); + + m_pTaskPane = new CBOINCTaskCtrl(this, iHtmlWindowID); + wxASSERT(NULL != m_pTaskPane); + + m_pListPane = new CBOINCListCtrl(this, iListWindowID); + wxASSERT(NULL != m_pListPane); + + itemFlexGridSizer->Add(m_pTaskPane, 0, wxGROW|wxGROW|wxALL, 1); + itemFlexGridSizer->Add(m_pListPane, 0, wxGROW|wxGROW|wxALL, 1); + + wxLogTrace("CBOINCBaseView::CBOINCBaseView - Function Ending"); +} + + +CBOINCBaseView::~CBOINCBaseView() +{ + wxLogTrace("CBOINCBaseView::~CBOINCBaseView - Function Begining"); + wxLogTrace("CBOINCBaseView::~CBOINCBaseView - Function Ending"); +} + + +// The user friendly name of the view. +// If it has not been defined by the view "Undefined" is returned. +// +wxString CBOINCBaseView::GetViewName() +{ + wxLogTrace("CBOINCBaseView::GetViewName - Function Begining"); + wxLogTrace("CBOINCBaseView::GetViewName - Function Ending"); + return wxString(_T("Undefined")); +} + + +// The user friendly icon of the view. +// If it has not been defined by the view the BOINC icon is returned. +// +char** CBOINCBaseView::GetViewIcon() +{ + wxLogTrace("CBOINCBaseView::GetViewIcon - Function Begining"); + + wxASSERT(NULL != boinc_xpm); + + wxLogTrace("CBOINCBaseView::GetViewIcon - Function Ending"); + return boinc_xpm; +} + + +void CBOINCBaseView::UpdateTaskPane() +{ + wxLogTrace("CBOINCBaseView::UpdateTaskPane - Function Begining"); + wxLogTrace("CBOINCBaseView::UpdateTaskPane - Function Ending"); +} + + +void CBOINCBaseView::OnRender (wxTimerEvent& event) +{ + wxLogTrace("CBOINCBaseView::OnRender - Function Begining"); + wxLogTrace("CBOINCBaseView::OnRender - Function Ending"); +} + + +bool CBOINCBaseView::OnSaveState( wxConfigBase* pConfig ) +{ + wxLogTrace("CBOINCBaseView::OnSaveState - Function Begining"); + + bool bReturnValue = true; + + wxASSERT(NULL != pConfig); + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + + if (!m_pTaskPane->OnSaveState( pConfig )) + bReturnValue = false; + + if (!m_pListPane->OnSaveState( pConfig )) + bReturnValue = false; + + wxLogTrace("CBOINCBaseView::OnSaveState - Function Ending"); + return bReturnValue; +} + + +bool CBOINCBaseView::OnRestoreState( wxConfigBase* pConfig ) { + wxLogTrace("CBOINCBaseView::OnRestoreState - Function Begining"); + + bool bReturnValue = true; + + wxASSERT(NULL != pConfig); + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + + if (!m_pTaskPane->OnRestoreState( pConfig )) + bReturnValue = false; + + if (!m_pListPane->OnRestoreState( pConfig )) + bReturnValue = false; + + wxLogTrace("CBOINCBaseView::OnRestoreState - Function Ending"); + return bReturnValue; +} + + +void CBOINCBaseView::OnCacheHint ( wxListEvent& event ) +{ + m_iCacheFrom = event.GetCacheFrom(); + m_iCacheTo = event.GetCacheTo(); +} + + +wxString CBOINCBaseView::OnGetItemText(long item, long column) const +{ + return wxString("Undefined"); +} + + +int CBOINCBaseView::OnGetItemImage(long item) const +{ + return -1; +} + + +wxListItemAttr* CBOINCBaseView::OnGetItemAttr(long item) const +{ + return NULL; +} + + +void CBOINCBaseView::OnLinkClicked( const wxHtmlLinkInfo& link ) +{ + wxLogTrace("CBOINCBaseView::OnLinkClicked - Function Begining"); + wxLogTrace("CBOINCBaseView::OnLinkClicked - Function Ending"); +} + diff --git a/clientgui/WorkView.h b/clientgui/BOINCBaseView.h similarity index 55% rename from clientgui/WorkView.h rename to clientgui/BOINCBaseView.h index 945b15eba7..34a46b6012 100644 --- a/clientgui/WorkView.h +++ b/clientgui/BOINCBaseView.h @@ -21,61 +21,55 @@ // Revision History: // // $Log$ -// Revision 1.10 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.9 2004/05/29 00:09:41 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/27 06:17:58 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:10 rwalton +// Revision 1.1 2004/09/21 01:26:24 rwalton // *** empty log message *** // // -#ifndef _WORKVIEW_H_ -#define _WORKVIEW_H_ +#ifndef _BOINCBASEVIEW_H_ +#define _BOINCBASEVIEW_H_ #if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "WorkView.cpp" +#pragma interface "BOINCBaseView.cpp" #endif -#include "BaseListCtrlView.h" +class CBOINCTaskCtrl; +class CBOINCListCtrl; -class CWorkView : public CBaseListCtrlView +class CBOINCBaseView : public wxPanel { - DECLARE_DYNAMIC_CLASS(CWorkView) + DECLARE_DYNAMIC_CLASS( CBOINCBaseView ) public: - CWorkView(); - CWorkView(wxNotebook* pNotebook); + CBOINCBaseView(); + CBOINCBaseView(wxNotebook* pNotebook, wxWindowID iHtmlWindowID, wxWindowID iListWindowID); - ~CWorkView(); + ~CBOINCBaseView(); virtual wxString GetViewName(); virtual char** GetViewIcon(); - virtual void OnRender(wxTimerEvent &event); - virtual void OnCacheHint( wxListEvent& event ); + virtual void UpdateTaskPane(); -private: + virtual void OnRender( wxTimerEvent& event ); + virtual bool OnSaveState( wxConfigBase* pConfig ); + virtual bool OnRestoreState( wxConfigBase* pConfig ); + + virtual void OnCacheHint( wxListEvent& event ); + virtual wxString OnGetItemText( long item, long column ) const; + virtual int OnGetItemImage( long item ) const; + virtual wxListItemAttr* OnGetItemAttr( long item ) const; + + virtual void OnLinkClicked( const wxHtmlLinkInfo& link ); bool m_bProcessingRenderEvent; wxInt32 m_iCacheFrom; wxInt32 m_iCacheTo; - virtual wxString OnGetItemText(long item, long column) const; - virtual int OnGetItemImage(long item) const; - virtual wxListItemAttr* OnGetItemAttr(long item) const; + CBOINCTaskCtrl* m_pTaskPane; + CBOINCListCtrl* m_pListPane; - - DECLARE_EVENT_TABLE() }; diff --git a/clientgui/BOINCGUI.vcproj b/clientgui/BOINCGUI.vcproj index 8b088493fe..05920a12a6 100644 --- a/clientgui/BOINCGUI.vcproj +++ b/clientgui/BOINCGUI.vcproj @@ -141,11 +141,17 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + RelativePath=".\BOINCBaseView.cpp"> + + + + @@ -210,9 +216,6 @@ - - - - - - - - - - + RelativePath=".\ViewMessages.cpp"> + + + + + + + + - - + + + + + + @@ -382,9 +391,6 @@ - - @@ -394,29 +400,29 @@ - - - - - - - - + RelativePath=".\ViewMessages.h"> + + + + + + + + + + @@ -447,9 +456,21 @@ + + + + + + + + diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index 92fc43a380..5dfb387938 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -21,6 +21,9 @@ // Revision History: // // $Log$ +// Revision 1.9 2004/09/21 01:26:23 rwalton +// *** empty log message *** +// // Revision 1.8 2004/05/27 06:17:57 rwalton // *** empty log message *** // @@ -56,6 +59,13 @@ bool CBOINCGUIApp::OnInit() if (!Inherited::OnInit()) return false; + // Enable image types we use for the task panes + wxImage::AddHandler(new wxXPMHandler); + + // Enable the in memory virtual file system for + // storing images + wxFileSystem::AddHandler(new wxMemoryFSHandler); + // Initialize the internationalization module m_pLocale = new wxLocale(); wxASSERT(NULL != m_pLocale); diff --git a/clientgui/BOINCListCtrl.cpp b/clientgui/BOINCListCtrl.cpp new file mode 100644 index 0000000000..b62790f7c5 --- /dev/null +++ b/clientgui/BOINCListCtrl.cpp @@ -0,0 +1,246 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:24 rwalton +// *** empty log message *** +// +// + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "BOINCListCtrl.h" +#endif + +#include "stdwx.h" +#include "BOINCBaseView.h" +#include "BOINCListCtrl.h" +#include "ViewProjects.h" +#include "ViewWork.h" +#include "ViewTransfers.h" +#include "ViewMessages.h" +#include "ViewResources.h" + + +IMPLEMENT_DYNAMIC_CLASS(CBOINCListCtrl, wxListView) + + +CBOINCListCtrl::CBOINCListCtrl() +{ + wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Begining"); + wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Ending"); +} + + +CBOINCListCtrl::CBOINCListCtrl( CBOINCBaseView* pView, wxWindowID iListWindowID ) : + wxListView( pView, iListWindowID, wxDefaultPosition, wxSize(-1, -1), wxLC_REPORT | wxLC_VIRTUAL, wxDefaultValidator ) +{ + wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Begining"); + + m_pParentView = pView; + + wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Ending"); +} + + +CBOINCListCtrl::~CBOINCListCtrl() +{ + wxLogTrace("CBOINCListCtrl::~CBOINCListCtrl - Function Begining"); + wxLogTrace("CBOINCListCtrl::~CBOINCListCtrl - Function Ending"); +} + + +void CBOINCListCtrl::OnRender ( wxTimerEvent& event ) { + wxLogTrace("CBOINCListCtrl::OnRender - Function Begining"); + wxLogTrace("CBOINCListCtrl::OnRender - Function Ending"); +} + + +bool CBOINCListCtrl::OnSaveState( wxConfigBase* pConfig ) { + wxLogTrace("CBOINCListCtrl::OnSaveState - Function Begining"); + + wxString strBaseConfigLocation = wxString(_T("")); + wxListItem liColumnInfo; + wxInt32 iIndex = 0; + wxInt32 iColumnCount = 0; + + + wxASSERT(NULL != pConfig); + + + // Retrieve the base location to store configuration information + // Should be in the following form: "/Projects/" + strBaseConfigLocation = pConfig->GetPath() + "/"; + + // Convert to a zero based index + iColumnCount = GetColumnCount() - 1; + + // Which fields are we interested in? + liColumnInfo.SetMask( wxLIST_MASK_TEXT | + wxLIST_MASK_WIDTH | + wxLIST_MASK_FORMAT ); + + // Cycle through the columns recording anything interesting + for ( iIndex = 0; iIndex <= iColumnCount; iIndex++ ) { + + GetColumn(iIndex, liColumnInfo); + + pConfig->SetPath(strBaseConfigLocation + liColumnInfo.GetText()); + + pConfig->Write(_T("Width"), liColumnInfo.GetWidth()); + pConfig->Write(_T("Format"), liColumnInfo.GetAlign()); + + } + + + wxLogTrace("CBOINCListCtrl::OnSaveState - Function Ending"); + return true; +} + + +bool CBOINCListCtrl::OnRestoreState( wxConfigBase* pConfig ) { + wxLogTrace("CBOINCListCtrl::OnRestoreState - Function Begining"); + + wxString strBaseConfigLocation = wxString(_T("")); + wxListItem liColumnInfo; + wxInt32 iIndex = 0; + wxInt32 iColumnCount = 0; + wxInt32 iTempValue = 0; + + + wxASSERT(NULL != pConfig); + + + // Retrieve the base location to store configuration information + // Should be in the following form: "/Projects/" + strBaseConfigLocation = pConfig->GetPath() + "/"; + + // Convert to a zero based index + iColumnCount = GetColumnCount() - 1; + + // Which fields are we interested in? + liColumnInfo.SetMask( wxLIST_MASK_TEXT | + wxLIST_MASK_WIDTH | + wxLIST_MASK_FORMAT ); + + // Cycle through the columns recording anything interesting + for ( iIndex = 0; iIndex <= iColumnCount; iIndex++ ) { + + GetColumn(iIndex, liColumnInfo); + + pConfig->SetPath(strBaseConfigLocation + liColumnInfo.GetText()); + + pConfig->Read(_T("Width"), &iTempValue, 80); + liColumnInfo.SetWidth(iTempValue); + + pConfig->Read(_T("Format"), &iTempValue, 0); + liColumnInfo.SetAlign((wxListColumnFormat)iTempValue); + + SetColumn(iIndex, liColumnInfo); + + } + + + wxLogTrace("CBOINCListCtrl::OnRestoreState - Function Ending"); + return true; +} + + +wxString CBOINCListCtrl::OnGetItemText( long item, long column ) const +{ + wxASSERT(NULL != m_pParentView); + wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView)); + + if (wxDynamicCast(m_pParentView, CViewProjects)) { + return FireOnGetItemTextEvent(wxDynamicCast(m_pParentView, CViewProjects), item, column); + } else if (wxDynamicCast(m_pParentView, CViewWork)) { + return FireOnGetItemTextEvent(wxDynamicCast(m_pParentView, CViewWork), item, column); + } else if (wxDynamicCast(m_pParentView, CViewTransfers)) { + return FireOnGetItemTextEvent(wxDynamicCast(m_pParentView, CViewTransfers), item, column); + } else if (wxDynamicCast(m_pParentView, CViewMessages)) { + return FireOnGetItemTextEvent(wxDynamicCast(m_pParentView, CViewMessages), item, column); + } else if (wxDynamicCast(m_pParentView, CViewResources)) { + return FireOnGetItemTextEvent(wxDynamicCast(m_pParentView, CViewResources), item, column); + } + return FireOnGetItemTextEvent(wxDynamicCast(m_pParentView, CBOINCBaseView), item, column); +} + + +template < class T > +wxString CBOINCListCtrl::FireOnGetItemTextEvent( T pView, long item, long column) const +{ + return pView->OnGetItemText( item, column ); +} + + +int CBOINCListCtrl::OnGetItemImage( long item ) const +{ + wxASSERT(NULL != m_pParentView); + wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView)); + + if (wxDynamicCast(m_pParentView, CViewProjects)) { + return FireOnGetItemImageEvent(wxDynamicCast(m_pParentView, CViewProjects), item); + } else if (wxDynamicCast(m_pParentView, CViewWork)) { + return FireOnGetItemImageEvent(wxDynamicCast(m_pParentView, CViewWork), item); + } else if (wxDynamicCast(m_pParentView, CViewTransfers)) { + return FireOnGetItemImageEvent(wxDynamicCast(m_pParentView, CViewTransfers), item); + } else if (wxDynamicCast(m_pParentView, CViewMessages)) { + return FireOnGetItemImageEvent(wxDynamicCast(m_pParentView, CViewMessages), item); + } else if (wxDynamicCast(m_pParentView, CViewResources)) { + return FireOnGetItemImageEvent(wxDynamicCast(m_pParentView, CViewResources), item); + } + return FireOnGetItemImageEvent(wxDynamicCast(m_pParentView, CBOINCBaseView), item); +} + + +template < class T > +int CBOINCListCtrl::FireOnGetItemImageEvent( T pView, long item ) const +{ + return pView->OnGetItemImage( item ); +} + + +wxListItemAttr* CBOINCListCtrl::OnGetItemAttr( long item ) const +{ + wxASSERT(NULL != m_pParentView); + wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView)); + + if (wxDynamicCast(m_pParentView, CViewProjects)) { + return FireOnGetItemAttrEvent(wxDynamicCast(m_pParentView, CViewProjects), item); + } else if (wxDynamicCast(m_pParentView, CViewWork)) { + return FireOnGetItemAttrEvent(wxDynamicCast(m_pParentView, CViewWork), item); + } else if (wxDynamicCast(m_pParentView, CViewTransfers)) { + return FireOnGetItemAttrEvent(wxDynamicCast(m_pParentView, CViewTransfers), item); + } else if (wxDynamicCast(m_pParentView, CViewMessages)) { + return FireOnGetItemAttrEvent(wxDynamicCast(m_pParentView, CViewMessages), item); + } else if (wxDynamicCast(m_pParentView, CViewResources)) { + return FireOnGetItemAttrEvent(wxDynamicCast(m_pParentView, CViewResources), item); + } + return FireOnGetItemAttrEvent(wxDynamicCast(m_pParentView, CBOINCBaseView), item); +} + + +template < class T > +wxListItemAttr* CBOINCListCtrl::FireOnGetItemAttrEvent( T pView, long item ) const +{ + return pView->OnGetItemAttr( item ); +} + diff --git a/clientgui/BOINCListCtrl.h b/clientgui/BOINCListCtrl.h new file mode 100644 index 0000000000..a5accefc16 --- /dev/null +++ b/clientgui/BOINCListCtrl.h @@ -0,0 +1,73 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:24 rwalton +// *** empty log message *** +// +// + +#ifndef _BOINCLISTCTRL_H_ +#define _BOINCLISTCTRL_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "BOINCListCtrl.cpp" +#endif + + +class CBOINCBaseView; + +class CBOINCListCtrl : public wxListView +{ + DECLARE_DYNAMIC_CLASS( CBOINCListCtrl ) + +public: + CBOINCListCtrl(); + CBOINCListCtrl( CBOINCBaseView* pView, wxWindowID iListWindowID ); + + ~CBOINCListCtrl(); + + virtual void OnRender( wxTimerEvent& event ); + virtual bool OnSaveState( wxConfigBase* pConfig ); + virtual bool OnRestoreState( wxConfigBase* pConfig ); + +private: + + virtual wxString OnGetItemText( long item, long column ) const; + template < class T > + wxString FireOnGetItemTextEvent( T pView, long item, long column ) const; + + virtual int OnGetItemImage( long item ) const; + template < class T > + int FireOnGetItemImageEvent( T pView, long item ) const; + + virtual wxListItemAttr* OnGetItemAttr( long item ) const; + template < class T > + wxListItemAttr* FireOnGetItemAttrEvent( T pView, long item ) const; + + CBOINCBaseView* m_pParentView; + +}; + + +#endif + diff --git a/clientgui/BOINCTaskCtrl.cpp b/clientgui/BOINCTaskCtrl.cpp new file mode 100644 index 0000000000..0bc86fff97 --- /dev/null +++ b/clientgui/BOINCTaskCtrl.cpp @@ -0,0 +1,293 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:24 rwalton +// *** empty log message *** +// +// + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "BOINCTaskCtrl.h" +#endif + +#include "stdwx.h" +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "ViewProjects.h" +#include "ViewWork.h" +#include "ViewTransfers.h" +#include "ViewMessages.h" +#include "ViewResources.h" + +#include "res/visibleheader.xpm" +#include "res/hiddenheader.xpm" + + +IMPLEMENT_DYNAMIC_CLASS(CBOINCTaskCtrl, wxHtmlWindow) + + +CBOINCTaskCtrl::CBOINCTaskCtrl() +{ + wxLogTrace("CBOINCTaskCtrl::CBOINCTaskCtrl - Function Begining"); + wxLogTrace("CBOINCTaskCtrl::CBOINCTaskCtrl - Function Ending"); +} + + +CBOINCTaskCtrl::CBOINCTaskCtrl(CBOINCBaseView* pView, wxWindowID iHtmlWindowID) : + wxHtmlWindow( pView, iHtmlWindowID, wxDefaultPosition, wxSize(225, -1), wxHW_SCROLLBAR_AUTO|wxHSCROLL|wxVSCROLL ) +{ + wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Begining"); + + m_pParentView = pView; + + wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Ending"); +} + + +CBOINCTaskCtrl::~CBOINCTaskCtrl() +{ + wxLogTrace("CBOINCTaskCtrl::~CBOINCTaskCtrl - Function Begining"); + wxLogTrace("CBOINCTaskCtrl::~CBOINCTaskCtrl - Function Ending"); +} + + +void CBOINCTaskCtrl::BeginTaskPage() +{ + wxLogTrace("CBOINCTaskCtrl::BeginTaskPage - Function Begining"); + + m_strTaskPage.Clear(); + + m_strTaskPage += ""; + + wxLogTrace("CBOINCTaskCtrl::BeginTaskPage - Function Ending"); +} + + +void CBOINCTaskCtrl::BeginTaskSection( const wxString& strTaskHeaderFilename, bool bHidden ) +{ + wxLogTrace("CBOINCTaskCtrl::BeginTaskSection - Function Begining"); + + wxString strModifiedTaskHeaderFilename; + + if ( bHidden ) + strModifiedTaskHeaderFilename = strTaskHeaderFilename + wxT(".hidden"); + else + strModifiedTaskHeaderFilename = strTaskHeaderFilename + wxT(".visible"); + + m_strTaskPage += ""; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += "
"; + m_strTaskPage += " "; + m_strTaskPage += "
 
"; + m_strTaskPage += " "; + + wxLogTrace("CBOINCTaskCtrl::BeginTaskSection - Function Ending"); +} + + +void CBOINCTaskCtrl::CreateTask( const wxString& strTaskIconFilename, const wxString& strTaskName, const wxString& strTaskDescription ) +{ + wxLogTrace("CBOINCTaskCtrl::CreateTask - Function Begining"); + + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " "; + + wxLogTrace("CBOINCTaskCtrl::CreateTask - Function Ending"); +} + + +void CBOINCTaskCtrl::EndTaskSection() +{ + wxLogTrace("CBOINCTaskCtrl::EndTaskSection - Function Begining"); + + m_strTaskPage += "
"; + m_strTaskPage += " "; + m_strTaskPage += "   "; + m_strTaskPage += " " + strTaskName + ""; + m_strTaskPage += "
"; + m_strTaskPage += "
 
"; + m_strTaskPage += "

"; + + wxLogTrace("CBOINCTaskCtrl::EndTaskSection - Function Ending"); +} + + +void CBOINCTaskCtrl::CreateQuickTip( const wxString& strTip ) +{ + wxLogTrace("CBOINCTaskCtrl::CreateQuickTip - Function Begining"); + + m_strTaskPage += " "; + m_strTaskPage += " "; + m_strTaskPage += " " + strTip; + m_strTaskPage += " "; + m_strTaskPage += " "; + + wxLogTrace("CBOINCTaskCtrl::CreateQuickTip - Function Ending"); +} + + +void CBOINCTaskCtrl::EndTaskPage() +{ + wxLogTrace("CBOINCTaskCtrl::EndTaskPage - Function Begining"); + + m_strTaskPage += ""; + SetPage(m_strTaskPage); + + wxLogTrace("CBOINCTaskCtrl::EndTaskPage - Function Ending"); +} + + +void CBOINCTaskCtrl::CreateTaskHeader( const wxString& strFilename, const wxBitmap& itemTaskBitmap, const wxString& strTaskName ) +{ + wxLogTrace("CBOINCTaskCtrl::CreateTaskHeader - Function Begining"); + + wxMemoryDC dc; + wxBitmap bmpHeaderVisible(visibleheader_xpm); + wxBitmap bmpHeaderHidden(hiddenheader_xpm); + wxBitmap bmpTaskIcon(itemTaskBitmap); + + bmpHeaderVisible.SetMask(new wxMask(bmpHeaderVisible, wxColour(255, 0, 255))); + bmpHeaderHidden.SetMask(new wxMask(bmpHeaderHidden, wxColour(255, 0, 255))); + bmpTaskIcon.SetMask(new wxMask(bmpTaskIcon, wxColour(255, 0, 255))); + + + dc.SelectObject(bmpHeaderVisible); + dc.DrawBitmap(bmpTaskIcon, 17, 9, true); + + dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetTextForeground(wxColour(255, 255, 255)); + dc.DrawText(strTaskName, 44, 12); + + dc.SelectObject( wxNullBitmap ); + + dc.SelectObject(bmpHeaderHidden); + dc.DrawBitmap(bmpTaskIcon, 17, 9, true); + + dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetTextForeground(wxColour(255, 255, 255)); + dc.DrawText(strTaskName, 44, 12); + + dc.SelectObject( wxNullBitmap ); + + wxImage imgHeaderVisible = bmpHeaderVisible.ConvertToImage(); + wxImage imgHeaderHidden = bmpHeaderHidden.ConvertToImage(); + + AddVirtualFile(strFilename + wxT(".visible"), bmpHeaderVisible, wxBITMAP_TYPE_XPM); + AddVirtualFile(strFilename + wxT(".hidden"), bmpHeaderHidden, wxBITMAP_TYPE_XPM); + + wxLogTrace("CBOINCTaskCtrl::CreateTaskHeader - Function Ending"); +} + + +void CBOINCTaskCtrl::AddVirtualFile( const wxString& strFilename, wxImage& itemImage, long lType ) +{ + wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Begining"); + + wxMemoryFSHandler::AddFile( strFilename, itemImage, lType ); + + wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Ending"); +} + + +void CBOINCTaskCtrl::AddVirtualFile( const wxString& strFilename, const wxBitmap& itemBitmap, long lType ) +{ + wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Begining"); + + wxMemoryFSHandler::AddFile( strFilename, itemBitmap, lType ); + + wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Ending"); +} + + +void CBOINCTaskCtrl::RemoveVirtualFile( const wxString& strFilename ) +{ + wxLogTrace("CBOINCTaskCtrl::RemoveVirtualFile - Function Begining"); + + wxMemoryFSHandler::RemoveFile( strFilename ); + + wxLogTrace("CBOINCTaskCtrl::RemoveVirtualFile - Function Ending"); +} + + +void CBOINCTaskCtrl::OnRender( wxTimerEvent& event ) +{ + wxLogTrace("CBOINCTaskCtrl::OnRender - Function Begining"); + wxLogTrace("CBOINCTaskCtrl::OnRender - Function Ending"); +} + + +bool CBOINCTaskCtrl::OnSaveState( wxConfigBase* pConfig ) +{ + wxLogTrace("CBOINCTaskCtrl::OnSaveState - Function Begining"); + wxLogTrace("CBOINCTaskCtrl::OnSaveState - Function Ending"); + return true; +} + + +bool CBOINCTaskCtrl::OnRestoreState( wxConfigBase* pConfig ) +{ + wxLogTrace("CBOINCTaskCtrl::OnRestoreState - Function Begining"); + wxLogTrace("CBOINCTaskCtrl::OnRestoreState - Function Ending"); + return true; +} + + +void CBOINCTaskCtrl::OnLinkClicked( const wxHtmlLinkInfo& link ) +{ + wxASSERT(NULL != m_pParentView); + wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView)); + + if (wxDynamicCast(m_pParentView, CViewProjects)) { + FireOnLinkClickedEvent(wxDynamicCast(m_pParentView, CViewProjects), link); + } else if (wxDynamicCast(m_pParentView, CViewWork)) { + FireOnLinkClickedEvent(wxDynamicCast(m_pParentView, CViewWork), link); + } else if (wxDynamicCast(m_pParentView, CViewTransfers)) { + FireOnLinkClickedEvent(wxDynamicCast(m_pParentView, CViewTransfers), link); + } else if (wxDynamicCast(m_pParentView, CViewMessages)) { + FireOnLinkClickedEvent(wxDynamicCast(m_pParentView, CViewMessages), link); + } else if (wxDynamicCast(m_pParentView, CViewResources)) { + FireOnLinkClickedEvent(wxDynamicCast(m_pParentView, CViewResources), link); + } else if (wxDynamicCast(m_pParentView, CViewResources)) { + FireOnLinkClickedEvent(wxDynamicCast(m_pParentView, CBOINCBaseView), link); + } +} + + +template < class T > +void CBOINCTaskCtrl::FireOnLinkClickedEvent( T pView, const wxHtmlLinkInfo& link ) +{ + return pView->OnLinkClicked( link ); +} + diff --git a/clientgui/BOINCTaskCtrl.h b/clientgui/BOINCTaskCtrl.h new file mode 100644 index 0000000000..cb0bd9919e --- /dev/null +++ b/clientgui/BOINCTaskCtrl.h @@ -0,0 +1,92 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:24 rwalton +// *** empty log message *** +// +// + +#ifndef _BOINCTASKCTRL_H_ +#define _BOINCTASKCTRL_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "BOINCTaskCtrl.cpp" +#endif + + +class CBOINCBaseView; + +class CBOINCTaskCtrl : public wxHtmlWindow +{ + DECLARE_DYNAMIC_CLASS( CBOINCTaskCtrl ) + +public: + CBOINCTaskCtrl(); + CBOINCTaskCtrl( CBOINCBaseView* pView, wxWindowID iHtmlWindowID ); + + ~CBOINCTaskCtrl(); + + virtual void BeginTaskPage(); + virtual void BeginTaskSection( const wxString& strTaskHeaderFilename, + bool bHidden ); + virtual void CreateTask( const wxString& strTaskIconFilename, + const wxString& strTaskName, + const wxString& strTaskDescription ); + virtual void EndTaskSection(); + virtual void CreateQuickTip( const wxString& strTip ); + virtual void EndTaskPage(); + + + virtual void CreateTaskHeader( const wxString& strFilename, + const wxBitmap& itemTaskBitmap, + const wxString& strTaskName ); + + + virtual void AddVirtualFile( const wxString& strFilename, + wxImage& itemImage, + long lType ); + virtual void AddVirtualFile( const wxString& strFilename, + const wxBitmap& itemBitmap, + long lType ); + virtual void RemoveVirtualFile( const wxString& strFilename ); + + + virtual void OnRender( wxTimerEvent& event ); + virtual bool OnSaveState( wxConfigBase* pConfig ); + virtual bool OnRestoreState( wxConfigBase* pConfig ); + +private: + + virtual void OnLinkClicked( const wxHtmlLinkInfo& link ); + template < class T > + void FireOnLinkClickedEvent( T pView, const wxHtmlLinkInfo& link ); + + CBOINCBaseView* m_pParentView; + + wxString m_strTaskPage; + +}; + + +#endif + diff --git a/clientgui/BaseListCtrlView.cpp b/clientgui/BaseListCtrlView.cpp deleted file mode 100644 index 838e149502..0000000000 --- a/clientgui/BaseListCtrlView.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.13 2004/07/13 05:56:01 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.12 2004/06/25 22:50:56 rwalton -// Client spamming server hotfix -// -// Revision 1.11 2004/05/29 06:56:59 rwalton -// *** empty log message *** -// -// Revision 1.10 2004/05/29 06:39:27 rwalton -// *** empty log message *** -// -// Revision 1.9 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:14 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:08 rwalton -// *** empty log message *** -// -// - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "BaseListCtrlView.h" -#endif - -#include "stdwx.h" -#include "BaseListCtrlView.h" -#include "res/boinc.xpm" - - -IMPLEMENT_DYNAMIC_CLASS(CBaseListCtrlView, wxListView) - - -CBaseListCtrlView::CBaseListCtrlView() -{ - wxLogTrace("CBaseListCtrlView::CBaseListCtrlView - Function Begining"); - wxLogTrace("CBaseListCtrlView::CBaseListCtrlView - Function Ending"); -} - - -CBaseListCtrlView::CBaseListCtrlView(wxNotebook* pNotebook, wxWindowID iWindowID) : - wxListView(pNotebook, iWindowID, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_VIRTUAL, wxDefaultValidator, _T("wxListView")) -{ - wxLogTrace("CBaseListCtrlView::CBaseListCtrlView - Function Begining"); - wxLogTrace("CBaseListCtrlView::CBaseListCtrlView - Function Ending"); -} - - -CBaseListCtrlView::~CBaseListCtrlView() -{ - wxLogTrace("CBaseListCtrlView::~CBaseListCtrlView - Function Begining"); - wxLogTrace("CBaseListCtrlView::~CBaseListCtrlView - Function Ending"); -} - - -// The user friendly name of the view. -// If it has not been defined by the view "Undefined" is returned. -// -wxString CBaseListCtrlView::GetViewName() -{ - wxLogTrace("CBaseListCtrlView::GetViewName - Function Begining"); - wxLogTrace("CBaseListCtrlView::GetViewName - Function Ending"); - return wxString(_T("Undefined")); -} - - -// The user friendly icon of the view. -// If it has not been defined by the view the BOINC icon is returned. -// -char** CBaseListCtrlView::GetViewIcon() -{ - wxLogTrace("CBaseListCtrlView::GetViewIcon - Function Begining"); - - wxASSERT(NULL != boinc_xpm); - - wxLogTrace("CBaseListCtrlView::GetViewIcon - Function Ending"); - return boinc_xpm; -} - - -void CBaseListCtrlView::OnRender (wxTimerEvent& event) { - wxLogTrace("CBaseListCtrlView::OnRender - Function Begining"); - wxLogTrace("CBaseListCtrlView::OnRender - Function Ending"); -} - - -bool CBaseListCtrlView::OnSaveState( wxConfigBase* pConfig ) { - wxLogTrace("CBaseListCtrlView::OnSaveState - Function Begining"); - - wxString strBaseConfigLocation = wxString(_T("")); - wxListItem liColumnInfo; - wxInt32 iIndex = 0; - wxInt32 iColumnCount = 0; - - - wxASSERT(NULL != pConfig); - - - // Retrieve the base location to store configuration information - // Should be in the following form: "/Projects/" - strBaseConfigLocation = pConfig->GetPath() + "/"; - - // Convert to a zero based index - iColumnCount = GetColumnCount() - 1; - - // Which fields are we interested in? - liColumnInfo.SetMask( wxLIST_MASK_TEXT | - wxLIST_MASK_WIDTH | - wxLIST_MASK_FORMAT ); - - // Cycle through the columns recording anything interesting - for ( iIndex = 0; iIndex <= iColumnCount; iIndex++ ) { - - GetColumn(iIndex, liColumnInfo); - - pConfig->SetPath(strBaseConfigLocation + liColumnInfo.GetText()); - - pConfig->Write(_T("Width"), liColumnInfo.GetWidth()); - pConfig->Write(_T("Format"), liColumnInfo.GetAlign()); - - } - - - wxLogTrace("CBaseListCtrlView::OnSaveState - Function Ending"); - return true; -} - - -bool CBaseListCtrlView::OnRestoreState( wxConfigBase* pConfig ) { - wxLogTrace("CBaseListCtrlView::OnRestoreState - Function Begining"); - - wxString strBaseConfigLocation = wxString(_T("")); - wxListItem liColumnInfo; - wxInt32 iIndex = 0; - wxInt32 iColumnCount = 0; - wxInt32 iTempValue = 0; - - - wxASSERT(NULL != pConfig); - - - // Retrieve the base location to store configuration information - // Should be in the following form: "/Projects/" - strBaseConfigLocation = pConfig->GetPath() + "/"; - - // Convert to a zero based index - iColumnCount = GetColumnCount() - 1; - - // Which fields are we interested in? - liColumnInfo.SetMask( wxLIST_MASK_TEXT | - wxLIST_MASK_WIDTH | - wxLIST_MASK_FORMAT ); - - // Cycle through the columns recording anything interesting - for ( iIndex = 0; iIndex <= iColumnCount; iIndex++ ) { - - GetColumn(iIndex, liColumnInfo); - - pConfig->SetPath(strBaseConfigLocation + liColumnInfo.GetText()); - - pConfig->Read(_T("Width"), &iTempValue, 80); - liColumnInfo.SetWidth(iTempValue); - - pConfig->Read(_T("Format"), &iTempValue, 0); - liColumnInfo.SetAlign((wxListColumnFormat)iTempValue); - - SetColumn(iIndex, liColumnInfo); - - } - - - wxLogTrace("CBaseListCtrlView::OnRestoreState - Function Ending"); - return true; -} - diff --git a/clientgui/BaseListCtrlView.h b/clientgui/BaseListCtrlView.h deleted file mode 100644 index 7fb065a8a0..0000000000 --- a/clientgui/BaseListCtrlView.h +++ /dev/null @@ -1,70 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.9 2004/07/13 05:56:01 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.8 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/21 06:27:14 rwalton -// *** empty log message *** -// -// Revision 1.5 2004/05/17 22:15:08 rwalton -// *** empty log message *** -// -// - -#ifndef _BASELISTCTRLVIEW_H_ -#define _BASELISTCTRLVIEW_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "BaseListCtrlView.cpp" -#endif - - -class CBaseListCtrlView : public wxListView -{ - DECLARE_DYNAMIC_CLASS( CBaseListCtrlView ) - -public: - CBaseListCtrlView(); - CBaseListCtrlView( wxNotebook* pNotebook, wxWindowID iWindowID ); - - ~CBaseListCtrlView(); - - virtual wxString GetViewName(); - virtual char** GetViewIcon(); - - virtual void OnRender( wxTimerEvent& event ); - virtual bool OnSaveState( wxConfigBase* pConfig ); - virtual bool OnRestoreState( wxConfigBase* pConfig ); - -}; - - -#endif - diff --git a/clientgui/Events.h b/clientgui/Events.h index 9cd3e270bf..49be73219e 100644 --- a/clientgui/Events.h +++ b/clientgui/Events.h @@ -21,6 +21,9 @@ // Revision History: // // $Log$ +// Revision 1.8 2004/09/21 01:26:23 rwalton +// *** empty log message *** +// // Revision 1.7 2004/07/13 06:04:28 rwalton // Hooked up the Project and Work tab for the new GUI. // @@ -40,6 +43,11 @@ #define ID_LIST_TRANSFERSVIEW wxID_HIGHEST + 7 #define ID_LIST_MESSAGESVIEW wxID_HIGHEST + 8 #define ID_LIST_RESOURCEUTILIZATIONVIEW wxID_HIGHEST + 9 +#define ID_HTML_PROJECTSVIEW wxID_HIGHEST + 10 +#define ID_HTML_WORKVIEW wxID_HIGHEST + 11 +#define ID_HTML_TRANSFERSVIEW wxID_HIGHEST + 12 +#define ID_HTML_MESSAGESVIEW wxID_HIGHEST + 13 +#define ID_HTML_RESOURCEUTILIZATIONVIEW wxID_HIGHEST + 14 #endif diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index 23684a02ee..9582aa4958 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -21,6 +21,9 @@ // Revision History: // // $Log$ +// Revision 1.19 2004/09/21 01:26:23 rwalton +// *** empty log message *** +// // Revision 1.18 2004/08/11 23:52:12 rwalton // *** empty log message *** // @@ -61,12 +64,12 @@ #include "BOINCGUIApp.h" #include "MainFrame.h" #include "Events.h" -#include "BaseListCtrlView.h" -#include "MessagesView.h" -#include "ProjectsView.h" -#include "ResourceUtilizationView.h" -#include "TransfersView.h" -#include "WorkView.h" +#include "BOINCBaseView.h" +#include "ViewProjects.h" +#include "ViewWork.h" +#include "ViewTransfers.h" +#include "ViewMessages.h" +#include "ViewResources.h" #include "DlgAbout.h" #include "DlgOptions.h" #include "DlgAttachProject.h" @@ -119,7 +122,8 @@ CMainFrame::CMainFrame(wxString strTitle) : } -CMainFrame::~CMainFrame(){ +CMainFrame::~CMainFrame() +{ wxASSERT(NULL != m_pFrameRenderTimer); wxASSERT(NULL != m_pMenubar); wxASSERT(NULL != m_pNotebook); @@ -145,7 +149,8 @@ CMainFrame::~CMainFrame(){ } -bool CMainFrame::CreateMenu() { +bool CMainFrame::CreateMenu() +{ // File menu wxMenu *menuFile = new wxMenu; menuFile->Append(wxID_EXIT, _("E&xit")); @@ -174,7 +179,8 @@ bool CMainFrame::CreateMenu() { } -bool CMainFrame::CreateNotebook() { +bool CMainFrame::CreateNotebook() +{ // create frame panel wxPanel *pPanel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxCLIP_CHILDREN|wxNO_BORDER); @@ -187,30 +193,33 @@ bool CMainFrame::CreateNotebook() { // layout frame panel wxBoxSizer *pPanelSizer = new wxBoxSizer(wxVERTICAL); + pPanelSizer->Add(new wxStaticLine(pPanel, -1), 0, wxEXPAND); pPanelSizer->Add(0, 4); pPanelSizer->Add(pNotebookSizer, 1, wxEXPAND); + pPanel->SetAutoLayout(true); pPanel->SetSizerAndFit(pPanelSizer); - CreateNotebookPage(new CProjectsView(m_pNotebook)); - CreateNotebookPage(new CWorkView(m_pNotebook)); - CreateNotebookPage(new CTransfersView(m_pNotebook)); - CreateNotebookPage(new CMessagesView(m_pNotebook)); - CreateNotebookPage(new CResourceUtilizationView(m_pNotebook)); + CreateNotebookPage(new CViewProjects(m_pNotebook)); + CreateNotebookPage(new CViewWork(m_pNotebook)); + CreateNotebookPage(new CViewTransfers(m_pNotebook)); + CreateNotebookPage(new CViewMessages(m_pNotebook)); + CreateNotebookPage(new CViewResources(m_pNotebook)); return true; } template < class T > -bool CMainFrame::CreateNotebookPage(T pwndNewNotebookPage) { +bool CMainFrame::CreateNotebookPage(T pwndNewNotebookPage) +{ wxImageList* pImageList; wxInt32 iImageIndex = 0; wxASSERT(NULL != pwndNewNotebookPage); wxASSERT(NULL != m_pNotebook); - wxASSERT(wxDynamicCast(pwndNewNotebookPage, CBaseListCtrlView)); + wxASSERT(wxDynamicCast(pwndNewNotebookPage, CBOINCBaseView)); pImageList = m_pNotebook->GetImageList(); @@ -227,7 +236,8 @@ bool CMainFrame::CreateNotebookPage(T pwndNewNotebookPage) { } -bool CMainFrame::CreateStatusbar() { +bool CMainFrame::CreateStatusbar() +{ if (m_pStatusbar) return true; @@ -247,12 +257,14 @@ bool CMainFrame::CreateStatusbar() { } -bool CMainFrame::DeleteMenu() { +bool CMainFrame::DeleteMenu() +{ return true; } -bool CMainFrame::DeleteNotebook() { +bool CMainFrame::DeleteNotebook() +{ wxImageList* pImageList; wxASSERT(NULL != m_pNotebook); @@ -268,7 +280,8 @@ bool CMainFrame::DeleteNotebook() { } -bool CMainFrame::DeleteStatusbar() { +bool CMainFrame::DeleteStatusbar() +{ if (!m_pStatusbar) return true; @@ -283,7 +296,8 @@ bool CMainFrame::DeleteStatusbar() { } -bool CMainFrame::SaveState() { +bool CMainFrame::SaveState() +{ wxString strBaseConfigLocation = wxString(_T("/")); wxConfigBase* pConfig = wxConfigBase::Get(FALSE); wxWindow* pwndNotebookPage = NULL; @@ -314,20 +328,20 @@ bool CMainFrame::SaveState() { for ( iIndex = 0; iIndex <= iPageCount; iIndex++ ) { pwndNotebookPage = m_pNotebook->GetPage(iIndex); - wxASSERT(wxDynamicCast(pwndNotebookPage, CBaseListCtrlView)); + wxASSERT(wxDynamicCast(pwndNotebookPage, CBOINCBaseView)); - if (wxDynamicCast(pwndNotebookPage, CProjectsView)) { - FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CProjectsView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CWorkView)) { - FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CWorkView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CTransfersView)) { - FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CTransfersView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CMessagesView)) { - FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CMessagesView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CResourceUtilizationView)) { - FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CResourceUtilizationView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CBaseListCtrlView)) { - FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CBaseListCtrlView), pConfig); + if (wxDynamicCast(pwndNotebookPage, CViewProjects)) { + FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CViewProjects), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewWork)) { + FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CViewWork), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewTransfers)) { + FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CViewTransfers), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewMessages)) { + FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CViewMessages), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewResources)) { + FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CViewResources), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CBOINCBaseView)) { + FireSaveStateEvent(wxDynamicCast(pwndNotebookPage, CBOINCBaseView), pConfig); } } @@ -336,7 +350,8 @@ bool CMainFrame::SaveState() { template < class T > -bool CMainFrame::FireSaveStateEvent( T pPage, wxConfigBase* pConfig ) { +bool CMainFrame::FireSaveStateEvent( T pPage, wxConfigBase* pConfig ) +{ wxString strPreviousLocation = wxString(_T("")); wxString strConfigLocation = wxString(_T("")); @@ -351,7 +366,8 @@ bool CMainFrame::FireSaveStateEvent( T pPage, wxConfigBase* pConfig ) { } -bool CMainFrame::RestoreState() { +bool CMainFrame::RestoreState() +{ wxString strBaseConfigLocation = wxString(_T("/")); wxConfigBase* pConfig = wxConfigBase::Get(FALSE); wxWindow* pwndNotebookPage = NULL; @@ -386,20 +402,20 @@ bool CMainFrame::RestoreState() { for ( iIndex = 0; iIndex <= iPageCount; iIndex++ ) { pwndNotebookPage = m_pNotebook->GetPage(iIndex); - wxASSERT(wxDynamicCast(pwndNotebookPage, CBaseListCtrlView)); + wxASSERT(wxDynamicCast(pwndNotebookPage, CBOINCBaseView)); - if (wxDynamicCast(pwndNotebookPage, CProjectsView)) { - FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CProjectsView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CWorkView)) { - FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CWorkView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CTransfersView)) { - FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CTransfersView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CMessagesView)) { - FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CMessagesView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CResourceUtilizationView)) { - FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CResourceUtilizationView), pConfig); - } else if (wxDynamicCast(pwndNotebookPage, CBaseListCtrlView)) { - FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CBaseListCtrlView), pConfig); + if (wxDynamicCast(pwndNotebookPage, CViewProjects)) { + FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CViewProjects), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewWork)) { + FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CViewWork), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewTransfers)) { + FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CViewTransfers), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewMessages)) { + FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CViewMessages), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CViewResources)) { + FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CViewResources), pConfig); + } else if (wxDynamicCast(pwndNotebookPage, CBOINCBaseView)) { + FireRestoreStateEvent(wxDynamicCast(pwndNotebookPage, CBOINCBaseView), pConfig); } } @@ -408,7 +424,8 @@ bool CMainFrame::RestoreState() { template < class T > -bool CMainFrame::FireRestoreStateEvent( T pPage, wxConfigBase* pConfig ) { +bool CMainFrame::FireRestoreStateEvent( T pPage, wxConfigBase* pConfig ) +{ wxString strPreviousLocation = wxString(_T("")); wxString strConfigLocation = wxString(_T("")); @@ -423,17 +440,20 @@ bool CMainFrame::FireRestoreStateEvent( T pPage, wxConfigBase* pConfig ) { } -void CMainFrame::OnExit(wxCommandEvent &WXUNUSED(event)) { +void CMainFrame::OnExit(wxCommandEvent &WXUNUSED(event)) +{ Close(true); } -void CMainFrame::OnClose(wxCloseEvent &WXUNUSED(event)) { +void CMainFrame::OnClose(wxCloseEvent &WXUNUSED(event)) +{ Destroy(); } -void CMainFrame::OnCommandsAttachProject(wxCommandEvent &WXUNUSED(event)) { +void CMainFrame::OnCommandsAttachProject(wxCommandEvent &WXUNUSED(event)) +{ CDlgAttachProject* pDlg = new CDlgAttachProject(this); wxASSERT(NULL != pDlg); @@ -444,7 +464,8 @@ void CMainFrame::OnCommandsAttachProject(wxCommandEvent &WXUNUSED(event)) { } -void CMainFrame::OnToolsOptions(wxCommandEvent &WXUNUSED(event)) { +void CMainFrame::OnToolsOptions(wxCommandEvent &WXUNUSED(event)) +{ CDlgOptions* pDlg = new CDlgOptions(this); wxASSERT(NULL != pDlg); @@ -455,7 +476,8 @@ void CMainFrame::OnToolsOptions(wxCommandEvent &WXUNUSED(event)) { } -void CMainFrame::OnAbout(wxCommandEvent &WXUNUSED(event)) { +void CMainFrame::OnAbout(wxCommandEvent &WXUNUSED(event)) +{ CDlgAbout* pDlg = new CDlgAbout(this); wxASSERT(NULL != pDlg); @@ -466,7 +488,8 @@ void CMainFrame::OnAbout(wxCommandEvent &WXUNUSED(event)) { } -void CMainFrame::OnFrameRender (wxTimerEvent &event) { +void CMainFrame::OnFrameRender ( wxTimerEvent &event ) +{ wxWindow* pwndNotebookPage; wxASSERT(NULL != m_pNotebook); @@ -474,26 +497,27 @@ void CMainFrame::OnFrameRender (wxTimerEvent &event) { pwndNotebookPage = m_pNotebook->GetPage(m_pNotebook->GetSelection()); wxASSERT(NULL != pwndNotebookPage); - wxASSERT(wxDynamicCast(pwndNotebookPage, CBaseListCtrlView)); + wxASSERT(wxDynamicCast(pwndNotebookPage, CBOINCBaseView)); - if (wxDynamicCast(pwndNotebookPage, CProjectsView)) { - FireRenderEvent(wxDynamicCast(pwndNotebookPage, CProjectsView), event); - } else if (wxDynamicCast(pwndNotebookPage, CWorkView)) { - FireRenderEvent(wxDynamicCast(pwndNotebookPage, CWorkView), event); - } else if (wxDynamicCast(pwndNotebookPage, CTransfersView)) { - FireRenderEvent(wxDynamicCast(pwndNotebookPage, CTransfersView), event); - } else if (wxDynamicCast(pwndNotebookPage, CMessagesView)) { - FireRenderEvent(wxDynamicCast(pwndNotebookPage, CMessagesView), event); - } else if (wxDynamicCast(pwndNotebookPage, CResourceUtilizationView)) { - FireRenderEvent(wxDynamicCast(pwndNotebookPage, CResourceUtilizationView), event); - } else if (wxDynamicCast(pwndNotebookPage, CBaseListCtrlView)) { - FireRenderEvent(wxDynamicCast(pwndNotebookPage, CBaseListCtrlView), event); + if (wxDynamicCast(pwndNotebookPage, CViewProjects)) { + FireRenderEvent(wxDynamicCast(pwndNotebookPage, CViewProjects), event); + } else if (wxDynamicCast(pwndNotebookPage, CViewWork)) { + FireRenderEvent(wxDynamicCast(pwndNotebookPage, CViewWork), event); + } else if (wxDynamicCast(pwndNotebookPage, CViewTransfers)) { + FireRenderEvent(wxDynamicCast(pwndNotebookPage, CViewTransfers), event); + } else if (wxDynamicCast(pwndNotebookPage, CViewMessages)) { + FireRenderEvent(wxDynamicCast(pwndNotebookPage, CViewMessages), event); + } else if (wxDynamicCast(pwndNotebookPage, CViewResources)) { + FireRenderEvent(wxDynamicCast(pwndNotebookPage, CViewResources), event); + } else if (wxDynamicCast(pwndNotebookPage, CBOINCBaseView)) { + FireRenderEvent(wxDynamicCast(pwndNotebookPage, CBOINCBaseView), event); } } template < class T > -void CMainFrame::FireRenderEvent( T pPage, wxTimerEvent &event ) { +void CMainFrame::FireRenderEvent( T pPage, wxTimerEvent &event ) +{ pPage->OnRender(event); } diff --git a/clientgui/MessagesView.h b/clientgui/MessagesView.h deleted file mode 100644 index 83e344ac97..0000000000 --- a/clientgui/MessagesView.h +++ /dev/null @@ -1,88 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.11 2004/08/11 23:52:12 rwalton -// *** empty log message *** -// -// Revision 1.10 2004/07/13 05:56:01 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.9 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton -// *** empty log message *** -// -// - - -#ifndef _MESSAGESVIEW_H_ -#define _MESSAGESVIEW_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "MessagesView.cpp" -#endif - - -#include "BaseListCtrlView.h" - -class CMessagesView : public CBaseListCtrlView -{ - DECLARE_DYNAMIC_CLASS(CMessagesView) - -public: - CMessagesView(); - CMessagesView(wxNotebook* pNotebook); - - ~CMessagesView(); - - virtual wxString GetViewName(); - virtual char** GetViewIcon(); - - virtual void OnRender(wxTimerEvent &event); - virtual void OnCacheHint( wxListEvent& event ); - -private: - - bool m_bProcessingRenderEvent; - wxInt32 m_iCacheFrom; - wxInt32 m_iCacheTo; - - virtual wxString OnGetItemText(long item, long column) const; - virtual int OnGetItemImage(long item) const; - virtual wxListItemAttr* OnGetItemAttr(long item) const; - - - DECLARE_EVENT_TABLE() - -}; - - -#endif - diff --git a/clientgui/ProjectsView.cpp b/clientgui/ProjectsView.cpp deleted file mode 100644 index f56c5c014d..0000000000 --- a/clientgui/ProjectsView.cpp +++ /dev/null @@ -1,171 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.12 2004/08/11 23:52:12 rwalton -// *** empty log message *** -// -// Revision 1.11 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.10 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.9 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/24 23:50:14 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton -// *** empty log message *** -// -// - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "ProjectsView.h" -#endif - -#include "stdwx.h" -#include "BOINCGUIApp.h" -#include "MainDocument.h" -#include "ProjectsView.h" -#include "Events.h" - -#include "res/proj.xpm" - - -#define COLUMN_PROJECT 0 -#define COLUMN_ACCOUNTNAME 1 -#define COLUMN_TEAMNAME 2 -#define COLUMN_TOTALCREDIT 3 -#define COLUMN_AVGCREDIT 4 -#define COLUMN_RESOURCESHARE 5 - - -IMPLEMENT_DYNAMIC_CLASS(CProjectsView, CBaseListCtrlView) - -BEGIN_EVENT_TABLE(CProjectsView, CBaseListCtrlView) - EVT_LIST_CACHE_HINT(ID_LIST_PROJECTSVIEW, CProjectsView::OnCacheHint) -END_EVENT_TABLE() - - -CProjectsView::CProjectsView() -{ -} - - -CProjectsView::CProjectsView(wxNotebook* pNotebook) : - CBaseListCtrlView(pNotebook, ID_LIST_PROJECTSVIEW) -{ - m_bProcessingRenderEvent = false; - - InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_ACCOUNTNAME, _("Account"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_TEAMNAME, _("Team"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_TOTALCREDIT, _("Total Credit"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_AVGCREDIT, _("Avg. Credit"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_RESOURCESHARE, _("Resource Share"), wxLIST_FORMAT_LEFT, -1); -} - - -CProjectsView::~CProjectsView() -{ -} - - -wxString CProjectsView::GetViewName() -{ - return wxString(_("Projects")); -} - - -char** CProjectsView::GetViewIcon() -{ - return proj_xpm; -} - - -void CProjectsView::OnCacheHint ( wxListEvent& event ) { - m_iCacheFrom = event.GetCacheFrom(); - m_iCacheTo = event.GetCacheTo(); -} - - -void CProjectsView::OnRender(wxTimerEvent &event) { - if (!m_bProcessingRenderEvent) - { - wxLogTrace("CProjectsView::OnRender - Processing Render Event..."); - m_bProcessingRenderEvent = true; - - wxInt32 iProjectCount = wxGetApp().GetDocument()->GetProjectCount(); - SetItemCount(iProjectCount); - - m_bProcessingRenderEvent = false; - } - else - { - event.Skip(); - } -} - - -wxString CProjectsView::OnGetItemText(long item, long column) const { - wxString strBuffer; - switch(column) { - case COLUMN_PROJECT: - if (item == m_iCacheFrom) wxGetApp().GetDocument()->CachedStateLock(); - strBuffer = wxGetApp().GetDocument()->GetProjectProjectName(item); - break; - case COLUMN_ACCOUNTNAME: - strBuffer = wxGetApp().GetDocument()->GetProjectAccountName(item); - break; - case COLUMN_TEAMNAME: - strBuffer = wxGetApp().GetDocument()->GetProjectTeamName(item); - break; - case COLUMN_TOTALCREDIT: - strBuffer = wxGetApp().GetDocument()->GetProjectTotalCredit(item); - break; - case COLUMN_AVGCREDIT: - strBuffer = wxGetApp().GetDocument()->GetProjectAvgCredit(item); - break; - case COLUMN_RESOURCESHARE: - strBuffer = wxGetApp().GetDocument()->GetProjectResourceShare(item); - if (item == m_iCacheTo) wxGetApp().GetDocument()->CachedStateUnlock(); - break; - } - return strBuffer; -} - - -int CProjectsView::OnGetItemImage(long item) const { - return -1; -} - - -wxListItemAttr* CProjectsView::OnGetItemAttr(long item) const { - return NULL; -} - diff --git a/clientgui/ResourceUtilizationView.cpp b/clientgui/ResourceUtilizationView.cpp deleted file mode 100644 index cf8f7d0af9..0000000000 --- a/clientgui/ResourceUtilizationView.cpp +++ /dev/null @@ -1,143 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.12 2004/08/11 23:52:12 rwalton -// *** empty log message *** -// -// Revision 1.11 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.10 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.9 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/24 23:50:14 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton -// *** empty log message *** -// -// - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "ResourceUtilizationView.h" -#endif - -#include "stdwx.h" -#include "BOINCGUIApp.h" -#include "MainDocument.h" -#include "ResourceUtilizationView.h" -#include "Events.h" - -#include "res/usage.xpm" - - -IMPLEMENT_DYNAMIC_CLASS(CResourceUtilizationView, CBaseListCtrlView) - -BEGIN_EVENT_TABLE(CResourceUtilizationView, CBaseListCtrlView) - EVT_LIST_CACHE_HINT(ID_LIST_RESOURCEUTILIZATIONVIEW, CResourceUtilizationView::OnCacheHint) -END_EVENT_TABLE() - - -CResourceUtilizationView::CResourceUtilizationView() -{ -} - - -CResourceUtilizationView::CResourceUtilizationView(wxNotebook* pNotebook) : - CBaseListCtrlView(pNotebook, ID_LIST_RESOURCEUTILIZATIONVIEW) -{ -} - - -CResourceUtilizationView::~CResourceUtilizationView() -{ -} - - -wxString CResourceUtilizationView::GetViewName() -{ - return wxString(_("Disk")); -} - - -char** CResourceUtilizationView::GetViewIcon() -{ - return usage_xpm; -} - - -void CResourceUtilizationView::OnCacheHint ( wxListEvent& event ) { - m_iCacheFrom = event.GetCacheFrom(); - m_iCacheTo = event.GetCacheTo(); -} - - -void CResourceUtilizationView::OnRender(wxTimerEvent &event) { - wxLogTrace("CResourceUtilizationView::OnRender - Function Begining"); - wxLogTrace("CResourceUtilizationView::OnRender - Function Ending"); -} - - -wxString CResourceUtilizationView::OnGetItemText(long item, long column) const { - wxString strBuffer; - switch(column) { - case 0: - if (item == m_iCacheFrom) wxGetApp().GetDocument()->CachedStateLock(); - strBuffer = wxGetApp().GetDocument()->GetProjectProjectName(item); - break; - case 1: - strBuffer = wxGetApp().GetDocument()->GetProjectAccountName(item); - break; - case 2: - strBuffer = wxGetApp().GetDocument()->GetProjectTeamName(item); - break; - case 3: - strBuffer = wxGetApp().GetDocument()->GetProjectTotalCredit(item); - break; - case 4: - strBuffer = wxGetApp().GetDocument()->GetProjectAvgCredit(item); - break; - case 5: - strBuffer = wxGetApp().GetDocument()->GetProjectResourceShare(item); - if (item == m_iCacheTo) wxGetApp().GetDocument()->CachedStateUnlock(); - break; - } - return strBuffer; -} - - -int CResourceUtilizationView::OnGetItemImage(long item) const { - return -1; -} - - -wxListItemAttr* CResourceUtilizationView::OnGetItemAttr(long item) const { - return NULL; -} - diff --git a/clientgui/ResourceUtilizationView.h b/clientgui/ResourceUtilizationView.h deleted file mode 100644 index 001685fd85..0000000000 --- a/clientgui/ResourceUtilizationView.h +++ /dev/null @@ -1,87 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.11 2004/08/11 23:52:12 rwalton -// *** empty log message *** -// -// Revision 1.10 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.9 2004/05/29 00:09:41 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/27 06:17:58 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton -// *** empty log message *** -// -// - -#ifndef _RESOURCEUTILIZATIONVIEW_H_ -#define _RESOURCEUTILIZATIONVIEW_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "ResourceUtilizationView.cpp" -#endif - - -#include "BaseListCtrlView.h" - -class CResourceUtilizationView : public CBaseListCtrlView -{ - DECLARE_DYNAMIC_CLASS(CResourceUtilizationView) - -public: - CResourceUtilizationView(); - CResourceUtilizationView(wxNotebook* pNotebook); - - ~CResourceUtilizationView(); - - virtual wxString GetViewName(); - virtual char** GetViewIcon(); - - virtual void OnRender(wxTimerEvent &event); - virtual void OnCacheHint( wxListEvent& event ); - -private: - - bool m_bProcessingRenderEvent; - wxInt32 m_iCacheFrom; - wxInt32 m_iCacheTo; - - virtual wxString OnGetItemText(long item, long column) const; - virtual int OnGetItemImage(long item) const; - virtual wxListItemAttr* OnGetItemAttr(long item) const; - - - DECLARE_EVENT_TABLE() - -}; - - -#endif - diff --git a/clientgui/TransfersView.h b/clientgui/TransfersView.h deleted file mode 100644 index bd431f06ce..0000000000 --- a/clientgui/TransfersView.h +++ /dev/null @@ -1,87 +0,0 @@ -// $Id$ -// -// The contents of this file are subject to the BOINC Public License -// Version 1.0 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://boinc.berkeley.edu/license_1.0.txt -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// -// The Initial Developer of the Original Code is the SETI@home project. -// Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// -// Contributor(s): -// -// Revision History: -// -// $Log$ -// Revision 1.11 2004/08/11 23:52:13 rwalton -// *** empty log message *** -// -// Revision 1.10 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.9 2004/05/29 00:09:41 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/27 06:17:58 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton -// *** empty log message *** -// -// - -#ifndef _TRANSFERSVIEW_H_ -#define _TRANSFERSVIEW_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "TransfersView.cpp" -#endif - - -#include "BaseListCtrlView.h" - -class CTransfersView : public CBaseListCtrlView -{ - DECLARE_DYNAMIC_CLASS(CTransfersView) - -public: - CTransfersView(); - CTransfersView(wxNotebook* pNotebook); - - ~CTransfersView(); - - virtual wxString GetViewName(); - virtual char** GetViewIcon(); - - virtual void OnRender(wxTimerEvent &event); - virtual void OnCacheHint( wxListEvent& event ); - -private: - - bool m_bProcessingRenderEvent; - wxInt32 m_iCacheFrom; - wxInt32 m_iCacheTo; - - virtual wxString OnGetItemText(long item, long column) const; - virtual int OnGetItemImage(long item) const; - virtual wxListItemAttr* OnGetItemAttr(long item) const; - - - DECLARE_EVENT_TABLE() - -}; - - -#endif - diff --git a/clientgui/MessagesView.cpp b/clientgui/ViewMessages.cpp similarity index 51% rename from clientgui/MessagesView.cpp rename to clientgui/ViewMessages.cpp index 4f5a8854bf..39eafb4277 100644 --- a/clientgui/MessagesView.cpp +++ b/clientgui/ViewMessages.cpp @@ -21,40 +21,19 @@ // Revision History: // // $Log$ -// Revision 1.13 2004/09/01 04:59:32 rwalton -// *** empty log message *** -// -// Revision 1.12 2004/08/11 23:52:12 rwalton -// *** empty log message *** -// -// Revision 1.11 2004/07/13 05:56:01 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.10 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.9 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/24 23:50:14 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton +// Revision 1.1 2004/09/21 01:26:25 rwalton // *** empty log message *** // // #if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "MessagesView.h" +#pragma implementation "ViewMessages.h" #endif #include "stdwx.h" #include "BOINCGUIApp.h" #include "MainDocument.h" -#include "MessagesView.h" +#include "ViewMessages.h" #include "Events.h" #include "res/mess.xpm" @@ -65,57 +44,75 @@ #define COLUMN_MESSAGE 2 -IMPLEMENT_DYNAMIC_CLASS(CMessagesView, CBaseListCtrlView) +IMPLEMENT_DYNAMIC_CLASS(CViewMessages, CBOINCBaseView) -BEGIN_EVENT_TABLE(CMessagesView, CBaseListCtrlView) - EVT_LIST_CACHE_HINT(ID_LIST_MESSAGESVIEW, CMessagesView::OnCacheHint) +BEGIN_EVENT_TABLE(CViewMessages, CBOINCBaseView) + EVT_LIST_CACHE_HINT(ID_LIST_MESSAGESVIEW, CViewMessages::OnCacheHint) END_EVENT_TABLE() -CMessagesView::CMessagesView() +CViewMessages::CViewMessages() { + wxLogTrace("CViewMessages::CViewMessages - Function Begining"); + wxLogTrace("CViewMessages::CViewMessages - Function Ending"); } -CMessagesView::CMessagesView(wxNotebook* pNotebook) : - CBaseListCtrlView(pNotebook, ID_LIST_MESSAGESVIEW) +CViewMessages::CViewMessages(wxNotebook* pNotebook) : + CBOINCBaseView(pNotebook, ID_LIST_MESSAGESVIEW, ID_HTML_MESSAGESVIEW) { - InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_TIME, _("Time"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_MESSAGE, _("Message"), wxLIST_FORMAT_LEFT, -1); + m_bProcessingRenderEvent = false; + + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + + m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_TIME, _("Time"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_MESSAGE, _("Message"), wxLIST_FORMAT_LEFT, -1); } -CMessagesView::~CMessagesView() +CViewMessages::~CViewMessages() { + wxLogTrace("CViewMessages::~CViewMessages - Function Begining"); + wxLogTrace("CViewMessages::~CViewMessages - Function Ending"); } -wxString CMessagesView::GetViewName() +wxString CViewMessages::GetViewName() { return wxString(_("Messages")); } -char** CMessagesView::GetViewIcon() +char** CViewMessages::GetViewIcon() { return mess_xpm; } -void CMessagesView::OnCacheHint ( wxListEvent& event ) { - m_iCacheFrom = event.GetCacheFrom(); - m_iCacheTo = event.GetCacheTo(); +void CViewMessages::OnRender(wxTimerEvent &event) +{ + wxLogTrace("CViewMessages::OnRender - Processing Render Event..."); + if (!m_bProcessingRenderEvent) + { + m_bProcessingRenderEvent = true; + + wxInt32 iProjectCount = wxGetApp().GetDocument()->GetMessageCount(); + wxASSERT(NULL != m_pListPane); + m_pListPane->SetItemCount(iProjectCount); + + m_bProcessingRenderEvent = false; + } + else + { + event.Skip(); + } } -void CMessagesView::OnRender(wxTimerEvent &event) { - wxLogTrace("CMessagesView::OnRender - Function Begining"); - wxLogTrace("CMessagesView::OnRender - Function Ending"); -} - - -wxString CMessagesView::OnGetItemText(long item, long column) const { +wxString CViewMessages::OnGetItemText(long item, long column) const +{ wxString strBuffer; switch(column) { case COLUMN_PROJECT: @@ -134,13 +131,14 @@ wxString CMessagesView::OnGetItemText(long item, long column) const { } -int CMessagesView::OnGetItemImage(long item) const { +int CViewMessages::OnGetItemImage(long item) const +{ return -1; } -wxListItemAttr* CMessagesView::OnGetItemAttr(long item) const { - +wxListItemAttr* CViewMessages::OnGetItemAttr(long item) const +{ return NULL; } diff --git a/clientgui/ProjectsView.h b/clientgui/ViewMessages.h similarity index 60% rename from clientgui/ProjectsView.h rename to clientgui/ViewMessages.h index fe3924fcf2..cf047be52f 100644 --- a/clientgui/ProjectsView.h +++ b/clientgui/ViewMessages.h @@ -21,60 +21,43 @@ // Revision History: // // $Log$ -// Revision 1.10 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.9 2004/05/29 00:09:40 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/27 06:17:57 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton +// Revision 1.1 2004/09/21 01:26:25 rwalton // *** empty log message *** // // - -#ifndef _PROJECTSVIEW_H_ -#define _PROJECTSVIEW_H_ +#ifndef _VIEWMESSAGES_H_ +#define _VIEWMESSAGES_H_ #if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "ProjectsView.cpp" +#pragma interface "ViewMessages.cpp" #endif -#include "BaseListCtrlView.h" +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "BOINCListCtrl.h" -class CProjectsView : public CBaseListCtrlView +class CViewMessages : public CBOINCBaseView { - DECLARE_DYNAMIC_CLASS(CProjectsView) + DECLARE_DYNAMIC_CLASS( CViewMessages ) public: - CProjectsView(); - CProjectsView(wxNotebook* pNotebook); + CViewMessages(); + CViewMessages(wxNotebook* pNotebook); - ~CProjectsView(); + ~CViewMessages(); virtual wxString GetViewName(); virtual char** GetViewIcon(); virtual void OnRender( wxTimerEvent& event ); - virtual void OnCacheHint( wxListEvent& event ); - -private: - - bool m_bProcessingRenderEvent; - wxInt32 m_iCacheFrom; - wxInt32 m_iCacheTo; virtual wxString OnGetItemText(long item, long column) const; virtual int OnGetItemImage(long item) const; virtual wxListItemAttr* OnGetItemAttr(long item) const; +private: DECLARE_EVENT_TABLE() diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp new file mode 100644 index 0000000000..b3eaae6a88 --- /dev/null +++ b/clientgui/ViewProjects.cpp @@ -0,0 +1,215 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:25 rwalton +// *** empty log message *** +// +// + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "ViewProjects.h" +#endif + +#include "stdwx.h" +#include "BOINCGUIApp.h" +#include "MainDocument.h" +#include "ViewProjects.h" +#include "Events.h" + +#include "res/proj.xpm" +#include "res/task.xpm" +#include "res/web.xpm" +#include "res/tips.xpm" + + +#define COLUMN_PROJECT 0 +#define COLUMN_ACCOUNTNAME 1 +#define COLUMN_TEAMNAME 2 +#define COLUMN_TOTALCREDIT 3 +#define COLUMN_AVGCREDIT 4 +#define COLUMN_RESOURCESHARE 5 + + +IMPLEMENT_DYNAMIC_CLASS(CViewProjects, CBOINCBaseView) + +BEGIN_EVENT_TABLE(CViewProjects, CBOINCBaseView) + EVT_LIST_CACHE_HINT(ID_LIST_PROJECTSVIEW, CViewProjects::OnCacheHint) +END_EVENT_TABLE() + + +CViewProjects::CViewProjects() +{ + wxLogTrace("CViewProjects::CViewProjects - Function Begining"); + wxLogTrace("CViewProjects::CViewProjects - Function Ending"); +} + + +CViewProjects::CViewProjects(wxNotebook* pNotebook) : + CBOINCBaseView(pNotebook, ID_HTML_PROJECTSVIEW, ID_LIST_PROJECTSVIEW) +{ + m_bProcessingRenderEvent = false; + + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + + wxBitmap bmpProject(proj_xpm); + wxBitmap bmpTask(task_xpm); + wxBitmap bmpWeb(web_xpm); + wxBitmap bmpTips(tips_xpm); + + bmpProject.SetMask(new wxMask(bmpProject, wxColour(255, 0, 255))); + + m_pTaskPane->AddVirtualFile(_T("proj.xpm"), bmpProject, wxBITMAP_TYPE_XPM); + + m_pTaskPane->CreateTaskHeader(_T("projheader.xpm"), bmpTask, _("Tasks")); + m_pTaskPane->CreateTaskHeader(_T("projweb.xpm"), bmpWeb, _("Websites")); + m_pTaskPane->CreateTaskHeader(_T("projtips.xpm"), bmpTips, _("Quick Tips")); + + m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_ACCOUNTNAME, _("Account"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_TEAMNAME, _("Team"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_TOTALCREDIT, _("Total Credit"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_AVGCREDIT, _("Avg. Credit"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_RESOURCESHARE, _("Resource Share"), wxLIST_FORMAT_LEFT, -1); + + UpdateTaskPane(); +} + + +CViewProjects::~CViewProjects() +{ + wxLogTrace("CViewProjects::~CViewProjects - Function Begining"); + wxLogTrace("CViewProjects::~CViewProjects - Function Ending"); +} + + +wxString CViewProjects::GetViewName() +{ + return wxString(_("Projects")); +} + + +char** CViewProjects::GetViewIcon() +{ + return proj_xpm; +} + + +void CViewProjects::UpdateTaskPane() +{ + wxLogTrace("CViewProjects::UpdateTaskPane - Function Begining"); + + wxASSERT(NULL != m_pTaskPane); + + m_pTaskPane->BeginTaskPage(); + + m_pTaskPane->BeginTaskSection( _T("projheader.xpm"), false ); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("Attach to Project"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("Detach from Project"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("Update Project"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("Reset Project"), + _("")); + m_pTaskPane->EndTaskSection(); + + m_pTaskPane->BeginTaskSection( _T("projweb.xpm"), false ); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("BOINC"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("FAQ"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("Project"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("Team"), + _("")); + m_pTaskPane->CreateTask(_T("proj.xpm"), + _("User"), + _("")); + m_pTaskPane->EndTaskSection(); + + m_pTaskPane->BeginTaskSection( _T("projtips.xpm"), false ); + m_pTaskPane->CreateQuickTip(_("Please select a project to see additional options.")); + m_pTaskPane->EndTaskSection(); + + m_pTaskPane->EndTaskPage(); + + wxLogTrace("CViewProjects::UpdateTaskPane - Function Ending"); +} + + +void CViewProjects::OnRender(wxTimerEvent &event) +{ + wxLogTrace("CViewProjects::OnRender - Processing Render Event..."); + if (!m_bProcessingRenderEvent) + { + m_bProcessingRenderEvent = true; + + wxInt32 iProjectCount = wxGetApp().GetDocument()->GetProjectCount(); + wxASSERT(NULL != m_pListPane); + m_pListPane->SetItemCount(iProjectCount); + + m_bProcessingRenderEvent = false; + } + else + { + event.Skip(); + } +} + + +wxString CViewProjects::OnGetItemText(long item, long column) const { + wxString strBuffer; + switch(column) { + case COLUMN_PROJECT: + if (item == m_iCacheFrom) wxGetApp().GetDocument()->CachedStateLock(); + strBuffer = wxGetApp().GetDocument()->GetProjectProjectName(item); + break; + case COLUMN_ACCOUNTNAME: + strBuffer = wxGetApp().GetDocument()->GetProjectAccountName(item); + break; + case COLUMN_TEAMNAME: + strBuffer = wxGetApp().GetDocument()->GetProjectTeamName(item); + break; + case COLUMN_TOTALCREDIT: + strBuffer = wxGetApp().GetDocument()->GetProjectTotalCredit(item); + break; + case COLUMN_AVGCREDIT: + strBuffer = wxGetApp().GetDocument()->GetProjectAvgCredit(item); + break; + case COLUMN_RESOURCESHARE: + strBuffer = wxGetApp().GetDocument()->GetProjectResourceShare(item); + if (item == m_iCacheTo) wxGetApp().GetDocument()->CachedStateUnlock(); + break; + } + return strBuffer; +} + diff --git a/clientgui/ViewProjects.h b/clientgui/ViewProjects.h new file mode 100644 index 0000000000..050a216e1c --- /dev/null +++ b/clientgui/ViewProjects.h @@ -0,0 +1,68 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:25 rwalton +// *** empty log message *** +// +// + +#ifndef _VIEWPROJECTS_H_ +#define _VIEWPROJECTS_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "ViewProjects.cpp" +#endif + + +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "BOINCListCtrl.h" + +class CViewProjects : public CBOINCBaseView +{ + DECLARE_DYNAMIC_CLASS( CViewProjects ) + +public: + CViewProjects(); + CViewProjects(wxNotebook* pNotebook); + + ~CViewProjects(); + + virtual wxString GetViewName(); + virtual char** GetViewIcon(); + + virtual void UpdateTaskPane(); + + virtual void OnRender( wxTimerEvent& event ); + + virtual wxString OnGetItemText(long item, long column) const; + +private: + + DECLARE_EVENT_TABLE() + +}; + + +#endif + diff --git a/clientgui/ViewResources.cpp b/clientgui/ViewResources.cpp new file mode 100644 index 0000000000..ce263dd5c1 --- /dev/null +++ b/clientgui/ViewResources.cpp @@ -0,0 +1,89 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:25 rwalton +// *** empty log message *** +// +// + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "ViewResources.h" +#endif + +#include "stdwx.h" +#include "BOINCGUIApp.h" +#include "MainDocument.h" +#include "ViewResources.h" +#include "Events.h" + +#include "res/usage.xpm" + + +IMPLEMENT_DYNAMIC_CLASS(CViewResources, CBOINCBaseView) + +BEGIN_EVENT_TABLE(CViewResources, CBOINCBaseView) + EVT_LIST_CACHE_HINT(ID_LIST_RESOURCEUTILIZATIONVIEW, CViewResources::OnCacheHint) +END_EVENT_TABLE() + + +CViewResources::CViewResources() +{ + wxLogTrace("CViewResources::CViewResources - Function Begining"); + wxLogTrace("CViewResources::CViewResources - Function Ending"); +} + + +CViewResources::CViewResources(wxNotebook* pNotebook) : + CBOINCBaseView(pNotebook, ID_LIST_RESOURCEUTILIZATIONVIEW, ID_HTML_RESOURCEUTILIZATIONVIEW) +{ + m_bProcessingRenderEvent = false; + + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + +} + + +CViewResources::~CViewResources() +{ + wxLogTrace("CViewResources::~CViewResources - Function Begining"); + wxLogTrace("CViewResources::~CViewResources - Function Ending"); +} + + +wxString CViewResources::GetViewName() +{ + return wxString(_("Disk")); +} + + +char** CViewResources::GetViewIcon() +{ + return usage_xpm; +} + + +void CViewResources::OnRender(wxTimerEvent &event) +{ +} + diff --git a/clientgui/URLValidator.h b/clientgui/ViewResources.h similarity index 63% rename from clientgui/URLValidator.h rename to clientgui/ViewResources.h index 9e0fdf9514..8e3eda9a3c 100644 --- a/clientgui/URLValidator.h +++ b/clientgui/ViewResources.h @@ -21,38 +21,41 @@ // Revision History: // // $Log$ -// Revision 1.1 2004/05/17 22:15:10 rwalton +// Revision 1.1 2004/09/21 01:26:25 rwalton // *** empty log message *** // // -#ifndef _URLVALIDATOR_H_ -#define _URLVALIDATOR_H_ +#ifndef _VIEWRESOURCES_H_ +#define _VIEWRESOURCES_H_ #if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "URLValidator.cpp" +#pragma interface "ViewResources.cpp" #endif -class CURLValidator : public wxValidator +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "BOINCListCtrl.h" + +class CViewResources : public CBOINCBaseView { - DECLARE_DYNAMIC_CLASS(CURLValidator) + DECLARE_DYNAMIC_CLASS( CViewResources ) public: - CURLValidator(void); - ~CURLValidator(void); + CViewResources(); + CViewResources(wxNotebook* pNotebook); - virtual bool Validate(wxWindow* parent); + ~CViewResources(); + + virtual wxString GetViewName(); + virtual char** GetViewIcon(); + + virtual void OnRender( wxTimerEvent& event ); private: - wxRegEx m_reURL; - wxString* m_pstrProtocol; - wxString* m_pstrServer; - wxString* m_pstrPort; - wxString* m_pstrPath; - wxString* m_pstrQueryString; - wxString* m_pstrBookmark; + DECLARE_EVENT_TABLE() }; diff --git a/clientgui/TransfersView.cpp b/clientgui/ViewTransfers.cpp similarity index 57% rename from clientgui/TransfersView.cpp rename to clientgui/ViewTransfers.cpp index 4052d63988..c52d31f9c9 100644 --- a/clientgui/TransfersView.cpp +++ b/clientgui/ViewTransfers.cpp @@ -21,37 +21,19 @@ // Revision History: // // $Log$ -// Revision 1.12 2004/08/11 23:52:13 rwalton -// *** empty log message *** -// -// Revision 1.11 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.10 2004/05/29 00:09:41 rwalton -// *** empty log message *** -// -// Revision 1.9 2004/05/27 06:17:58 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/24 23:50:14 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton +// Revision 1.1 2004/09/21 01:26:25 rwalton // *** empty log message *** // // #if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "TransfersView.h" +#pragma implementation "ViewTransfers.h" #endif #include "stdwx.h" #include "BOINCGUIApp.h" #include "MainDocument.h" -#include "TransfersView.h" +#include "ViewTransfers.h" #include "Events.h" #include "res/xfer.xpm" @@ -66,62 +48,67 @@ #define COLUMN_STATUS 6 -IMPLEMENT_DYNAMIC_CLASS(CTransfersView, CBaseListCtrlView) +IMPLEMENT_DYNAMIC_CLASS(CViewTransfers, CBOINCBaseView) -BEGIN_EVENT_TABLE(CTransfersView, CBaseListCtrlView) - EVT_LIST_CACHE_HINT(ID_LIST_TRANSFERSVIEW, CTransfersView::OnCacheHint) +BEGIN_EVENT_TABLE(CViewTransfers, CBOINCBaseView) + EVT_LIST_CACHE_HINT(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnCacheHint) END_EVENT_TABLE() -CTransfersView::CTransfersView() +CViewTransfers::CViewTransfers() { + wxLogTrace("CViewTransfers::CViewTransfers - Function Begining"); + wxLogTrace("CViewTransfers::CViewTransfers - Function Ending"); } -CTransfersView::CTransfersView(wxNotebook* pNotebook) : - CBaseListCtrlView(pNotebook, ID_LIST_TRANSFERSVIEW) +CViewTransfers::CViewTransfers(wxNotebook* pNotebook) : + CBOINCBaseView(pNotebook, ID_LIST_TRANSFERSVIEW, ID_HTML_TRANSFERSVIEW) { - InsertColumn(0, _("Project"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(1, _("File"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(2, _("Progress"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(3, _("Size"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(4, _("Time"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(5, _("Speed"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(6, _("Status"), wxLIST_FORMAT_LEFT, -1); + m_bProcessingRenderEvent = false; + + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + + m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_FILE, _("File"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_PROGRESS, _("Progress"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_SIZE, _("Size"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_TIME, _("Time"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_SPEED, _("Speed"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_STATUS, _("Status"), wxLIST_FORMAT_LEFT, -1); } -CTransfersView::~CTransfersView() +CViewTransfers::~CViewTransfers() { + wxLogTrace("CViewTransfers::~CViewTransfers - Function Begining"); + wxLogTrace("CViewTransfers::~CViewTransfers - Function Ending"); } -wxString CTransfersView::GetViewName() +wxString CViewTransfers::GetViewName() { return wxString(_("Transfers")); } -char** CTransfersView::GetViewIcon() +char** CViewTransfers::GetViewIcon() { return xfer_xpm; } -void CTransfersView::OnCacheHint ( wxListEvent& event ) { - m_iCacheFrom = event.GetCacheFrom(); - m_iCacheTo = event.GetCacheTo(); -} - - -void CTransfersView::OnRender(wxTimerEvent &event) { +void CViewTransfers::OnRender(wxTimerEvent &event) +{ + wxLogTrace("CViewTransfers::OnRender - Processing Render Event..."); if (!m_bProcessingRenderEvent) { - wxLogTrace("CTransfersView::OnRender - Processing Render Event..."); m_bProcessingRenderEvent = true; - wxInt32 iTransferCount = wxGetApp().GetDocument()->GetTransferCount(); - SetItemCount(iTransferCount); + wxInt32 iProjectCount = wxGetApp().GetDocument()->GetTransferCount(); + wxASSERT(NULL != m_pListPane); + m_pListPane->SetItemCount(iProjectCount); m_bProcessingRenderEvent = false; } @@ -132,7 +119,8 @@ void CTransfersView::OnRender(wxTimerEvent &event) { } -wxString CTransfersView::OnGetItemText(long item, long column) const { +wxString CViewTransfers::OnGetItemText(long item, long column) const +{ wxString strBuffer; switch(column) { case COLUMN_PROJECT: @@ -162,13 +150,3 @@ wxString CTransfersView::OnGetItemText(long item, long column) const { return strBuffer; } - -int CTransfersView::OnGetItemImage(long item) const { - return -1; -} - - -wxListItemAttr* CTransfersView::OnGetItemAttr(long item) const { - return NULL; -} - diff --git a/clientgui/ViewTransfers.h b/clientgui/ViewTransfers.h new file mode 100644 index 0000000000..8da9665228 --- /dev/null +++ b/clientgui/ViewTransfers.h @@ -0,0 +1,66 @@ +// $Id$ +// +// The contents of this file are subject to the BOINC Public License +// Version 1.0 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://boinc.berkeley.edu/license_1.0.txt +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// +// The Initial Developer of the Original Code is the SETI@home project. +// Portions created by the SETI@home project are Copyright (C) 2002 +// University of California at Berkeley. All Rights Reserved. +// +// Contributor(s): +// +// Revision History: +// +// $Log$ +// Revision 1.1 2004/09/21 01:26:26 rwalton +// *** empty log message *** +// +// + +#ifndef _VIEWTRANSFERS_H_ +#define _VIEWTRANSFERS_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "ViewTransfers.cpp" +#endif + + +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "BOINCListCtrl.h" + +class CViewTransfers : public CBOINCBaseView +{ + DECLARE_DYNAMIC_CLASS( CViewTransfers ) + +public: + CViewTransfers(); + CViewTransfers(wxNotebook* pNotebook); + + ~CViewTransfers(); + + virtual wxString GetViewName(); + virtual char** GetViewIcon(); + + virtual void OnRender( wxTimerEvent& event ); + + virtual wxString OnGetItemText(long item, long column) const; + +private: + + DECLARE_EVENT_TABLE() + +}; + + +#endif + diff --git a/clientgui/WorkView.cpp b/clientgui/ViewWork.cpp similarity index 58% rename from clientgui/WorkView.cpp rename to clientgui/ViewWork.cpp index 5d9f139173..e30cf0dc8d 100644 --- a/clientgui/WorkView.cpp +++ b/clientgui/ViewWork.cpp @@ -21,37 +21,19 @@ // Revision History: // // $Log$ -// Revision 1.12 2004/08/11 23:52:13 rwalton -// *** empty log message *** -// -// Revision 1.11 2004/07/13 05:56:02 rwalton -// Hooked up the Project and Work tab for the new GUI. -// -// Revision 1.10 2004/05/29 00:09:41 rwalton -// *** empty log message *** -// -// Revision 1.9 2004/05/27 06:17:58 rwalton -// *** empty log message *** -// -// Revision 1.8 2004/05/24 23:50:14 rwalton -// *** empty log message *** -// -// Revision 1.7 2004/05/21 06:27:15 rwalton -// *** empty log message *** -// -// Revision 1.6 2004/05/17 22:15:09 rwalton +// Revision 1.1 2004/09/21 01:26:26 rwalton // *** empty log message *** // // #if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "WorkView.h" +#pragma implementation "ViewWork.h" #endif #include "stdwx.h" #include "BOINCGUIApp.h" #include "MainDocument.h" -#include "WorkView.h" +#include "ViewWork.h" #include "Events.h" #include "res/result.xpm" @@ -67,65 +49,68 @@ #define COLUMN_STATUS 7 -IMPLEMENT_DYNAMIC_CLASS(CWorkView, CBaseListCtrlView) +IMPLEMENT_DYNAMIC_CLASS(CViewWork, CBOINCBaseView) -BEGIN_EVENT_TABLE(CWorkView, CBaseListCtrlView) - EVT_LIST_CACHE_HINT(ID_LIST_WORKVIEW, CWorkView::OnCacheHint) +BEGIN_EVENT_TABLE(CViewWork, CBOINCBaseView) + EVT_LIST_CACHE_HINT(ID_LIST_TRANSFERSVIEW, CViewWork::OnCacheHint) END_EVENT_TABLE() -CWorkView::CWorkView() +CViewWork::CViewWork() { + wxLogTrace("CViewWork::CViewWork - Function Begining"); + wxLogTrace("CViewWork::CViewWork - Function Ending"); } -CWorkView::CWorkView(wxNotebook* pNotebook) : - CBaseListCtrlView(pNotebook, ID_LIST_WORKVIEW) +CViewWork::CViewWork(wxNotebook* pNotebook) : + CBOINCBaseView(pNotebook, ID_LIST_WORKVIEW, ID_HTML_WORKVIEW) { m_bProcessingRenderEvent = false; - InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_APPLICATION, _("Application"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_NAME, _("Name"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_CPUTIME, _("CPU time"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_PROGRESS, _("Progress"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_TOCOMPLETETION, _("To Completetion"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_REPORTDEADLINE, _("Report Deadline"), wxLIST_FORMAT_LEFT, -1); - InsertColumn(COLUMN_STATUS, _("Status"), wxLIST_FORMAT_LEFT, -1); + wxASSERT(NULL != m_pTaskPane); + wxASSERT(NULL != m_pListPane); + + m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_APPLICATION, _("Application"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_NAME, _("Name"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_CPUTIME, _("CPU time"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_PROGRESS, _("Progress"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_TOCOMPLETETION, _("To Completetion"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_REPORTDEADLINE, _("Report Deadline"), wxLIST_FORMAT_LEFT, -1); + m_pListPane->InsertColumn(COLUMN_STATUS, _("Status"), wxLIST_FORMAT_LEFT, -1); } -CWorkView::~CWorkView() +CViewWork::~CViewWork() { + wxLogTrace("CViewWork::~CViewWork - Function Begining"); + wxLogTrace("CViewWork::~CViewWork - Function Ending"); } -wxString CWorkView::GetViewName() +wxString CViewWork::GetViewName() { return wxString(_("Work")); } -char** CWorkView::GetViewIcon() +char** CViewWork::GetViewIcon() { return result_xpm; } -void CWorkView::OnCacheHint ( wxListEvent& event ) { - m_iCacheFrom = event.GetCacheFrom(); - m_iCacheTo = event.GetCacheTo(); -} - - -void CWorkView::OnRender(wxTimerEvent &event) { +void CViewWork::OnRender(wxTimerEvent &event) +{ + wxLogTrace("CViewWork::OnRender - Processing Render Event..."); if (!m_bProcessingRenderEvent) { - wxLogTrace("CWorkView::OnRender - Processing Render Event..."); m_bProcessingRenderEvent = true; - wxInt32 iWorkCount = wxGetApp().GetDocument()->GetWorkCount(); - SetItemCount(iWorkCount); + wxInt32 iProjectCount = wxGetApp().GetDocument()->GetWorkCount(); + wxASSERT(NULL != m_pListPane); + m_pListPane->SetItemCount(iProjectCount); m_bProcessingRenderEvent = false; } @@ -136,7 +121,8 @@ void CWorkView::OnRender(wxTimerEvent &event) { } -wxString CWorkView::OnGetItemText(long item, long column) const { +wxString CViewWork::OnGetItemText(long item, long column) const +{ wxString strBuffer; switch(column) { case COLUMN_PROJECT: @@ -169,13 +155,3 @@ wxString CWorkView::OnGetItemText(long item, long column) const { return strBuffer; } - -int CWorkView::OnGetItemImage(long item) const { - return -1; -} - - -wxListItemAttr* CWorkView::OnGetItemAttr(long item) const { - return NULL; -} - diff --git a/clientgui/URLValidator.cpp b/clientgui/ViewWork.h similarity index 60% rename from clientgui/URLValidator.cpp rename to clientgui/ViewWork.h index f59115011f..6a93ec5443 100644 --- a/clientgui/URLValidator.cpp +++ b/clientgui/ViewWork.h @@ -21,45 +21,46 @@ // Revision History: // // $Log$ -// Revision 1.1 2004/05/17 22:15:10 rwalton +// Revision 1.1 2004/09/21 01:26:26 rwalton // *** empty log message *** // // +#ifndef _VIEWWORK_H_ +#define _VIEWWORK_H_ + #if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "URLValidator.h" +#pragma interface "ViewWork.cpp" #endif -#include "stdwx.h" -#include "URLValidator.h" +#include "BOINCBaseView.h" +#include "BOINCTaskCtrl.h" +#include "BOINCListCtrl.h" -IMPLEMENT_DYNAMIC_CLASS(CURLValidator, wxValidator) - - -CURLValidator::CURLValidator(void) : - wxValidator() +class CViewWork : public CBOINCBaseView { - SetBellOnError(false); + DECLARE_DYNAMIC_CLASS( CViewWork ) - // Expression From: - // http://msdn.microsoft.com/library/default.asp? - // url=/library/en-us/script56/html/reconbackreferences.asp - m_reURL.Compile("/(\\w+):\\/\\/([^/:]+)(:\\d*)?([^# ]*)/"); -} - - -CURLValidator::~CURLValidator(void) -{ -} - - -bool CURLValidator::Validate(wxWindow* parent) -{ - - - return true; -} +public: + CViewWork(); + CViewWork(wxNotebook* pNotebook); + + ~CViewWork(); + + virtual wxString GetViewName(); + virtual char** GetViewIcon(); + + virtual void OnRender( wxTimerEvent& event ); + + virtual wxString OnGetItemText(long item, long column) const; + +private: + + DECLARE_EVENT_TABLE() + +}; +#endif diff --git a/clientgui/res/hiddenheader.xpm b/clientgui/res/hiddenheader.xpm new file mode 100644 index 0000000000..6f8057699e --- /dev/null +++ b/clientgui/res/hiddenheader.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *hiddenheader_xpm[] = { +"205 33 27 1", +" c #FF00FF", +". c #739CDE", +"X c #004ABD", +"o c #316BCE", +"O c #0052CE", +"+ c #0063DE", +"@ c #5A94DE", +"# c #ADCEF7", +"$ c #A5CEF7", +"% c #9CC6F7", +"& c #94C6F7", +"* c #8CBDF7", +"= c #4A84DE", +"- c #8CADE7", +"; c #FFFFFF", +": c #0148B2", +"> c #0248B2", +", c #6B9CE7", +"< c #639CE7", +"1 c #B5BCD9", +"2 c #5294E7", +"3 c #84ADE7", +"4 c #4A7BD6", +"5 c #7BA5E7", +"6 c #73A5E7", +"7 c #5A9CE7", +"8 c #2973D6", +" ", +" ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .oXXXXXXXXXXXXXXXXXXXXXXXXXXXXo. ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XO++++++++++++++++++++++++++++OX ", +" X@###################$$%%%&&**=X ", +" X-;;;;;;;;;;;;;;;;;;;;;;;;;;;;.X ", +" :>>>>>X-;;;;;;;;;;;;;;;;;;;;;;;;;;;;,X>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ", +" ::>>>>>X-;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ", +" :::>>>>>X-;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>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>>>>>>>>>>>>>>>> ", +" :::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ", +" :::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "}; diff --git a/clientgui/res/task.xpm b/clientgui/res/task.xpm new file mode 100644 index 0000000000..5d68a625ba --- /dev/null +++ b/clientgui/res/task.xpm @@ -0,0 +1,54 @@ +/* XPM */ +static const char *task_xpm[] = { +"16 16 35 1", +" c #FF00FF", +". c #808080", +"X c #777777", +"o c #C0C0C0", +"O c #5F5F5F", +"+ c #555555", +"@ c #CCCCCC", +"# c #969696", +"$ c #CC9999", +"% c #FFCC99", +"& c #4D4D4D", +"* c #B2B2B2", +"= c #DDDDDD", +"- c #999999", +"; c #CC9966", +": c #996633", +"> c #424242", +", c #666666", +"< c #666633", +"1 c #ADA990", +"2 c #F8F8F8", +"3 c #6699CC", +"4 c #663300", +"5 c #CBCBCB", +"6 c #336666", +"7 c #66CCFF", +"8 c #000066", +"9 c #868686", +"0 c #000080", +"q c #3366FF", +"w c #CCECFF", +"e c #000033", +"r c #FFFFFF", +"t c #330000", +"y c #003333", +" ...Xo ", +" OXo+.@#.o ", +" O$%X o&*=-o ", +" O;$%%X .*ooO ", +"O;:&;%;X>ooo,.. ", +"X:& .;;<;&1X.2*O", +" . o33<;:4.+#5-O", +" 67&;:48o.,9O ", +" o&;:40q3o++ ", +" O;:40q7woo ", +" O;:4e8w7wr3o ", +" O;:4o .w7wr7*o ", +"o::4o o.6wr7wX ", +" oto yXr7. ", +" .rX ", +" o. "}; diff --git a/clientgui/res/tips.xpm b/clientgui/res/tips.xpm new file mode 100644 index 0000000000..144275398e --- /dev/null +++ b/clientgui/res/tips.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static const char *tips_xpm[] = { +"16 16 6 1", +" c #FF00FF", +". c #808080", +"X c #C0C0C0", +"o c #FFFFFF", +"O c #000000", +"+ c #0000FF", +" ....... ", +" ..Xoooooo.. ", +" .XooooXXooooO ", +" .ooooo++ooooO ", +".oooooooooooooO ", +".ooooo+++oooooO.", +".oooooo++oooooO.", +".oooooo++oooooO.", +" .oooo++++oooO..", +" .oooooooooooO. ", +" .XoooooooXO.. ", +" OXoooooOO.. ", +" OOXoooO.. ", +" .OOooO. ", +" .OoO. ", +" OO. "}; diff --git a/clientgui/res/visibleheader.xpm b/clientgui/res/visibleheader.xpm new file mode 100644 index 0000000000..e8778a0a8e --- /dev/null +++ b/clientgui/res/visibleheader.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *visibleheader_xpm[] = { +"205 33 27 1", +" c #FF00FF", +". c #739CDE", +"X c #004ABD", +"o c #316BCE", +"O c #0052CE", +"+ c #0063DE", +"@ c #5A94DE", +"# c #ADCEF7", +"$ c #A5CEF7", +"% c #9CC6F7", +"& c #94C6F7", +"* c #8CBDF7", +"= c #4A84DE", +"- c #8CADE7", +"; c #FFFFFF", +": c #0148B2", +"> c #0248B2", +", c #6B9CE7", +"< c #639CE7", +"1 c #B5BCD9", +"2 c #5294E7", +"3 c #84ADE7", +"4 c #4A7BD6", +"5 c #7BA5E7", +"6 c #73A5E7", +"7 c #5A9CE7", +"8 c #2973D6", +" ", +" ", +" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", +" .oXXXXXXXXXXXXXXXXXXXXXXXXXXXXo. ", +" XXXXXXXXXXXXXXXXXXXXXXX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m b/clientgui/res/web.xpm new file mode 100644 index 0000000000..01b4fc131d --- /dev/null +++ b/clientgui/res/web.xpm @@ -0,0 +1,82 @@ +/* XPM */ +static const char *web_xpm[] = { +"16 16 63 1", +" c #FF00FF", +". c #B2B2B2", +"X c #969696", +"o c #C0C0C0", +"O c #E7E7D6", +"+ c #CCCC66", +"@ c #FFFFFF", +"# c #A0A0A4", +"$ c #FFCC33", +"% c #FFFF66", +"& c #FFCC66", +"* c #EFD6C6", +"= c #CCCCCC", +"- c #CBCBCB", +"; c #CC9999", +": c #999933", +"> c #CCCC33", +", c #868686", +"< c #F8F8F8", +"1 c #CCECFF", +"2 c #9999CC", +"3 c #CC9966", +"4 c #666600", +"5 c #999999", +"6 c #1C1C1C", +"7 c #FFFF99", +"8 c #99FF66", +"9 c #66CC66", +"0 c #33CC33", +"q c #CCCC99", +"w c #777777", +"e c #99CC66", +"r c #66FF66", +"t c #339900", +"y c #339999", +"u c #3366FF", +"i c #333333", +"p c #D7D7D7", +"a c #336600", +"s c #3399CC", +"d c #0099FF", +"f c #3366CC", +"g c #336633", +"h c #FFCC99", +"j c #666633", +"k c #333300", +"l c #99CCFF", +"z c #33FFFF", +"x c #33CCFF", +"c c #336699", +"v c #003300", +"b c #66CC33", +"n c #339933", +"m c #006600", +"M c #000000", +"N c #669933", +"B c #424242", +"V c #003399", +"C c #999966", +"Z c #808080", +"A c #DDDDDD", +"S c #999900", +"D c #5F5F5F", +" .Xo ", +" O+++.@@#o ", +" O$%&.@*=@#o ", +" +%&.@*-;*@#:>o ", +" +&,%7b9ndtma%h+M ", +" +77%NBufV+&hhM ", +" +++++444C++++k ", +" ZZZZZiBZZZZZo ", +"A.....:+SD.....A", +"p.....jZjD.....p"}; diff --git a/clientgui/stdwx.h b/clientgui/stdwx.h index 8f90d5467b..50ee29bf67 100644 --- a/clientgui/stdwx.h +++ b/clientgui/stdwx.h @@ -21,6 +21,9 @@ // Revision History: // // $Log$ +// Revision 1.9 2004/09/21 01:26:23 rwalton +// *** empty log message *** +// // Revision 1.8 2004/09/10 23:17:08 rwalton // *** empty log message *** // @@ -52,24 +55,30 @@ #include "wx/wx.h" #endif -#include // diagnostics support -#include // accelerator support -#include // regular expression support -#include // command line support -#include // configuration support -#include // system settings support -#include // internationalization support -#include // timer support -#include // toolbars support -#include // list control support -#include // messagebox dialog support -#include // notebook support -#include // static line support -#include // socket support -#include // socket streams support -#include // text streams support -#include // date/time support -#include // dynamic array support +#include // diagnostics support +#include // accelerator support +#include // regular expression support +#include // command line support +#include // configuration support +#include // system settings support +#include // internationalization support +#include // timer support +#include // filesystem support +#include // memory virtual filesystem support +#include // memory based device context +#include // bitmap modification support +#include // toolbars support +#include // list control support +#include // messagebox dialog support +#include // panel support +#include // notebook support +#include // html window support +#include // static line support +#include // socket support +#include // socket streams support +#include // text streams support +#include // date/time support +#include // dynamic array support // Standard Libraries