2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2006-07-26 15:14:01 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2006-07-26 15:14:01 +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-26 15:14:01 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2006-07-26 15:14:01 +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-26 15:14:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef _DLG_MESSAGES_H_
|
|
|
|
#define _DLG_MESSAGES_H_
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "sg_DlgMessages.cpp"
|
|
|
|
#endif
|
2006-11-22 09:51:59 +00:00
|
|
|
|
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
/*!
|
|
|
|
* Includes
|
|
|
|
*/
|
2006-07-26 15:14:01 +00:00
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
////@begin includes
|
2011-03-29 07:42:51 +00:00
|
|
|
#include "ViewNotices.h" // For NoticeListCtrlEvent
|
2006-11-17 06:41:15 +00:00
|
|
|
////@end includes
|
2006-07-26 15:14:01 +00:00
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
/*!
|
|
|
|
* Forward declarations
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin forward declarations
|
2010-07-21 18:37:27 +00:00
|
|
|
class CNoticeListCtrl;
|
2006-11-17 06:41:15 +00:00
|
|
|
////@end forward declarations
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define ID_DLGMESSAGES 10000
|
2006-12-22 04:25:36 +00:00
|
|
|
#define SYMBOL_CDLGMESSAGES_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
|
2006-11-17 06:41:15 +00:00
|
|
|
#define SYMBOL_CDLGMESSAGES_TITLE wxT("")
|
|
|
|
#define SYMBOL_CDLGMESSAGES_IDNAME ID_DLGMESSAGES
|
|
|
|
#define SYMBOL_CDLGMESSAGES_SIZE wxDefaultSize
|
|
|
|
#define SYMBOL_CDLGMESSAGES_POSITION wxDefaultPosition
|
|
|
|
#define ID_COPYSELECTED 10001
|
|
|
|
#define ID_COPYAll 10002
|
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Compatibility
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef wxCLOSE_BOX
|
|
|
|
#define wxCLOSE_BOX 0x1000
|
|
|
|
#endif
|
|
|
|
#ifndef wxFIXED_MINSIZE
|
|
|
|
#define wxFIXED_MINSIZE 0
|
|
|
|
#endif
|
|
|
|
|
2006-11-22 09:51:59 +00:00
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
/*!
|
2011-10-21 12:17:10 +00:00
|
|
|
* CPanelMessages class declaration
|
2006-11-17 06:41:15 +00:00
|
|
|
*/
|
2006-07-26 15:14:01 +00:00
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
class CPanelMessages : public wxPanel
|
2006-07-26 15:14:01 +00:00
|
|
|
{
|
2006-11-17 06:41:15 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS( CPanelMessages )
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
2006-07-26 15:14:01 +00:00
|
|
|
public:
|
2006-11-17 06:41:15 +00:00
|
|
|
/// Constructors
|
|
|
|
CPanelMessages( );
|
|
|
|
CPanelMessages( wxWindow* parent );
|
|
|
|
|
|
|
|
/// Destructors
|
|
|
|
~CPanelMessages( );
|
|
|
|
|
|
|
|
/// Creation
|
|
|
|
bool Create();
|
|
|
|
|
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
|
|
|
|
|
|
|
////@begin CPanelMessages event handler declarations
|
|
|
|
/// wxEVT_ERASE_BACKGROUND event handler for ID_DLGMESSAGES
|
|
|
|
void OnEraseBackground( wxEraseEvent& event );
|
|
|
|
|
2008-07-29 13:06:28 +00:00
|
|
|
void OnRefresh();
|
2006-11-17 06:41:15 +00:00
|
|
|
|
|
|
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
|
|
|
void OnOK( wxCommandEvent& event );
|
|
|
|
|
2007-01-06 05:14:26 +00:00
|
|
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
|
|
|
|
void OnButtonHelp( wxCommandEvent& event );
|
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
////@end CPanelMessages event handler declarations
|
|
|
|
|
|
|
|
////@begin CPanelMessages member function declarations
|
|
|
|
////@end CPanelMessages member function declarations
|
|
|
|
|
|
|
|
bool OnSaveState(wxConfigBase* pConfig);
|
|
|
|
bool OnRestoreState(wxConfigBase* pConfig);
|
2006-07-26 15:14:01 +00:00
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
private:
|
2006-11-22 09:51:59 +00:00
|
|
|
bool m_bProcessingRefreshEvent;
|
2010-07-21 18:37:27 +00:00
|
|
|
CNoticeListCtrl* m_pHtmlListPane;
|
2012-12-23 11:48:27 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
wxStaticText* m_FetchingNoticesText;
|
|
|
|
wxStaticText* m_NoNoticesText;
|
2013-11-11 14:36:30 +00:00
|
|
|
bool m_bFetchingNoticesTextWasDisplayed;
|
|
|
|
bool m_bNoNoticesTextWasDisplayed;
|
2006-07-26 15:14:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-22 09:51:59 +00:00
|
|
|
class CDlgMessages : public wxDialog
|
2006-11-06 13:45:50 +00:00
|
|
|
{
|
2006-11-17 06:41:15 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS( CDlgMessages )
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
2006-11-06 13:45:50 +00:00
|
|
|
public:
|
2006-11-17 06:41:15 +00:00
|
|
|
/// Constructors
|
|
|
|
CDlgMessages( );
|
|
|
|
CDlgMessages( wxWindow* parent, wxWindowID id = SYMBOL_CDLGMESSAGES_IDNAME, const wxString& caption = SYMBOL_CDLGMESSAGES_TITLE, const wxPoint& pos = SYMBOL_CDLGMESSAGES_POSITION, const wxSize& size = SYMBOL_CDLGMESSAGES_SIZE, long style = SYMBOL_CDLGMESSAGES_STYLE );
|
|
|
|
|
2006-11-17 12:15:46 +00:00
|
|
|
~CDlgMessages();
|
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
/// Creation
|
|
|
|
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGMESSAGES_IDNAME, const wxString& caption = SYMBOL_CDLGMESSAGES_TITLE, const wxPoint& pos = SYMBOL_CDLGMESSAGES_POSITION, const wxSize& size = SYMBOL_CDLGMESSAGES_SIZE, long style = SYMBOL_CDLGMESSAGES_STYLE );
|
2006-11-06 13:45:50 +00:00
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
2006-11-06 13:45:50 +00:00
|
|
|
|
2006-12-30 00:50:04 +00:00
|
|
|
/// wxEVT_HELP event handler for ID_DLGMESSAGES
|
|
|
|
void OnHelp( wxHelpEvent& event );
|
|
|
|
|
2006-11-17 06:41:15 +00:00
|
|
|
/// wxEVT_SHOW event handler for ID_DLGMESSAGES
|
|
|
|
void OnShow( wxShowEvent& event );
|
|
|
|
|
|
|
|
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
|
|
|
void OnOK( wxCommandEvent& event );
|
2008-07-29 13:06:28 +00:00
|
|
|
|
|
|
|
void OnRefresh() { m_pBackgroundPanel->OnRefresh(); }
|
2008-08-15 07:13:00 +00:00
|
|
|
|
2006-11-06 13:45:50 +00:00
|
|
|
private:
|
2006-11-17 06:41:15 +00:00
|
|
|
|
|
|
|
bool SaveState();
|
|
|
|
void SaveWindowDimensions();
|
|
|
|
bool RestoreState();
|
|
|
|
void RestoreWindowDimensions();
|
2010-11-12 12:56:29 +00:00
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
void OnMove(wxMoveEvent& event);
|
2006-11-17 06:41:15 +00:00
|
|
|
|
|
|
|
////@begin CDlgMessages member variables
|
|
|
|
CPanelMessages* m_pBackgroundPanel;
|
|
|
|
////@end CDlgMessages member variables
|
2006-11-06 13:45:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-07-26 15:14:01 +00:00
|
|
|
#endif // end CDlgMessages
|