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

mcStyle Class Reference

#include <Styles.h>

Inheritance diagram for mcStyle:

Inheritance graph
[legend]
Collaboration diagram for mcStyle:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition of the structure used to store all the attributes associated with a specific exponent level.

Definition at line 134 of file Styles.h.

Public Member Functions

 mcStyle (const wxColour *fg, const wxColour *bk, const wxString *fnt)
 Initializes this class with the given strings.
 mcStyle ()
virtual ~mcStyle ()
bool Ok ()
 Checks if this style is correctly set up.
void gui_Select (wxDC &hDC, const mcElement &e) const
 gui_Select this style in the given DC; uses the given pointer to detect which text settings should be used.
void DeepCopy (const mcStyle *p)
void ScaleSize (float f)
GET functions.
The mcStyle getters.

int GetIndexFor (mcElementType t) const
 Returns the index of the m_pTextSettings array for the given element type.
int GetIndexFor (const mcElement &) const
 See #GetIndexFor(mcElementType).
const mcTextSettings * GetTextSettingsFor (mcElementType t) const
 Returns the text-settings for the given element (type).
const mcTextSettings * GetTextSettingsFor (const mcElement &p) const
 Returns the text-settings for the given element (type).
const mcTextSettings * GetTextSettings (int n) const
 Returns the n-th entry of the text settings array.
const mcTextSettings * GetSpecialTextSettings () const
 Returns the special entry of the text settings array.
SET functions.
The mcStyle setters.

void SetTextSettingsFor (mcElementType t, const wxColour fg=*wxBLACK, const wxColour bk=*wxWHITE, const wxString &str=wxEmptyString)
 Sets the text-settings for the given element (type).
void SetFontFor (mcElementType t, const wxString &str)
 Sets the font attributes for the given element (type).
void SetSpecialTextSettings (const wxColour fg=*wxBLACK, const wxColour bk=*wxWHITE, const wxString &str=wxEmptyString)
 Sets the special text-settings entry in m_pTextSettings array.
void SetSpecialFont (const wxString &str)
 Sets the font attributes for the special text-settings entry.
void Set (const wxColour *fg, const wxColour *bk, const wxString *fnt)
 Sets the text-settings for this class.
void SetFonts (const wxString *fnt)
 Changes the font attributes for this class.
void SetColours (const wxColour *fg, const wxColour *bk)
 Changes the colors for this class.

Protected Attributes

mcTextSettings m_pTextSettings [mcSTYLE_TEXTSETTINGS_NUM]
 The text settings for MathCore basic classes.


Constructor & Destructor Documentation

mcStyle::mcStyle (  const wxColour *  fg,
const wxColour *  bk,
const wxString *  fnt
)  [inline]
 

Initializes this class with the given strings.

Each string (except for the first) should be divided by '|' to specify the individual settings respectively for NUMBERS, FUNCTIONS, SYMBOLS, OPERATORS, SUBSCRIPTS.

Parameters:
fg The foreground colors array.
bk The background colors array.
fnt The font settings array.

Definition at line 161 of file Styles.h.

References Set().

mcStyle::mcStyle (   )  [inline]
 

Definition at line 165 of file Styles.h.

virtual mcStyle::~mcStyle (   )  [inline, virtual]
 

Definition at line 166 of file Styles.h.


Member Function Documentation

void mcStyle::DeepCopy (  const mcStyle *  p  )  [inline]
 

Definition at line 178 of file Styles.h.

References mcTextSettings::DeepCopy(), m_pTextSettings, and mcSTYLE_TEXTSETTINGS_NUM.

Referenced by mcStyleArray::DeepCopy(), and mcStyleArray::Set().

int mcStyle::GetIndexFor (  const mcElement &   )  const
 

See #GetIndexFor(mcElementType).

Definition at line 257 of file MathHelpers.cpp.

References GetIndexFor(), mcET_SYMBOL, and mcSTYLE_SPECIAL_SETTINGS.

int mcStyle::GetIndexFor (  mcElementType  t  )  const
 

Returns the index of the m_pTextSettings array for the given element type.

Definition at line 232 of file MathHelpers.cpp.

References mcET_FUNCTION, mcET_MATHANDSYSTEM, mcET_MATHMNG, mcET_MATHORSYSTEM, mcET_NUMBER, mcET_SYMBOL, and mcET_TEXT.

Referenced by GetIndexFor(), GetTextSettingsFor(), gui_Select(), SetFontFor(), and SetTextSettingsFor().

const mcTextSettings* mcStyle::GetSpecialTextSettings (   )  const [inline]
 

Returns the special entry of the text settings array.

Definition at line 217 of file Styles.h.

References m_pTextSettings, and mcSTYLE_SPECIAL_SETTINGS.

Referenced by mcMathMngHelpers::gui_SelectSeparatorStyle().

const mcTextSettings* mcStyle::GetTextSettings (  int  n  )  const [inline]
 

Returns the n-th entry of the text settings array.

Definition at line 212 of file Styles.h.

References m_pTextSettings.

const mcTextSettings* mcStyle::GetTextSettingsFor (  const mcElement &  p  )  const [inline]
 

Returns the text-settings for the given element (type).

Definition at line 207 of file Styles.h.

References GetIndexFor(), and m_pTextSettings.

const mcTextSettings* mcStyle::GetTextSettingsFor (  mcElementType  t  )  const [inline]
 

Returns the text-settings for the given element (type).

Definition at line 202 of file Styles.h.

References GetIndexFor(), and m_pTextSettings.

void mcStyle::gui_Select (  wxDC &  hDC,
const mcElement &  e
)  const [inline]
 

gui_Select this style in the given DC; uses the given pointer to detect which text settings should be used.

Definition at line 174 of file Styles.h.

References GetIndexFor(), mcTextSettings::gui_Select(), and m_pTextSettings.

Referenced by mcOperatorHelpers::gui_DoRecalcSize(), and mcElementHelpers::gui_SelectStyle().

bool mcStyle::Ok (   ) 
 

Checks if this style is correctly set up.

Definition at line 221 of file MathHelpers.cpp.

References m_pTextSettings, mcSTYLE_TEXTSETTINGS_NUM, and mcTextSettings::Ok().

Referenced by mcElementHelpers::gui_InitDefaultStyles().

void mcStyle::ScaleSize (  float  f  )  [inline]
 

Definition at line 183 of file Styles.h.

References m_pTextSettings, mcSTYLE_TEXTSETTINGS_NUM, and mcTextSettings::ScaleSize().

Referenced by mcStyleArray::ScaleSize().

void mcStyle::Set (  const wxColour *  fg,
const wxColour *  bk,
const wxString *  fnt
)  [inline]
 

Sets the text-settings for this class.

Definition at line 255 of file Styles.h.

References m_pTextSettings, mcSTYLE_TEXTSETTINGS_NUM, and mcTextSettings::Set().

Referenced by mcOperatorHelpers::gui_DoRecalcSize(), and mcStyle().

void mcStyle::SetColours (  const wxColour *  fg,
const wxColour *  bk
)  [inline]
 

Changes the colors for this class.

Definition at line 268 of file Styles.h.

References m_pTextSettings, mcSTYLE_TEXTSETTINGS_NUM, and mcTextSettings::SetColours().

void mcStyle::SetFontFor (  mcElementType  t,
const wxString &  str
)  [inline]
 

Sets the font attributes for the given element (type).

Definition at line 238 of file Styles.h.

References GetIndexFor(), m_pTextSettings, and mcTextSettings::SetFont().

void mcStyle::SetFonts (  const wxString *  fnt  )  [inline]
 

Changes the font attributes for this class.

Parameters:
fnt For the format of this string, see mcTextSettings::Decode.

Definition at line 262 of file Styles.h.

References m_pTextSettings, mcSTYLE_TEXTSETTINGS_NUM, and mcTextSettings::SetFont().

void mcStyle::SetSpecialFont (  const wxString &  str  )  [inline]
 

Sets the font attributes for the special text-settings entry.

Definition at line 250 of file Styles.h.

References m_pTextSettings, mcSTYLE_SPECIAL_SETTINGS, and mcTextSettings::SetFont().

void mcStyle::SetSpecialTextSettings (  const wxColour  fg = *wxBLACK,
const wxColour  bk = *wxWHITE,
const wxString &  str = wxEmptyString
)  [inline]
 

Sets the special text-settings entry in m_pTextSettings array.

Parameters:
str For the format of this string, see mcTextSettings::Decode.

Definition at line 244 of file Styles.h.

References m_pTextSettings, mcSTYLE_SPECIAL_SETTINGS, and mcTextSettings::Set().

Referenced by mcElementHelpers::gui_InitDefaultStyles().

void mcStyle::SetTextSettingsFor (  mcElementType  t,
const wxColour  fg = *wxBLACK,
const wxColour  bk = *wxWHITE,
const wxString &  str = wxEmptyString
)  [inline]
 

Sets the text-settings for the given element (type).

See mcTextSettings::Set() for more info.

Parameters:
str For the format of this string, see mcTextSettings::Decode.

Definition at line 232 of file Styles.h.

References GetIndexFor(), m_pTextSettings, and mcTextSettings::Set().

Referenced by mcElementHelpers::gui_InitDefaultStyles().


Member Data Documentation

mcTextSettings mcStyle::m_pTextSettings[mcSTYLE_TEXTSETTINGS_NUM] [protected]
 

The text settings for MathCore basic classes.

Definition at line 149 of file Styles.h.

Referenced by DeepCopy(), GetSpecialTextSettings(), GetTextSettings(), GetTextSettingsFor(), gui_Select(), Ok(), ScaleSize(), Set(), SetColours(), SetFontFor(), SetFonts(), SetSpecialFont(), SetSpecialTextSettings(), and SetTextSettingsFor().


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

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

[ Top ]