2006-07-20 22:15:29 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
#ifndef _PROJECTSCOMPONENT_H_
|
|
|
|
#define _PROJECTSCOMPONENT_H_
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "sg_ProjectsComponent.cpp"
|
|
|
|
#endif
|
|
|
|
|
2006-07-24 22:10:28 +00:00
|
|
|
class SkinClass;
|
|
|
|
class StatImageLoader;
|
2006-11-06 13:45:50 +00:00
|
|
|
class CSimplePanel;
|
2006-08-07 15:33:03 +00:00
|
|
|
class ImageLoader;
|
2006-10-28 09:02:46 +00:00
|
|
|
class CTransparentStaticLine;
|
2006-07-20 22:15:29 +00:00
|
|
|
|
|
|
|
class CProjectsComponent : public wxPanel {
|
|
|
|
DECLARE_DYNAMIC_CLASS( CProjectsComponent )
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2006-08-07 15:33:03 +00:00
|
|
|
int clientRunMode;
|
2006-11-15 12:01:46 +00:00
|
|
|
int clientNetworkMode;
|
2006-07-21 18:05:43 +00:00
|
|
|
char defaultIcnPath[256];
|
2006-07-20 22:15:29 +00:00
|
|
|
// projects vector
|
|
|
|
std::vector<StatImageLoader*> m_statProjects; // vector of all project icons created for GUI
|
|
|
|
wxImage *g_statIcn;
|
2006-08-07 15:33:03 +00:00
|
|
|
//static content
|
|
|
|
wxStaticText *stMyProj;
|
2006-10-28 09:02:46 +00:00
|
|
|
CTransparentStaticLine *lnMyProjTop;
|
|
|
|
CTransparentStaticLine *lnMyProjBtm;
|
2006-07-20 22:15:29 +00:00
|
|
|
// default icon
|
2006-08-07 15:33:03 +00:00
|
|
|
// spacer
|
|
|
|
ImageLoader *i_spacer;
|
2006-09-15 16:47:04 +00:00
|
|
|
|
|
|
|
wxBitmapButton *btnArwLeft;
|
2006-07-20 22:15:29 +00:00
|
|
|
wxBitmapButton *btnArwRight;
|
2006-08-07 15:33:03 +00:00
|
|
|
wxBitmapButton *btnAddProj;
|
2007-01-05 23:31:38 +00:00
|
|
|
wxBitmapButton *btnHelp;
|
2006-08-07 15:33:03 +00:00
|
|
|
wxBitmapButton *btnMessages;
|
2006-08-24 17:54:54 +00:00
|
|
|
wxBitmapButton *btnAlertMessages;
|
2006-08-07 15:33:03 +00:00
|
|
|
wxBitmapButton *btnPause;
|
|
|
|
wxBitmapButton *btnResume;
|
|
|
|
wxBitmapButton *btnPreferences;
|
|
|
|
wxBitmapButton *btnAdvancedView;
|
2006-07-20 22:15:29 +00:00
|
|
|
|
|
|
|
CProjectsComponent();
|
2006-11-06 13:45:50 +00:00
|
|
|
CProjectsComponent(CSimplePanel* parent,wxPoint coord);
|
2006-07-20 22:15:29 +00:00
|
|
|
~CProjectsComponent();
|
|
|
|
|
|
|
|
void CreateComponent();
|
|
|
|
void UpdateInterface();
|
2006-07-24 22:10:28 +00:00
|
|
|
void ReskinInterface();
|
2006-07-20 22:15:29 +00:00
|
|
|
void OnBtnClick(wxCommandEvent& event);
|
2006-08-07 17:44:46 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
2006-10-31 15:27:00 +00:00
|
|
|
void UpdateProjectArray();
|
2006-08-24 17:54:54 +00:00
|
|
|
|
2007-01-05 23:31:38 +00:00
|
|
|
void OnHelp(wxCommandEvent& event);
|
2006-10-25 14:09:47 +00:00
|
|
|
void OnPreferences(wxCommandEvent& event);
|
2006-11-22 09:51:59 +00:00
|
|
|
void OnMessages(wxCommandEvent& event);
|
|
|
|
void OnSuspend(wxCommandEvent& event);
|
|
|
|
void OnResume(wxCommandEvent& event);
|
2006-10-25 14:09:47 +00:00
|
|
|
|
2006-07-20 22:15:29 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
protected:
|
2006-08-07 15:33:03 +00:00
|
|
|
void OnEraseBackground(wxEraseEvent& event);
|
2006-07-20 22:15:29 +00:00
|
|
|
|
2006-08-24 17:54:54 +00:00
|
|
|
private:
|
|
|
|
wxTimer* checkForMessagesTimer;
|
2006-10-31 15:27:00 +00:00
|
|
|
int m_maxNumOfIcons;
|
|
|
|
int m_leftIndex;
|
2006-08-24 17:54:54 +00:00
|
|
|
bool receivedErrorMessage;
|
|
|
|
bool alertMessageDisplayed;
|
2006-11-22 21:26:21 +00:00
|
|
|
size_t lastMessageId;
|
2006-10-25 14:09:47 +00:00
|
|
|
void OnMessageCheck(wxTimerEvent& WXUNUSED(event));
|
2006-08-24 17:54:54 +00:00
|
|
|
void MessagesViewed();
|
2006-10-31 15:27:00 +00:00
|
|
|
void UpdateDisplayedProjects();
|
2006-08-24 17:54:54 +00:00
|
|
|
};
|
2006-07-20 22:15:29 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|