Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

mcTextSettings Class Reference

#include <Styles.h>

Inheritance diagram for mcTextSettings:

Inheritance graph
[legend]
Collaboration diagram for mcTextSettings:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition of the structure used to store foreground, background colors and font which are required parameters for drawing text.

Definition at line 58 of file Styles.h.

Public Member Functions

 mcTextSettings (const wxColour fg, const wxColour bk, const wxString &fnt)
 Sets up the text settings using the n-th token in the given strings.
 mcTextSettings ()
void DeepCopy (const mcTextSettings *p)
void Set (const wxColour fg, const wxColour bk, const wxString &fnt)
 Sets up this object with the given colours and the given string; for the string format, see Decode.
void SetFont (const wxString &fnt)
 Changes the font attributes for this object.
void SetColours (const wxColour fg, const wxColour bk)
 Changes the colors associated to this object.
void Decode (const wxString &fnt)
 Decodes the given string and initializes this object with it.
void gui_Select (wxDC &hDC) const
 gui_Selects these text settings in the given DC.
bool Ok () const
 Returns TRUE if the class has been correctly set up.
void ScaleSize (float f)
 Scales the font size by given value.

Public Attributes

wxColour m_clrFg
 The foreground and background colors.
wxColour m_clrBk
 The foreground and background colors.
wxFont m_hFont
 The font of this style.


Constructor & Destructor Documentation

mcTextSettings::mcTextSettings const wxColour  fg,
const wxColour  bk,
const wxString &  fnt
[inline]
 

Sets up the text settings using the n-th token in the given strings.

Parameters:
fg The foreground color to use.
bk The background color to use.
fnt The font settings to use; they should be encoded as: "font name-font size-font weight"

Definition at line 76 of file Styles.h.

References Set().

mcTextSettings::mcTextSettings  )  [inline]
 

Definition at line 80 of file Styles.h.


Member Function Documentation

void mcTextSettings::Decode const wxString &  fnt  ) 
 

Decodes the given string and initializes this object with it.

The string should be in this format: "font family-face name-font size-font weight-font style".

Definition at line 176 of file MathHelpers.cpp.

Referenced by SetFont().

void mcTextSettings::DeepCopy const mcTextSettings p  )  [inline]
 

Definition at line 82 of file Styles.h.

References m_clrBk, m_clrFg, and m_hFont.

Referenced by mcStyle::DeepCopy().

void mcTextSettings::gui_Select wxDC &  hDC  )  const [inline]
 

gui_Selects these text settings in the given DC.

Definition at line 113 of file Styles.h.

References m_clrBk, m_clrFg, and m_hFont.

Referenced by mcStyle::gui_Select(), and mcMathMngHelpers::gui_SelectSeparatorStyle().

bool mcTextSettings::Ok  )  const [inline]
 

Returns TRUE if the class has been correctly set up.

Definition at line 120 of file Styles.h.

References m_hFont.

Referenced by mcStyle::Ok().

void mcTextSettings::ScaleSize float  f  )  [inline]
 

Scales the font size by given value.

Definition at line 125 of file Styles.h.

References m_hFont.

Referenced by mcStyle::ScaleSize().

void mcTextSettings::Set const wxColour  fg,
const wxColour  bk,
const wxString &  fnt
[inline]
 

Sets up this object with the given colours and the given string; for the string format, see Decode.

Definition at line 91 of file Styles.h.

References SetColours(), and SetFont().

Referenced by mcTextSettings(), mcStyle::Set(), mcStyle::SetSpecialTextSettings(), and mcStyle::SetTextSettingsFor().

void mcTextSettings::SetColours const wxColour  fg,
const wxColour  bk
[inline]
 

Changes the colors associated to this object.

Definition at line 102 of file Styles.h.

References m_clrBk, and m_clrFg.

Referenced by Set(), and mcStyle::SetColours().

void mcTextSettings::SetFont const wxString &  fnt  )  [inline]
 

Changes the font attributes for this object.

Definition at line 97 of file Styles.h.

References Decode().

Referenced by Set(), mcStyle::SetFontFor(), mcStyle::SetFonts(), and mcStyle::SetSpecialFont().


Member Data Documentation

wxColour mcTextSettings::m_clrBk
 

The foreground and background colors.

Definition at line 64 of file Styles.h.

Referenced by DeepCopy(), gui_Select(), and SetColours().

wxColour mcTextSettings::m_clrFg
 

The foreground and background colors.

Definition at line 64 of file Styles.h.

Referenced by DeepCopy(), gui_Select(), and SetColours().

wxFont mcTextSettings::m_hFont
 

The font of this style.

Definition at line 67 of file Styles.h.

Referenced by DeepCopy(), gui_Select(), Ok(), and ScaleSize().


The documentation for this class was generated from the following files:

Documentation generated with Doxygen on Sun Feb 6 17:13:18 2005
Visit MathStudio home page for more info

[ Top ]