2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: colordlg.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxColourDialog
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxColourDialog
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
This class represents the colour chooser dialog.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxcore}
|
|
|
|
@category{cmndlg}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-04-10 02:57:09 +00:00
|
|
|
@see @ref overview_cmndlg_colour, wxColour, wxColourData,
|
|
|
|
wxGetColourFromUser()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
class wxColourDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-04-10 02:57:09 +00:00
|
|
|
Constructor. Pass a parent window, and optionally a pointer to a block
|
|
|
|
of colour data, which will be copied to the colour dialog's colour
|
|
|
|
data.
|
|
|
|
|
|
|
|
Custom colours from colour data object will be be used in the dialog's
|
|
|
|
colour palette. Invalid entries in custom colours list will be ignored
|
|
|
|
on some platforms(GTK) or replaced with white colour on platforms where
|
|
|
|
custom colours palette has fixed size (MSW).
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see wxColourData
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-09 12:33:59 +00:00
|
|
|
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor.
|
|
|
|
*/
|
2008-09-22 19:01:17 +00:00
|
|
|
virtual ~wxColourDialog();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-04-10 02:57:09 +00:00
|
|
|
Same as wxColourDialog().
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-09 12:33:59 +00:00
|
|
|
bool Create(wxWindow* parent, wxColourData* data = NULL);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-04-10 02:57:09 +00:00
|
|
|
Returns the colour data associated with the colour dialog.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-24 23:29:43 +00:00
|
|
|
wxColourData& GetColourData();
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-04-10 02:57:09 +00:00
|
|
|
Shows the dialog, returning wxID_OK if the user pressed OK, and
|
|
|
|
wxID_CANCEL otherwise.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-22 19:01:17 +00:00
|
|
|
virtual int ShowModal();
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
// ============================================================================
|
|
|
|
// Global functions/macros
|
|
|
|
// ============================================================================
|
|
|
|
|
2009-01-05 20:48:06 +00:00
|
|
|
/** @addtogroup group_funcmacro_dialog */
|
2008-03-18 19:30:01 +00:00
|
|
|
//@{
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
2008-03-18 19:30:01 +00:00
|
|
|
Shows the colour selection dialog and returns the colour selected by user
|
|
|
|
or invalid colour (use wxColour::IsOk() to test whether a colour is valid)
|
|
|
|
if the dialog was cancelled.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
|
|
|
@param parent
|
2008-03-18 19:30:01 +00:00
|
|
|
The parent window for the colour selection dialog.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param colInit
|
2008-03-09 12:33:59 +00:00
|
|
|
If given, this will be the colour initially selected in the dialog.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param caption
|
2008-03-09 12:33:59 +00:00
|
|
|
If given, this will be used for the dialog caption.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param data
|
2008-03-18 19:30:01 +00:00
|
|
|
Optional object storing additional colour dialog settings, such as
|
|
|
|
custom colours. If none is provided the same settings as the last time
|
|
|
|
are used.
|
|
|
|
|
|
|
|
@header{wx/colordlg.h}
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-09 12:33:59 +00:00
|
|
|
wxColour wxGetColourFromUser(wxWindow* parent,
|
2008-03-08 13:52:38 +00:00
|
|
|
const wxColour& colInit,
|
|
|
|
const wxString& caption = wxEmptyString,
|
2008-03-09 12:33:59 +00:00
|
|
|
wxColourData* data = NULL);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
2008-03-18 19:30:01 +00:00
|
|
|
//@}
|
|
|
|
|