2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2006-01-23 11:30:25 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2024-07-15 00:46:01 +00:00
|
|
|
// Copyright (C) 2024 University of California
|
2006-01-23 11:30:25 +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-01-23 11:30:25 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2006-01-23 11:30:25 +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-01-23 11:30:25 +00:00
|
|
|
//
|
|
|
|
|
2017-04-08 06:54:49 +00:00
|
|
|
#ifndef BOINC_DLGGENERICMESSAGE_H
|
|
|
|
#define BOINC_DLGGENERICMESSAGE_H
|
2006-01-23 11:30:25 +00:00
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "DlgGenericMessage.cpp"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Includes
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin includes
|
|
|
|
////@end includes
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Forward declarations
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin forward declarations
|
|
|
|
////@end forward declarations
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define ID_DIALOG 10000
|
2024-07-15 00:46:01 +00:00
|
|
|
#ifndef wxCLOSE_BOX
|
|
|
|
#define wxCLOSE_BOX 0x1000
|
|
|
|
#endif
|
2006-11-06 13:45:50 +00:00
|
|
|
#ifdef __WXMAC__
|
|
|
|
#define SYMBOL_CDLGGENERICMESSAGE_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
|
|
|
|
#else
|
2006-01-23 11:30:25 +00:00
|
|
|
#define SYMBOL_CDLGGENERICMESSAGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
|
2006-11-06 13:45:50 +00:00
|
|
|
#endif
|
2006-01-23 11:30:25 +00:00
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
2024-07-15 00:46:01 +00:00
|
|
|
* CDlgGenericMessage class declaration
|
2006-01-23 11:30:25 +00:00
|
|
|
*/
|
|
|
|
|
2024-07-15 00:46:01 +00:00
|
|
|
struct CDlgGenericMessageButton
|
|
|
|
{
|
|
|
|
CDlgGenericMessageButton(bool show = true, wxWindowID id = wxID_OK, wxString label = _T("&OK"))
|
|
|
|
{
|
|
|
|
this->show = show;
|
|
|
|
this->id = id;
|
|
|
|
this->label = label;
|
|
|
|
}
|
|
|
|
bool show = true;
|
|
|
|
wxWindowID id = wxID_OK;
|
|
|
|
wxString label = _T("&OK");
|
|
|
|
};
|
2006-01-23 11:30:25 +00:00
|
|
|
|
2024-07-15 00:46:01 +00:00
|
|
|
struct CDlgGenericMessageParameters
|
|
|
|
{
|
|
|
|
wxWindowID id = ID_DIALOG;
|
|
|
|
wxString caption = _T("");
|
|
|
|
wxPoint pos = wxDefaultPosition;
|
|
|
|
wxSize size = wxSize(400, 300);
|
|
|
|
long style = SYMBOL_CDLGGENERICMESSAGE_STYLE;
|
|
|
|
wxString message = _T("");
|
|
|
|
bool showDisableMessage = true;
|
|
|
|
CDlgGenericMessageButton button1 = CDlgGenericMessageButton(true, wxID_OK, _T("&OK"));
|
|
|
|
CDlgGenericMessageButton button2 = CDlgGenericMessageButton(true, wxID_CANCEL, _T("Cancel"));
|
|
|
|
};
|
2006-01-23 11:30:25 +00:00
|
|
|
|
|
|
|
class CDlgGenericMessage: public wxDialog
|
2023-05-05 18:05:20 +00:00
|
|
|
{
|
2006-01-23 11:30:25 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS( CDlgGenericMessage )
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// Constructors
|
|
|
|
CDlgGenericMessage( );
|
2024-07-15 00:46:01 +00:00
|
|
|
CDlgGenericMessage( wxWindow* parent, CDlgGenericMessageParameters* parameters = NULL );
|
2006-01-23 11:30:25 +00:00
|
|
|
|
|
|
|
////@begin CDlgGenericMessage event handler declarations
|
|
|
|
|
|
|
|
////@end CDlgGenericMessage event handler declarations
|
|
|
|
|
|
|
|
////@begin CDlgGenericMessage member function declarations
|
|
|
|
|
|
|
|
/// Retrieves bitmap resources
|
|
|
|
wxBitmap GetBitmapResource( const wxString& name );
|
|
|
|
|
|
|
|
/// Retrieves icon resources
|
|
|
|
wxIcon GetIconResource( const wxString& name );
|
|
|
|
////@end CDlgGenericMessage member function declarations
|
|
|
|
|
|
|
|
/// Should we show tooltips?
|
|
|
|
static bool ShowToolTips();
|
|
|
|
|
2024-07-15 00:46:01 +00:00
|
|
|
bool GetDisableMessageValue();
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// Creation
|
|
|
|
bool Create();
|
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
|
|
|
|
|
|
|
////@begin CDlgGenericMessage member variables
|
|
|
|
wxWindow* m_DialogParent;
|
|
|
|
CDlgGenericMessageParameters m_DialogParameters;
|
|
|
|
wxCheckBox* m_DialogDisableMessage = NULL;
|
|
|
|
////@end CDlgGenericMessage member variables
|
2006-01-23 11:30:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|