33 wxID_PATHLIST = wxID_HIGHEST + 1,
41 EVT_BUTTON( wxID_NEW, a2dFontSearchPathDialog::OnAdd )
42 EVT_BUTTON( wxID_DELETE, a2dFontSearchPathDialog::OnDelete )
43 EVT_BUTTON( wxID_OK, a2dFontSearchPathDialog::OnOK )
44 EVT_BUTTON( wxID_PATHBUTTON, a2dFontSearchPathDialog::OnPathButton )
45 EVT_LISTBOX( wxID_PATHLIST, a2dFontSearchPathDialog::OnListBox )
46 EVT_TEXT( wxID_PATHEDIT, a2dFontSearchPathDialog::OnText )
49 a2dFontSearchPathDialog::a2dFontSearchPathDialog( wxWindow* parent )
50 : wxDialog( parent, -1, _( "Font Search Path" ), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
52 wxBoxSizer* topsizer =
new wxBoxSizer( wxVERTICAL );
56 #if wxCHECK_VERSION(2,7,0)
57 for ( wxPathList::iterator node = pathlist.begin(); node != pathlist.end(); node++ )
59 for ( wxPathList::compatibility_iterator node = pathlist.GetFirst(); node; node = node->GetNext() )
61 paths.Add( node->GetData() );
62 m_listbox =
new wxListBox(
this, wxID_PATHLIST, wxDefaultPosition, wxDefaultSize, paths );
63 topsizer->Add( m_listbox, 1, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, 10 );
65 wxBoxSizer* editsizer =
new wxBoxSizer( wxHORIZONTAL );
66 m_textctrl =
new wxTextCtrl(
this, wxID_PATHEDIT, wxT(
"" ) );
67 editsizer->Add( m_textctrl, 1, wxEXPAND, 0 );
68 m_button =
new wxButton(
this, wxID_PATHBUTTON, wxT(
"..." ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
69 editsizer->Add( m_button, 0, wxEXPAND, 0 );
70 topsizer->Add( editsizer, 0, wxBOTTOM | wxLEFT | wxRIGHT | wxEXPAND, 10 );
72 wxBoxSizer* buttonsizer =
new wxBoxSizer( wxHORIZONTAL );
74 wxBoxSizer* adddelsizer =
new wxBoxSizer( wxHORIZONTAL );
75 adddelsizer->Add(
new wxButton(
this, wxID_NEW, _(
"Add" ) ), 0, wxRIGHT, 10 );
76 adddelsizer->Add(
new wxButton(
this, wxID_DELETE, _(
"Delete" ) ), 0, 0, 0 );
77 buttonsizer->Add( adddelsizer, 1, wxRIGHT | wxEXPAND, 30 );
79 buttonsizer->Add(
new wxButton(
this, wxID_OK, _(
"OK" ) ), 0, wxRIGHT, 10 );
80 buttonsizer->Add(
new wxButton(
this, wxID_CANCEL, _(
"Cancel" ) ), 0, 0, 0 );
81 topsizer->Add( buttonsizer, 0, wxLEFT | wxBOTTOM | wxRIGHT | wxEXPAND, 10 );
84 topsizer->SetSizeHints(
this );
98 const wxString& dir = wxDirSelector( _(
"Choose a folder" ) );
106 if ( idx != wxNOT_FOUND )
122 for (
unsigned int i = 0; i <
m_listbox->GetCount(); i++ )
123 pathlist.Add(
m_listbox->GetString( i ) );
124 #if wxCHECK_VERSION(2,7,0)
127 wxDialog::OnOK( event );
142 wxID_FONTTYPE_LIST = wxID_HIGHEST + 1,
147 wxID_FONT_SEARCHPATH,
149 wxID_ALIGN_TL, wxID_ALIGN_T, wxID_ALIGN_TR,
150 wxID_ALIGN_L, wxID_ALIGN_C, wxID_ALIGN_R,
151 wxID_ALIGN_BL, wxID_ALIGN_B, wxID_ALIGN_BR,
154 wxID_CHECK_BACKGROUND
160 EVT_LISTBOX( wxID_FONTTYPE_LIST, a2dTextPropDlg::OnChangeFontType )
161 EVT_LISTBOX( wxID_FONTNAME_LIST, a2dTextPropDlg::OnChangeFontName )
162 EVT_LISTBOX( wxID_FONTSTYLE_LIST, a2dTextPropDlg::OnChangeFontStyle )
163 EVT_LISTBOX( wxID_FONTSIZE_LIST, a2dTextPropDlg::OnChangeFontSizeList )
164 EVT_TEXT( wxID_FONTSIZE_EDIT, a2dTextPropDlg::OnChangeFontSize )
165 EVT_BUTTON( wxID_FONT_SEARCHPATH, a2dTextPropDlg::OnSearchPath )
166 EVT_BUTTON( wxID_ALIGN_TL, a2dTextPropDlg::OnAlignment )
167 EVT_BUTTON( wxID_ALIGN_T, a2dTextPropDlg::OnAlignment )
168 EVT_BUTTON( wxID_ALIGN_TR, a2dTextPropDlg::OnAlignment )
169 EVT_BUTTON( wxID_ALIGN_L, a2dTextPropDlg::OnAlignment )
170 EVT_BUTTON( wxID_ALIGN_C, a2dTextPropDlg::OnAlignment )
171 EVT_BUTTON( wxID_ALIGN_R, a2dTextPropDlg::OnAlignment )
172 EVT_BUTTON( wxID_ALIGN_BL, a2dTextPropDlg::OnAlignment )
173 EVT_BUTTON( wxID_ALIGN_B, a2dTextPropDlg::OnAlignment )
174 EVT_BUTTON( wxID_ALIGN_BR, a2dTextPropDlg::OnAlignment )
175 EVT_CHECKBOX( wxID_CHECK_ALIGN, a2dTextPropDlg::OnAlignment )
176 EVT_CHECKBOX( wxID_CHECK_FRAME, a2dTextPropDlg::OnAlignment )
177 EVT_CHECKBOX( wxID_CHECK_BACKGROUND, a2dTextPropDlg::OnAlignment )
178 EVT_SIZE( a2dTextPropDlg::OnSize )
181 a2dTextPropDlg::a2dTextPropDlg( wxWindow* parent, const
a2dFont& currentfont,
unsigned int textflags,
int alignment )
182 : wxDialog( parent, -1, _( "Choose Font" ), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
184 m_currentinfo = currentfont.GetFontInfo();
186 m_textflags = textflags;
187 m_alignment = alignment;
189 m_fonts.DeleteContents(
true );
192 wxBoxSizer* propsizer =
new wxBoxSizer( wxHORIZONTAL );
193 wxBoxSizer* panelsizer =
new wxBoxSizer( wxVERTICAL );
194 wxBoxSizer* sizesizer =
new wxBoxSizer( wxVERTICAL );
196 wxBoxSizer* typesizer =
new wxBoxSizer( wxVERTICAL );
197 typesizer->Add(
new wxStaticText(
this, -1, _(
"Type" ) ), 0, 0, 0 );
199 types.Add( _(
"* (All types)" ) );
200 for (
size_t i = 0; i < m_fonts.GetCount(); i++ )
202 wxString type = m_fonts.Item( i )->GetData()->GetType();
204 for ( j = 0; j < types.GetCount(); j++ )
206 if ( types.Item( j ) == type )
209 if ( j == types.GetCount() )
212 m_typelist =
new wxListBox(
this, wxID_FONTTYPE_LIST, wxDefaultPosition, wxDefaultSize, types, wxLB_SORT );
213 typesizer->Add( m_typelist, 1, wxEXPAND, 0 );
214 propsizer->Add( typesizer, 1, wxALL | wxEXPAND, 10 );
216 wxBoxSizer* fontsizer =
new wxBoxSizer( wxVERTICAL );
217 fontsizer->Add(
new wxStaticText(
this, -1, _(
"Font" ) ), 0, 0, 0 );
218 wxArrayString fontnames;
219 m_fontlist =
new wxListBox(
this, wxID_FONTNAME_LIST, wxDefaultPosition, wxDefaultSize, fontnames, wxLB_SORT );
220 fontsizer->Add( m_fontlist, 1, wxEXPAND, 0 );
221 propsizer->Add( fontsizer, 2, wxALL | wxEXPAND, 10 );
223 wxBoxSizer* stylesizer =
new wxBoxSizer( wxVERTICAL );
224 stylesizer->Add(
new wxStaticText(
this, -1, _(
"Style" ) ), 0, wxLEFT | wxRIGHT | wxTOP, 5 );
225 wxArrayString styles;
226 m_stylelist =
new wxListBox(
this, wxID_FONTSTYLE_LIST, wxDefaultPosition, wxDefaultSize, styles, wxLB_SORT );
227 stylesizer->Add( m_stylelist, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, 5 );
228 propsizer->Add( stylesizer, 1, wxALL | wxEXPAND, 5 );
230 sizesizer->Add(
new wxStaticText(
this, -1, _(
"Size" ) ), 0, wxLEFT | wxRIGHT | wxTOP, 5 );
232 sizes.Add( wxT(
"1.0" ) );
233 sizes.Add( wxT(
"2.0" ) );
234 sizes.Add( wxT(
"5.0" ) );
235 sizes.Add( wxT(
"10.0" ) );
236 sizes.Add( wxT(
"20.0" ) );
237 sizes.Add( wxT(
"50.0" ) );
238 sizes.Add( wxT(
"100.0" ) );
239 sizes.Add( wxT(
"200.0" ) );
240 sizes.Add( wxT(
"500.0" ) );
241 m_sizelist =
new wxListBox(
this, wxID_FONTSIZE_LIST, wxDefaultPosition, wxDefaultSize, sizes );
242 m_sizeedit =
new wxTextCtrl(
this, wxID_FONTSIZE_EDIT, wxT(
"50.0" ) );
244 sizetext.Printf( wxT(
"%f" ), m_currentinfo.GetSize() );
245 m_sizeedit->SetValue( sizetext );
247 sizesizer->Add( m_sizeedit, 0, wxLEFT | wxRIGHT | wxEXPAND, 5 );
248 sizesizer->Add( m_sizelist, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, 5 );
250 propsizer->Add( sizesizer, 1, wxALL | wxEXPAND, 5 );
251 panelsizer->Add( propsizer, 2, wxALL | wxEXPAND, 5 );
253 wxBoxSizer* bottomsizer =
new wxBoxSizer( wxHORIZONTAL );
255 wxBoxSizer* alignsizer =
new wxBoxSizer( wxVERTICAL );
256 alignsizer->Add(
new wxStaticText(
this, -1, _(
"Alignment" ) ), 0, wxLEFT | wxRIGHT | wxTOP, 5 );
257 wxGridSizer* alignsizer2 =
new wxGridSizer( 3 );
261 wxFont font( 12, wxDECORATIVE, wxNORMAL, wxNORMAL,
false, wxT(
"WingDings" ) );
262 button =
new wxButton(
this, wxID_ALIGN_TL, wxT(
"\xeb" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
263 button->SetFont( font );
264 alignsizer2->Add( button, 0, 0, 0 );
265 button =
new wxButton(
this, wxID_ALIGN_T, wxT(
"\xe9" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
266 button->SetFont( font );
267 alignsizer2->Add( button, 0, 0, 0 );
268 button =
new wxButton(
this, wxID_ALIGN_TR, wxT(
"\xec" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
269 button->SetFont( font );
270 alignsizer2->Add( button, 0, 0, 0 );
271 button =
new wxButton(
this, wxID_ALIGN_L, wxT(
"\xe7" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
272 button->SetFont( font );
273 alignsizer2->Add( button, 0, 0, 0 );
274 button =
new wxButton(
this, wxID_ALIGN_C, wxT(
"\x6c" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
275 button->SetFont( font );
276 alignsizer2->Add( button, 0, 0, 0 );
277 button =
new wxButton(
this, wxID_ALIGN_R, wxT(
"\xe8" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
278 button->SetFont( font );
279 alignsizer2->Add( button, 0, 0, 0 );
280 button =
new wxButton(
this, wxID_ALIGN_BL, wxT(
"\xed" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
281 button->SetFont( font );
282 alignsizer2->Add( button, 0, 0, 0 );
283 button =
new wxButton(
this, wxID_ALIGN_B, wxT(
"\xea" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
284 button->SetFont( font );
285 alignsizer2->Add( button, 0, 0, 0 );
286 button =
new wxButton(
this, wxID_ALIGN_BR, wxT(
"\xee" ), wxDefaultPosition, wxSize( 32, 32 ), wxBU_EXACTFIT );
287 button->SetFont( font );
288 alignsizer2->Add( button, 0, 0, 0 );
290 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_TL, wxT(
"" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
291 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_T, wxT(
"^" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
292 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_TR, wxT(
"" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
293 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_L, wxT(
"<" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
294 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_C, wxT(
"o" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
295 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_R, wxT(
">" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
296 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_BL, wxT(
"" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
297 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_B, wxT(
"v" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
298 alignsizer2->Add(
new wxButton(
this, wxID_ALIGN_BR, wxT(
"" ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ), 1, wxEXPAND, 0 );
300 alignsizer->Add( alignsizer2, 0, wxALL | wxEXPAND, 5 );
301 m_aligncheck =
new wxCheckBox(
this, wxID_CHECK_ALIGN, _(
"Align on bbox" ) );
302 m_aligncheck->SetValue( (m_alignment & wxBASELINE) > 0 );
303 alignsizer->Add( m_aligncheck, 0, 0 );
305 m_textframe =
new wxCheckBox(
this, wxID_CHECK_FRAME, _(
"Frame around text" ) );
307 alignsizer->Add( m_textframe, 0, 0 );
309 m_textbackground =
new wxCheckBox(
this, wxID_CHECK_BACKGROUND, _(
"Fill text background" ) );
311 alignsizer->Add( m_textbackground, 0, 0 );
313 bottomsizer->Add( alignsizer, 0, wxALL | wxEXPAND, 5 );
315 m_canvas =
new a2dCanvas(
this, -1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER );
316 m_canvas->SetYaxis(
true );
317 m_canvas->SetScaleOnResize(
false );
319 m_canvastext =
new a2dText( _T(
"ABCDEFGabcdefg12345" ) );
320 m_canvastext->SetPosXY( 0.0, 0.0 );
322 m_canvastext->SetStroke( *wxBLACK );
323 root->
Append( m_canvastext );
324 m_canvasline1 =
new a2dSLine( 0.0, 0.0, 1.0, 0.0 );
325 m_canvasline1->SetStroke( wxColour( 0xc0, 0xc0, 0xc0 ), 1 );
326 root->
Append( m_canvasline1 );
327 m_canvasline2 =
new a2dSLine( 0.0, 0.0, 0.0, 1.0 );
328 m_canvasline2->SetStroke( wxColour( 0xc0, 0xc0, 0xc0 ), 1 );
329 root->
Append( m_canvasline2 );
330 bottomsizer->Add( m_canvas, 1, wxALL | wxEXPAND, 5 );
332 panelsizer->Add( bottomsizer, 1, wxALL | wxEXPAND, 5 );
334 wxBoxSizer* buttonsizer =
new wxBoxSizer( wxHORIZONTAL );
335 buttonsizer->Add(
new wxButton(
this, wxID_FONT_SEARCHPATH, _(
"Search Path" ) ), 0, wxALL, 5 );
336 buttonsizer->Add(
new wxButton(
this, wxID_OK, _(
"OK" ) ), 0, wxALL, 5 );
337 buttonsizer->Add(
new wxButton(
this, wxID_CANCEL, _(
"Cancel" ) ), 0, wxALL, 5 );
338 panelsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
340 if ( m_typelist->GetCount() )
343 idx = m_typelist->FindString( m_currentinfo.GetType() );
344 if ( idx == wxNOT_FOUND )
346 m_typelist->SetSelection( idx );
349 wxCommandEvent dummy;
350 OnChangeFontType( dummy );
352 SetSizer( panelsizer );
353 panelsizer->SetSizeHints(
this );
367 wxString type =
m_typelist->GetStringSelection();
368 wxString oldname =
m_fontlist->GetStringSelection();
374 for (
size_t i = 0; i <
m_fonts.GetCount(); i++ )
376 wxString fonttype =
m_fonts.Item( i )->GetData()->GetType();
377 if ( fonttype == type || type == _(
"* (All types)" ) )
379 wxString fontname =
m_fonts.Item( i )->GetData()->GetName();
381 for ( j = 0; j < fonts.GetCount(); j++ )
383 if ( fonts.Item( j ) == fontname )
386 if ( j == fonts.GetCount() )
387 fonts.Add( fontname );
398 if ( idx == wxNOT_FOUND )
407 wxString type =
m_typelist->GetStringSelection();
408 wxString name =
m_fontlist->GetStringSelection();
409 wxString oldstyle =
m_stylelist->GetStringSelection();
415 for (
size_t i = 0; i <
m_fonts.GetCount(); i++ )
417 wxString fontname =
m_fonts.Item( i )->GetData()->GetName();
418 wxString fonttype =
m_fonts.Item( i )->GetData()->GetType();
419 if ( ( fonttype == type || type == _(
"* (All types)" ) )
420 && fontname == name )
422 wxString fontstyle =
m_fonts.Item( i )->GetData()->GetStyle();
424 for ( j = 0; j < fonts.GetCount(); j++ )
426 if ( fonts.Item( j ) == fontstyle )
429 if ( j == fonts.GetCount() )
430 fonts.Add( fontstyle );
441 if ( idx == wxNOT_FOUND )
443 if ( idx == wxNOT_FOUND )
445 if ( idx == wxNOT_FOUND )
473 wxString type =
m_typelist->GetStringSelection();
474 wxString name =
m_fontlist->GetStringSelection();
475 wxString style =
m_stylelist->GetStringSelection();
478 for (
size_t i = 0; i <
m_fonts.GetCount(); i++ )
480 wxString fonttype =
m_fonts.Item( i )->GetData()->GetType();
481 wxString fontname =
m_fonts.Item( i )->GetData()->GetName();
482 wxString fontstyle =
m_fonts.Item( i )->GetData()->GetStyle();
483 if ( ( fonttype == type || type == _(
"* (All types)" ) )
484 && fontname == name && fontstyle == style )
534 if ( dlg.ShowModal() == wxID_OK )
539 wxString oldtype =
m_typelist->GetStringSelection();
544 types.Add( _(
"* (All types)" ) );
545 for (
size_t i = 0; i <
m_fonts.GetCount(); i++ )
547 wxString type =
m_fonts.Item( i )->GetData()->GetType();
549 for ( j = 0; j < types.GetCount(); j++ )
551 if ( types.Item( j ) == type )
554 if ( j == types.GetCount() )
562 if ( idx == wxNOT_FOUND )
572 switch( event.GetId() )
574 case wxID_ALIGN_TL:
m_alignment = wxMAXY | wxMINX;
break;
576 case wxID_ALIGN_TR:
m_alignment = wxMAXY | wxMAXX;
break;
578 case wxID_ALIGN_C:
m_alignment = wxMIDX | wxMIDY;
break;
580 case wxID_ALIGN_BL:
m_alignment = wxMINY | wxMINX;
break;
582 case wxID_ALIGN_BR:
m_alignment = wxMINY | wxMAXX;
break;
590 if ( m_textframe->IsChecked() )
595 if ( m_textbackground->IsChecked() )
double GetHeight() const
returns height of the boundingbox
virtual ~a2dTextPropDlg()
Destructor.
all basic primitives derived from a2dCanvasObject
const wxString & GetName() const
Get name of font, e.g. Arial.
void OnPathButton(wxCommandEvent &event)
User interface event handler.
void SetAlignment(int alignment)
Set the position of the anchor point w.r.t the text.
Display a font selection dialog.
Font info class, used as a single element for enumerating fonts.
disable background drawing
void SetPosXY12(double x1, double y1, double x2, double y2, bool afterinversion=true)
sets both positions of line
wxTextCtrl * m_textctrl
User interface object.
~a2dFontSearchPathDialog()
Destructor.
allow draw a frame rect around a text
void Enlarge(const double Marge)
enlarge with the given amount
void OnListBox(wxCommandEvent &event)
User interface event handler.
void OnChangeFontType(wxCommandEvent &event)
User interface event handler.
a2dBoundingBox GetCalculatedBoundingBox(int nChildLevels)
Like GetBbox, but it always calculcates the bounding box from scratch.
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
int m_alignment
Font alignment.
virtual void SetPending(bool pending)
set this object pending for update
a2dGlobal * a2dGlobals
global a2dCanvasGlobal to have easy access to global settings
void OnChangeFontSize(wxCommandEvent &event)
User interface event handler.
wxTextCtrl * m_sizeedit
User interface object.
a2dCanvasObject is the base class for Canvas Objects.
wxListBox * m_sizelist
User interface object.
a2dCanvas uses a2dCanvasView for displaying a view on a a2dCanvasDocument.
wxListBox * m_stylelist
User interface object.
a2dSLine * m_canvasline1
Horizontal line to indicate alignment.
wxListBox * m_listbox
User interface object.
a2dText * m_canvastext
Displayed text.
void OnDelete(wxCommandEvent &event)
User interface event handler.
a2dText is an abstract base class.
wxListBox * m_typelist
User interface object.
const a2dBoundingBox & Translate(a2dPoint2D &)
translate with given vector
double GetMinX() const
get minimum X of the boundingbox
a2dPathList & GetFontPathList()
Path for Fonts.
void SetMappingWidthHeight(double vx1, double vy1, double width, double height, bool scrollbars)
Give the virtual size to be displayed, the mappingmatrix will be calculated.
void OnAdd(wxCommandEvent &event)
User interface event handler.
void SetFont(const a2dFont &font, double lineSpaceFactor=0.1)
set font for text
static void GetInfoList(a2dFontInfoList &list)
Append fonts of this type to the list.
a2dCanvas * m_canvas
User interface object.
wxCheckBox * m_aligncheck
User interface object.
void OnText(wxCommandEvent &event)
User interface event handler.
void OnChangeFont()
User interface event handler.
void OnChangeFontName(wxCommandEvent &event)
User interface event handler.
static a2dFont CreateFont(const a2dFontInfo &info, bool force=false)
Create the font from a fontinfo description.
void OnSearchPath(wxCommandEvent &event)
User interface event handler.
wxListBox * m_fontlist
User interface object.
Display a dialog to edit the font search path.
a2dCanvas is used to display one of the a2dCanvasObjects which are part of a a2dCanvasDocument object...
Contains graphical drawing context specific classes. a2dDrawer2D and derived classes are used for dra...
void OnSize(wxSizeEvent &event)
User interface event handler.
const a2dFont * a2dDEFAULT_CANVASFONT
global a2dFont stock object for default font
void SetSize(double size)
Set size of the font.
void SetTextFlags(unsigned int textflags)
Set the text flags.
dialog for choosing fonts
double GetWidth() const
returns width of the boundingbox
const wxString & GetStyle() const
Get style of font, e.g. Bold.
void OnChangeFontSizeList(wxCommandEvent &event)
User interface event handler.
void OnOK(wxCommandEvent &event)
User interface event handler.
a2dFont m_font
Selected font.
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
all polygon and polyline a2dCanvasObject are here.
unsigned int m_textflags
contains several text flags.
double GetMinY() const
get minimum Y of the boundingbox
a2dSLine * m_canvasline2
Vertical line to indicate alignment.
void Append(a2dCanvasObject *obj)
append a a2dCanvasObject to the childobjects
void OnChangeFontStyle(wxCommandEvent &event)
User interface event handler.
const a2dFont & GetFontData() const
Returns the font.
a2dFontInfoList m_fonts
Font enumeration list.
void SetFill(const a2dFill &fill)
Set a fill for the object which will be used instead of the layer fill.
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL)
Refresh window.
const a2dFill * a2dTRANSPARENT_FILL
global a2dFill stock object for TRANSPARENT filling
general canvas module declarations and classes
void OnAlignment(wxCommandEvent &event)
User interface event handler.