]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/fontdlg.h
Explicitly mention that wxDateTime ticks origin is in UTC.
[wxWidgets.git] / interface / wx / fontdlg.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: fontdlg.h
e54c96f1 3// Purpose: interface of wxFontDialog
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
526954c5 6// Licence: wxWindows licence
23324ae1
FM
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxFontDialog
7c913512 11
23324ae1 12 This class represents the font chooser dialog.
7c913512 13
23324ae1
FM
14 @library{wxcore}
15 @category{cmndlg}
7c913512 16
674d80a7 17 @see overview_cmndlg_font, wxFontData, wxGetFontFromUser()
23324ae1
FM
18*/
19class wxFontDialog : public wxDialog
20{
21public:
23324ae1 22 /**
0b70c946
FM
23 Default ctor.
24 Create() must be called before the dialog can be shown.
23324ae1
FM
25 */
26 wxFontDialog();
0b70c946
FM
27
28 /**
29 Constructor with parent window.
30 */
7c913512 31 wxFontDialog(wxWindow* parent);
0b70c946
FM
32
33 /**
34 Constructor.
674d80a7 35 Pass a parent window, and the @ref wxFontData "font data" object
0b70c946
FM
36 to be used to initialize the dialog controls.
37 */
7c913512 38 wxFontDialog(wxWindow* parent, const wxFontData& data);
23324ae1 39
23324ae1 40 /**
0b70c946
FM
41 Creates the dialog if the wxFontDialog object had been initialized using
42 the default constructor.
43
44 @return @true on success and @false if an error occurred.
23324ae1
FM
45 */
46 bool Create(wxWindow* parent);
0b70c946
FM
47
48 /**
49 Creates the dialog if the wxFontDialog object had been initialized using
50 the default constructor.
51
52 @return @true on success and @false if an error occurred.
53 */
7c913512 54 bool Create(wxWindow* parent, const wxFontData& data);
23324ae1
FM
55
56 //@{
57 /**
674d80a7 58 Returns the @ref wxFontData "font data" associated with the
0b70c946 59 font dialog.
23324ae1 60 */
0b70c946
FM
61 const wxFontData& GetFontData() const;
62 wxFontData& GetFontData();
23324ae1
FM
63 //@}
64
65 /**
7c913512 66 Shows the dialog, returning @c wxID_OK if the user pressed Ok, and
23324ae1 67 @c wxID_CANCEL otherwise.
0b70c946 68
23324ae1
FM
69 If the user cancels the dialog (ShowModal returns @c wxID_CANCEL), no font
70 will be created. If the user presses OK, a new wxFont will be created and
71 stored in the font dialog's wxFontData structure.
0b70c946
FM
72
73 @see GetFontData()
23324ae1
FM
74 */
75 int ShowModal();
76};
77
78
e54c96f1 79
23324ae1
FM
80// ============================================================================
81// Global functions/macros
82// ============================================================================
83
b21126db 84/** @addtogroup group_funcmacro_dialog */
ba2874ff
BP
85//@{
86
23324ae1
FM
87/**
88 Shows the font selection dialog and returns the font selected by user or
ba2874ff
BP
89 invalid font (use wxFont::IsOk() to test whether a font is valid) if the
90 dialog was cancelled.
7c913512
FM
91
92 @param parent
ba2874ff 93 The parent window for the font selection dialog.
7c913512 94 @param fontInit
4cc4bfaf 95 If given, this will be the font initially selected in the dialog.
7c913512 96 @param caption
4cc4bfaf 97 If given, this will be used for the dialog caption.
ba2874ff
BP
98
99 @header{wx/fontdlg.h}
23324ae1 100*/
4cc4bfaf 101wxFont wxGetFontFromUser(wxWindow* parent,
23324ae1
FM
102 const wxFont& fontInit,
103 const wxString& caption = wxEmptyString);
104
ba2874ff
BP
105//@}
106