Version: 2.9.4
Public Member Functions
wxFontDialog Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/fontdlg.h>

Inheritance diagram for wxFontDialog:

Detailed Description

This class represents the font chooser dialog.

Library:  wxCore
Category:  Common Dialogs
参照:
overview_cmndlg_font, wxFontData, wxGetFontFromUser()

Public Member Functions

 wxFontDialog ()
 Default ctor.
 wxFontDialog (wxWindow *parent)
 Constructor with parent window.
 wxFontDialog (wxWindow *parent, const wxFontData &data)
 Constructor.
bool Create (wxWindow *parent)
 Creates the dialog if the wxFontDialog object had been initialized using the default constructor.
bool Create (wxWindow *parent, const wxFontData &data)
 Creates the dialog if the wxFontDialog object had been initialized using the default constructor.
int ShowModal ()
 Shows the dialog, returning wxID_OK if the user pressed Ok, and wxID_CANCEL otherwise.
const wxFontDataGetFontData () const
 Returns the font data associated with the font dialog.
wxFontDataGetFontData ()
 Returns the font data associated with the font dialog.

List of all members.


Constructor & Destructor Documentation

wxFontDialog::wxFontDialog ( )

Default ctor.

Create() must be called before the dialog can be shown.

wxFontDialog::wxFontDialog ( wxWindow parent)

Constructor with parent window.

wxFontDialog::wxFontDialog ( wxWindow parent,
const wxFontData data 
)

Constructor.

Pass a parent window, and the font data object to be used to initialize the dialog controls.


Member Function Documentation

bool wxFontDialog::Create ( wxWindow parent)

Creates the dialog if the wxFontDialog object had been initialized using the default constructor.

Returns:
true on success and false if an error occurred.
bool wxFontDialog::Create ( wxWindow parent,
const wxFontData data 
)

Creates the dialog if the wxFontDialog object had been initialized using the default constructor.

Returns:
true on success and false if an error occurred.
wxFontData& wxFontDialog::GetFontData ( )

Returns the font data associated with the font dialog.

const wxFontData& wxFontDialog::GetFontData ( ) const

Returns the font data associated with the font dialog.

int wxFontDialog::ShowModal ( ) [virtual]

Shows the dialog, returning wxID_OK if the user pressed Ok, and wxID_CANCEL otherwise.

If the user cancels the dialog (ShowModal returns wxID_CANCEL), no font will be created. If the user presses OK, a new wxFont will be created and stored in the font dialog's wxFontData structure.

参照:
GetFontData()

Reimplemented from wxDialog.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines