#include <Styles.h>
Inheritance diagram for mcStyleArray:
This class can be used to store a set of styles
Definition at line 280 of file Styles.h.
GET functions. | |
The mcStyleArray setters. | |
int | gui_GetStyleIndexFor (const mcElement &p) const |
Returns the style for the given element. | |
const mcStyle * | Get (int n) const |
Returns the mcStyle associated to the n-th exponent depth. | |
const mcStyle * | gui_GetStyleFor (const mcElement &p) const |
Returns the style for given element. | |
static int | GetCount () |
Returns the number of mcStyles stored in this class. | |
Public Member Functions | |
mcStyleArray () | |
Default constructor. | |
mcStyleArray (const mcStyle *arr) | |
Constructs the array of styles, copying the given styles. | |
mcStyleArray (const mcStyleArray *arr) | |
Copy constructor. | |
virtual | ~mcStyleArray () |
Destroys the contained styles. | |
void | DeepCopy (const mcStyleArray *) |
Deep copies the given array into this one. | |
SET functions. | |
void | Set (const mcStyle *arr) |
(Re)sets all the contents of this class. | |
void | Set (const mcStyle *style, int n) |
(Re)sets the n-th style of this class. | |
void | ScaleSize (float f=1.0) |
Scales the size of all the text settings contained inside all the styles contained in this object, See mcTextSettings::ScaleSize() for more info. | |
Protected Member Functions | |
void | CreateArray () |
Creates the array of styles if it's not already a valid pointer. | |
Protected Attributes | |
mcStyle * | m_pStyles |
The array of styles for all the exponent depths of mcElementGUI. |
|
Default constructor.
Definition at line 306 of file Styles.h. References CreateArray(), and m_pStyles. |
|
Constructs the array of styles, copying the given styles.
Definition at line 309 of file Styles.h. References CreateArray(), m_pStyles, and Set(). |
|
Copy constructor.
Definition at line 315 of file Styles.h. References CreateArray(), DeepCopy(), and m_pStyles. |
|
Destroys the contained styles.
Definition at line 276 of file MathHelpers.cpp. References m_pStyles. |
|
Creates the array of styles if it's not already a valid pointer. This function is required because this class always need to work on a valid array but it cannot just define the m_pStyles array as follows:
In fact, the mcELEMENTMATH_MAX_EXPDEPTH value is defined in Element.h, where also mcElementGUI (which requires this class) is defined. This implies that we cannot use that #define here because we cannot include in this file "Element.h". Definition at line 283 of file MathHelpers.cpp. References m_pStyles, and mcELEMENTMATH_MAX_EXPDEPTH. Referenced by mcStyleArray(). |
|
Deep copies the given array into this one.
Definition at line 289 of file MathHelpers.cpp. References mcStyle::DeepCopy(), m_pStyles, and mcELEMENTMATH_MAX_EXPDEPTH. Referenced by mcStyleArray(). |
|
Returns the mcStyle associated to the n-th exponent depth.
Definition at line 364 of file Styles.h. References m_pStyles. Referenced by mcOperatorHelpers::gui_DoRecalcSize(), mcElementHelpers::gui_GetStyle(), and gui_GetStyleFor(). |
|
Returns the number of mcStyles stored in this class. The returned number is always the same because the maximum exponent depth of the expressions the user inputs is a #define which, obviously, cannot change at run-time. Definition at line 303 of file MathHelpers.cpp. References mcELEMENTMATH_MAX_EXPDEPTH. |
|
Returns the style for given element.
Definition at line 369 of file Styles.h. References Get(), and gui_GetStyleIndexFor(). Referenced by mcElementHelpers::gui_GetStyleForThis(). |
|
Returns the style for the given element.
Definition at line 311 of file MathHelpers.cpp. Referenced by gui_GetStyleFor(). |
|
Scales the size of all the text settings contained inside all the styles contained in this object, See mcTextSettings::ScaleSize() for more info.
Definition at line 321 of file MathHelpers.cpp. References m_pStyles, mcELEMENTMATH_MAX_EXPDEPTH, and mcStyle::ScaleSize(). Referenced by mcMathMngHelpers::gui_InitStyles(). |
|
(Re)sets the n-th style of this class.
Definition at line 336 of file Styles.h. References mcStyle::DeepCopy(), and m_pStyles. |
|
(Re)sets all the contents of this class.
Definition at line 296 of file MathHelpers.cpp. References mcStyle::DeepCopy(), m_pStyles, and mcELEMENTMATH_MAX_EXPDEPTH. Referenced by mcElementHelpers::gui_Init(), mcElementHelpers::gui_InitDefaultStyles(), and mcStyleArray(). |
|
The array of styles for all the exponent depths of mcElementGUI. This array has mcELEMENTMATH_MAX_EXPDEPTH entries. Definition at line 286 of file Styles.h. Referenced by CreateArray(), DeepCopy(), Get(), mcStyleArray(), ScaleSize(), Set(), and ~mcStyleArray(). |
[ Top ] |