wxArt2D
Public Member Functions | Protected Attributes | List of all members
a2dTextPropDlg Class Reference

Display a font selection dialog. More...

#include <editor/fontdlg.h>

Inheritance diagram for a2dTextPropDlg:
Inheritance graph
[legend]
Collaboration diagram for a2dTextPropDlg:
Collaboration graph
[legend]

Public Member Functions

 a2dTextPropDlg (wxWindow *parent=NULL, const a2dFont &currentfont=*a2dDEFAULT_CANVASFONT, unsigned int textflags=a2dText::a2dCANVASTEXT_DEFAULTFLAGS, int alignment=a2dDEFAULT_ALIGNMENT)
 Constructor.
 
virtual ~a2dTextPropDlg ()
 Destructor.
 
const a2dFontGetFontData () const
 Returns the font.
 
void SetAlignment (int alignment)
 Set the position of the anchor point w.r.t the text. More...
 
int GetAlignment () const
 Get the position of the anchor point w.r.t the text. More...
 
void SetTextFlags (unsigned int textflags)
 Set the text flags.
 
unsigned int GetTextFlags () const
 Get the text flags.
 
void OnChangeFont ()
 User interface event handler. More...
 
void OnChangeFontType (wxCommandEvent &event)
 User interface event handler.
 
void OnChangeFontName (wxCommandEvent &event)
 User interface event handler.
 
void OnChangeFontStyle (wxCommandEvent &event)
 User interface event handler.
 
void OnChangeFontSize (wxCommandEvent &event)
 User interface event handler.
 
void OnChangeFontSizeList (wxCommandEvent &event)
 User interface event handler.
 
void OnSearchPath (wxCommandEvent &event)
 User interface event handler.
 
void OnAlignment (wxCommandEvent &event)
 User interface event handler.
 
void OnSize (wxSizeEvent &event)
 User interface event handler.
 

Protected Attributes

a2dFont m_font
 Selected font.
 
a2dFontInfoList m_fonts
 Font enumeration list.
 
double m_viewscale
 Scale at which the font is viewed.
 
int m_alignment
 Font alignment.
 
unsigned int m_textflags
 contains several text flags.
 
a2dFontInfo m_currentinfo
 
wxListBox * m_typelist
 User interface object.
 
wxListBox * m_fontlist
 User interface object.
 
wxListBox * m_stylelist
 User interface object.
 
wxTextCtrl * m_sizeedit
 User interface object.
 
wxListBox * m_sizelist
 User interface object.
 
wxCheckBox * m_aligncheck
 User interface object.
 
wxCheckBox * m_textframe
 
wxCheckBox * m_textbackground
 
a2dCanvasm_canvas
 User interface object.
 
a2dTextm_canvastext
 Displayed text.
 
a2dSLinem_canvasline1
 Horizontal line to indicate alignment.
 
a2dSLinem_canvasline2
 Vertical line to indicate alignment.
 

Detailed Description

Display a font selection dialog.

Todo:
EW: Font scaling in the selection dialog. Now it is always scaled to fit in the window, but how to handle font sizes (eg. 0.000001 to 100000) in a consistent way? Maybe do the scaling in magnitudes of 10?

Definition at line 67 of file fontdlg.h.

Member Function Documentation

int a2dTextPropDlg::GetAlignment ( ) const
inline

Get the position of the anchor point w.r.t the text.

Returns
The alignment setting.

Definition at line 107 of file fontdlg.h.

void a2dTextPropDlg::OnChangeFont ( )

User interface event handler.

Todo:
alignment

Definition at line 471 of file fontdlg.cpp.

void a2dTextPropDlg::SetAlignment ( int  alignment)
inline

Set the position of the anchor point w.r.t the text.

Parameters
alignmentsets the direction of the anchor point. The direction can be set like e.g. wxMINX | wxMINY, meaning a specific corner of the boundingbox. Not specifying either a horizontal or vertical position will default to the centre. So only specifying wxMINX corresponds to the left and middle Y of bbox position. If Yaxis is up in a view, use wxBASELINE to have text origin start at (x,y). If Yaxis is down in a view, use wxBASELINE_CONTRA to have text origin start at (x,y).
+-----^-----+ wxMAXY
| # |
| # |
| #### #### |
|# # # #|
+-####-#---#+ wxBASELINE
| # |
| ### |
+-----v-----+ wxMINY
wxMINX wxMAXX

Definition at line 99 of file fontdlg.h.


The documentation for this class was generated from the following files:
a2dTextPropDlg Class Reference -- Sun Oct 12 2014 17:04:50 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation