2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2006-07-20 22:15:29 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2006-07-20 22:15:29 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2006-07-20 22:15:29 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2006-07-20 22:15:29 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2006-07-20 22:15:29 +00:00
|
|
|
|
|
|
|
#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
|
2007-05-07 20:02:03 +00:00
|
|
|
ImageLoader *i_spacer1;
|
|
|
|
ImageLoader *i_spacer2;
|
|
|
|
ImageLoader *i_spacer3;
|
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-08-15 18:06:18 +00:00
|
|
|
wxBitmapButton *btnSynchronize;
|
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;
|
2007-05-07 20:02:03 +00:00
|
|
|
wxWindow *w_sp1;
|
|
|
|
wxWindow *w_sp2;
|
|
|
|
wxWindow *w_sp3;
|
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();
|
2010-07-23 15:25:39 +00:00
|
|
|
void MessagesViewed();
|
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);
|
2009-10-14 17:11:57 +00:00
|
|
|
void OnWizardAttach(wxCommandEvent& event);
|
|
|
|
void OnWizardUpdate(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);
|
2010-07-23 15:25:39 +00:00
|
|
|
void OnMessageCheck(wxTimerEvent& WXUNUSED(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;
|
2008-07-29 13:06:28 +00:00
|
|
|
bool m_bIs_acct_mgr_detected;
|
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
|
|
|
|
|