AspectFont Class Template Reference
[Aspect Classes]

"font" property of their objects. More...

Inherits TrueWindow.

Inherited by WidgetButton, WidgetCheckBox, WidgetComboBox, WidgetCoolbar, WidgetDataGrid, WidgetDateTimePicker, WidgetGroupBox, WidgetRadioButton, WidgetStatic, WidgetStatusBar, WidgetTabSheet, WidgetTextBox< EventHandlerClass, MessageMapPolicy >, WidgetTextBox< Parent, MessageMapPolicy >, WidgetToolbar, and WidgetTreeView.

List of all members.

Public Member Functions

FontPtr getFont ()
 Returns the font used by the Widget.
void setFont (PredefinedFontTypes stockObjectFont, bool forceUpdate=true)
 Function taking a PredefinedFontTypes type.
void setFont (FontPtr font, bool forceUpdate=true)
 Sets the font used by the Widget.


Detailed Description

template<class WidgetType>
class SmartWin::AspectFont< WidgetType >

"font" property of their objects.

E.g. the WidgetDataGrid have a "font" Aspect therefore it realizes the AspectFont through inheritance.
Realizing the AspectFont means that a Widget can set the font used to render text in the Widget, for a ComboBox this means that it will render items in the dropdownlist and in the selected area with the given font while for a textbox this means that it will render all text with the given font.
Most Widgets which can render text in some way realize this Aspect.


Member Function Documentation

FontPtr getFont (  ) 

Returns the font used by the Widget.

Returns the Font object currently being used by the Widget

void setFont ( PredefinedFontTypes  stockObjectFont,
bool  forceUpdate = true 
)

Function taking a PredefinedFontTypes type.

Examples are SystemFixedFont, SystemFont or DefaultGuiFont. -- credit to mm.

void setFont ( FontPtr  font,
bool  forceUpdate = true 
)

Sets the font used by the Widget.

Changes the font of the Widget to the given font. Use the class Font to construct a font in which to set by this function.

Back to SmartWin website
SourceForge.net Logo