2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: colordlg.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxColourDialog
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxColourDialog
|
|
|
|
@wxheader{colordlg.h}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This class represents the colour chooser dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{cmndlg}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-09 22:57:09 -04:00
|
|
|
@see @ref overview_cmndlg_colour, wxColour, wxColourData,
|
|
|
|
wxGetColourFromUser()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxColourDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-04-09 22:57:09 -04: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 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see wxColourData
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor.
|
|
|
|
*/
|
|
|
|
~wxColourDialog();
|
|
|
|
|
|
|
|
/**
|
2008-04-09 22:57:09 -04:00
|
|
|
Same as wxColourDialog().
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
bool Create(wxWindow* parent, wxColourData* data = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-09 22:57:09 -04:00
|
|
|
Returns the colour data associated with the colour dialog.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxColourData GetColourData();
|
|
|
|
|
|
|
|
/**
|
2008-04-09 22:57:09 -04:00
|
|
|
Shows the dialog, returning wxID_OK if the user pressed OK, and
|
|
|
|
wxID_CANCEL otherwise.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
int ShowModal();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
// ============================================================================
|
|
|
|
// Global functions/macros
|
|
|
|
// ============================================================================
|
|
|
|
|
2008-03-18 15:30:01 -04:00
|
|
|
/** @ingroup group_funcmacro_dialog */
|
|
|
|
//@{
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-18 15:30:01 -04: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 09:43:31 -05:00
|
|
|
|
|
|
|
@param parent
|
2008-03-18 15:30:01 -04:00
|
|
|
The parent window for the colour selection dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param colInit
|
2008-03-09 08:33:59 -04:00
|
|
|
If given, this will be the colour initially selected in the dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param caption
|
2008-03-09 08:33:59 -04:00
|
|
|
If given, this will be used for the dialog caption.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param data
|
2008-03-18 15:30:01 -04: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 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxColour wxGetColourFromUser(wxWindow* parent,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxColour& colInit,
|
|
|
|
const wxString& caption = wxEmptyString,
|
2008-03-09 08:33:59 -04:00
|
|
|
wxColourData* data = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
2008-03-18 15:30:01 -04:00
|
|
|
//@}
|
|
|
|
|