wxMaxima
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
Configuration Class Reference

The configuration storage for the current worksheet. More...

#include <Configuration.h>

Collaboration diagram for Configuration:
[legend]

Data Structures

struct  CharsExist
 
class  FileToSave
 Stores the information about a file we need to write during the save process. More...
 
class  TextsnippetToDraw
 Stores the information about a file we need to write during the save process. More...
 

Public Types

enum  maximaHelpFormat { maxima = 0 , frontend = 1 , browser = 2 }
 
enum  htmlExportFormat {
  mathJaX_TeX = 0 , bitmap = 1 , mathML_mathJaX = 2 , svg = 3 ,
  html_export_invalidChoice
}
 The export formats we support for HTML equations.
 
enum  showLabels : int8_t {
  labels_automatic = 0 , labels_prefer_user = 1 , labels_useronly = 2 , labels_none = 3 ,
  labels_invalidSelection
}
 
enum  drawMode { ascii , handdrawn }
 
enum  InitOpt { none , temporary }
 
enum  mathDisplayMode { display_2d , display_2dASCII , display_2dUNICODE , display_1dASCII }
 
typedef std::unordered_map< wxString, bool, wxStringHash > StringBoolHash
 
typedef std::unordered_map< wxString, wxString, wxStringHash > RenderablecharsHash
 
typedef std::unordered_map< wxString, int, wxStringHash > StringHash
 
using EscCodeContainer = std::unordered_map< wxString, wxString, wxStringHash >
 
using EscCodeIterator = EscCodeContainer::const_iterator
 

Public Member Functions

bool IsOperator (wxString name)
 Coincides name with a operator known to maxima?
 
const wxEnvVariableHashMap & MaximaEnvVars () const
 
mathDisplayMode DisplayMode () const
 Does maxima output 1D, 2D or 2D ASCII equations?
 
void DisplayMode (mathDisplayMode mode)
 Tell the config if maxima outputs 1D, 2D or 2D ASCII equations, currently.
 
void SetWorkingDirectory (wxString dir)
 Set maxima's working directory.
 
wxString GetWorkingDirectory () const
 Get maxima's working directory.
 
void ReadConfig ()
 Read the config from the wxConfig object.
 
 Configuration (wxDC *dc={}, InitOpt options=none)
 The constructor.
 
void ResetAllToDefaults ()
 Reset the whole configuration to its default values.
 
void SetRecalcContext (wxDC &dc)
 Set the drawing context that is currently active.
 
void UnsetContext ()
 
void SetBackgroundBrush (const wxBrush &brush)
 Set the brush to be used for the worksheet background.
 
bool FixedFontInTextControls () const
 Use a typewriter font in wizard entry fields that can contain maxima commands?
 
void FixedFontInTextControls (bool fixed)
 Use a typewriter font in wizard entry fields that can contain maxima commands?
 
wxBrush GetBackgroundBrush () const
 Get the brush to be used for the worksheet background.
 
wxBrush GetTooltipBrush () const
 Get the brush to be used for worksheet objects that provide a mouse-over tooltip.
 
double GetInterEquationSkip () const
 Extra space to leave between two equations in output cells.
 
wxCoord GetCellBracketWidth () const
 The width we allocate for our cell brackets.
 
bool HideBrackets () const
 Hide brackets that are not under the pointer?
 
void HideBrackets (bool hide)
 Define if we want to hide brackets that are not under the pointer.
 
double PrintScale () const
 Hide brackets that are not under the pointer?
 
void PrintScale (double scale)
 Define if we want to hide brackets that are not under the pointer.
 
void PrintMargin_Top (double margin)
 
void PrintMargin_Bot (double margin)
 
void PrintMargin_Left (double margin)
 
void PrintMargin_Right (double margin)
 
double PrintMargin_Top () const
 
double PrintMargin_Bot () const
 
double PrintMargin_Left () const
 
double PrintMargin_Right () const
 
void SetZoomFactor (double newzoom)
 Sets the zoom factor the worksheet is displayed at.
 
void SetZoomFactor_temporarily (double newzoom)
 Sets the zoom factor without storing the new value in the config file/registry.
 
wxCoord Scale_Px (double px) const
 Scales a distance [in pixels] according to the zoom factor.
 
AFontSize Scale_Px (AFontSize size) const
 
double GetZoomFactor () const
 Determines the zoom factor the worksheet is displayed at.
 
wxDC * GetRecalcDC () const
 Get a drawing context suitable for size calculations.
 
void SetRecalcDC (wxDC *dc)
 
wxString GetFontName (TextStyle ts=TS_CODE_DEFAULT) const
 
wxString GetSymbolFontName () const
 
wxFontWeight IsBold (long st) const
 
wxFontStyle IsItalic (long st) const
 
bool IsUnderlined (long st) const
 
wxCoord GetLabelWidth () const
 Get the width of worksheet labels [in unscaled pixels].
 
long LabelWidth () const
 Get the width of worksheet labels [in chars].
 
void LabelWidth (long labelWidth)
 Set the width of worksheet labels [in chars].
 
wxCoord GetIndent () const
 Get the indentation of GroupCells.
 
wxSize GetPPI () const
 Get the resolution.
 
int AutosaveMinutes () const
 
void AutosaveMinutes (int minutes)
 
long GetCursorWidth () const
 How much vertical space is to be left between two group cells?
 
long GetBaseIndent () const
 The y position the worksheet starts at.
 
long GetGroupSkip () const
 The vertical space between GroupCells.
 
void SetIndent (long indent)
 Set the indentation of GroupCells.
 
bool IncrementalSearch () const
 
void IncrementalSearch (bool incrementalSearch)
 
void FontChanged ()
 To be called if a font has changed.
 
double GetDefaultLineWidth () const
 Calculates the default line width for the worksheet.
 
long LineWidth_em () const
 The minimum sensible line width in widths of a letter.
 
bool AutoSaveAsTempFile () const
 
void AutoSaveAsTempFile (bool asTempFile)
 
void LineWidth_em (long width)
 Set the minimum sensible line width in widths of a letter.
 
long GetLineWidth () const
 Returns the maximum sensible width for a text line [in characters]:
 
bool SaveUntitled () const
 
void SaveUntitled (bool save)
 
bool CursorJump () const
 
void CursorJump (bool save)
 
bool NumpadEnterEvaluates () const
 
void NumpadEnterEvaluates (bool eval)
 
bool SaveImgFileName () const
 
void SaveImgFileName (bool save)
 
bool GetAutoWrap () const
 Do we want to have automatic line breaks for text cells?
 
void SetAutoWrap (long autoWrap)
 Sets the auto wrap mode.
 
bool GetAutoIndent () const
 Do we want automatic indentation?
 
void SetAutoIndent (bool autoIndent)
 
bool IndentMaths () const
 Do we want to indent all maths?
 
void IndentMaths (bool indent)
 
AFontSize GetFontSize (TextStyle st) const
 
void ReadStyles (const wxString &file={})
 Reads the style settings.
 
void WriteStyles (const wxString &file={})
 Saves the style settings.
 
void WriteStyles (wxConfigBase *config)
 
void WriteSettings (const wxString &file={})
 Saves the settings to a file.
 
void MakeStylesConsistent ()
 
void Outdated (bool outdated)
 
bool CheckKeepPercent () const
 Do we want to display "%e" as "%e" and "%pi" as "%pi"?
 
void SetKeepPercent (bool keepPercent)
 Do we want to display "%e" as "%e" and "%pi" as "%pi"?
 
wxString GetTeXCMRI () const
 
wxString GetTeXCMSY () const
 
wxString GetTeXCMEX () const
 
wxString GetTeXCMMI () const
 
wxString GetTeXCMTI () const
 
bool ShowCodeCells () const
 
void ShowCodeCells (bool show)
 
void SetPrinting (bool printing)
 Are we currently printing?
 
bool GetPrinting () const
 Are we currently printing?
 
wxColour GetColor (TextStyle style)
 Gets the color for a text style.
 
wxColor MakeColorDifferFromBackground (wxColor color)
 Make this color differ from the background by a noticeable amount.
 
bool UsePngCairo () const
 
void UsePngCairo (bool usepngCairo)
 
bool GetMatchParens () const
 
void SetMatchParens (bool matchParens)
 
bool ShowMatchingParens () const
 
void ShowMatchingParens (bool show)
 
bool GetChangeAsterisk () const
 Use Unicode centered dots for multiplication signs?
 
void SetChangeAsterisk (bool changeAsterisk)
 Use Unicode centered dots for multiplication signs?
 
bool HidemultiplicationSign () const
 
void HidemultiplicationSign (bool show)
 
bool Latin2Greek () const
 
void Latin2Greek (bool latin2greek)
 
bool GreekSidebar_ShowLatinLookalikes () const
 
void GreekSidebar_ShowLatinLookalikes (bool show)
 
bool GreekSidebar_Show_mu () const
 
void GreekSidebar_Show_mu (bool show)
 
wxString SymbolPaneAdditionalChars () const
 
void SymbolPaneAdditionalChars (wxString symbols)
 
bool NotifyIfIdle () const
 Notify the user if maxima is idle?
 
void NotifyIfIdle (bool notify)
 
long GetDisplayedDigits () const
 Returns the maximum number of displayed digits.
 
void SetDisplayedDigits (long displayedDigits)
 
FileToSave PopFileToSave ()
 
void PushFileToSave (const wxString &filename, const wxMemoryBuffer &data)
 
wxRect GetUpdateRegion () const
 
const std::list< FileToSave > & GetFilesToSave () const
 
void ClearFilesToSave ()
 
void SetUpdateRegion (wxRect rect)
 
bool InUpdateRegion (wxRect rect) const
 Whether any part of the given rectangle is within the current update region, or true if drawing is not clipped to update region.
 
bool GetInsertAns () const
 
void SetInsertAns (bool insertAns)
 
bool GetOpenHCaret () const
 
void SetOpenHCaret (bool openHCaret)
 
bool RestartOnReEvaluation () const
 
void RestartOnReEvaluation (bool arg)
 
wxSize GetCanvasSize () const
 Reads the size of the current worksheet's visible window. See SetCanvasSize.
 
void SetCanvasSize (wxSize siz)
 Sets the size of the current worksheet's visible window.
 
bool ShowBrackets () const
 Show the cell brackets [displayed left to each group cell showing its extend]?
 
bool ShowBrackets (bool show)
 
bool PrintBrackets () const
 Print the cell brackets [displayed left to each group cell showing its extend]?
 
showLabels GetLabelChoice () const
 
bool ShowInputLabels () const
 
void ShowInputLabels (bool show)
 
bool InvertBackground () const
 
void InvertBackground (bool invert)
 
long UndoLimit ()
 
void UndoLimit (long limit)
 
long RecentItems ()
 
void RecentItems (long items)
 
bool ShowAutomaticLabels () const
 Do we want to show maxima's automatic labels (o1, t1, i1,...)?
 
bool UseUserLabels () const
 Do we want at all to show labels?
 
bool ShowLabels () const
 Do we want at all to show labels?
 
void SetLabelChoice (showLabels choice)
 Sets the value of the Configuration ChoiceBox that treads displaying labels.
 
bool PrintBrackets (bool print)
 
bool AutodetectMaxima () const
 Autodetect maxima's location? (If false the user-specified location is used)
 
void AutodetectMaxima (bool autodetectmaxima)
 Autodetect maxima's location?
 
wxString MaximaParameters () const
 Parameters to the maxima binary.
 
void MaximaParameters (wxString parameters)
 The parameters we pass to the maxima binary.
 
wxString MaximaLocation () const
 Returns the location of the maxima binary.
 
wxString MaximaUserLocation () const
 Returns the location of the maxima binary the user has selected.
 
void MaximaUserLocation (wxString maxima)
 Sets the location of the maxima binary.
 
bool AutodetectHelpBrowser () const
 Autodetect the web browser? (If false the user-specified location is used)
 
void AutodetectHelpBrowser (bool autodetect)
 Autodetect the web browser?
 
bool InternalHelpBrowser () const
 Use the internal help browser? If not a external web browser is used.
 
void InternalHelpBrowser (bool useInternalHelpBrowser)
 Use the internal help browser? If not a external web browser is used.
 
bool SinglePageManual () const
 Prefer the single-page manual?
 
void SinglePageManual (bool singlePageManual)
 Prefer the single-page manual?
 
wxString HelpBrowserUserLocation () const
 Returns the location of the web browser the user has selected.
 
void HelpBrowserUserLocation (wxString helpBrowser)
 Sets the location of the web browser the user has detected.
 
bool FixReorderedIndices () const
 Renumber out-of-order cell labels on saving.
 
void FixReorderedIndices (bool fix)
 
wxString MathJaXURL () const
 Returns the URL MathJaX can be found at.
 
wxString MathJaXURL_User () const
 
bool MathJaXURL_UseUser () const
 
void MathJaXURL_UseUser (bool useUser)
 
bool EnterEvaluates () const
 
void EnterEvaluates (bool enterEvaluates)
 
void MathJaXURL (wxString url)
 Returns the URL MathJaX can be found at.
 
bool CopyBitmap () const
 
void CopyBitmap (bool copyBitmap)
 
bool CopyMathML () const
 
void CopyMathML (bool copyMathML)
 
bool CopyMathMLHTML () const
 
void CopyMathMLHTML (bool copyMathMLHTML)
 
bool HideMarkerForThisMessage (wxString message)
 
void HideMarkerForThisMessage (const wxString &message, bool hide)
 
bool CopyRTF () const
 
void CopyRTF (bool copyRTF)
 
bool CopySVG () const
 
void CopySVG (bool copySVG)
 
bool CopyEMF () const
 
void CopyEMF (bool copyEMF)
 
bool UseSVG () const
 
void UseSVG (bool useSVG)
 
void ShowLength (long length)
 The choice for the "maximum output length to display" setting.
 
long ShowLength () const
 The choice for the "maximum output length to display" setting.
 
std::size_t ShowLength_Bytes () const
 The "maximum output length to display" setting in cells.
 
void SetParenthesisDrawMode (drawMode mode)
 Which way do we want to draw parenthesis?
 
void TocShowsSectionNumbers (bool showSectionNumbers)
 
bool TocShowsSectionNumbers () const
 
void UseUnicodeMaths (bool useunicodemaths)
 
bool UseUnicodeMaths () const
 
const StyleGetStyle (TextStyle textStyle) const
 Get the text Style for a given text style identifier.
 
StyleGetWritableStyle (TextStyle textStyle)
 Get the text Style for a given text style identifier.
 
wxWindow * GetWorkSheet () const
 Get the worksheet this configuration storage is valid for.
 
void SetWorkSheet (wxWindow *workSheet)
 Set the worksheet this configuration storage is valid for.
 
long DefaultPort () const
 
void DefaultPort (long port)
 
bool GetAbortOnError () const
 
void SetAbortOnError (bool abortOnError)
 
long GetLanguage () const
 
void SetLanguage (long language)
 
long MaxGnuplotMegabytes () const
 The maximum number of Megabytes of gnuplot sources we should store.
 
void MaxGnuplotMegabytes (long megaBytes)
 
bool OfferKnownAnswers () const
 
void OfferKnownAnswers (bool offerKnownAnswers)
 
wxString Documentclass () const
 
void Documentclass (wxString clss)
 
wxString DocumentclassOptions () const
 
void DocumentclassOptions (wxString classOptions)
 
htmlExportFormat HTMLequationFormat () const
 
void HTMLequationFormat (htmlExportFormat HTMLequationFormat)
 
AFontSize GetDefaultFontSize () const
 
AFontSize GetMathFontSize () const
 
long GetAutosubscript_Num () const
 Get the worksheet this configuration storage is valid for.
 
void SetAutosubscript_Num (long autosubscriptnum)
 
wxString GetAutosubscript_string () const
 
wxColor DefaultBackgroundColor ()
 Determine the default background color of the worksheet.
 
wxColor EditorBackgroundColor ()
 Determine the default background color of editorcells.
 
bool ClipToDrawRegion () const
 Do we want to save time by only redrawing the area currently shown on the screen?
 
void ClipToDrawRegion (bool clipToDrawRegion)
 Do we want to save time by only redrawing the area currently shown on the screen?
 
void SetVisibleRegion (wxRect visibleRegion)
 
wxRect GetVisibleRegion () const
 
void SetWorksheetPosition (wxPoint worksheetPosition)
 
wxPoint GetWorksheetPosition () const
 
wxString MaximaShareDir () const
 
void MaximaShareDir (wxString dir)
 
wxString MaximaDemoDir () const
 
void MaximaDemoDir (wxString dir)
 
void InLispMode (bool lisp)
 
bool InLispMode () const
 
void BitmapScale (int factor)
 
int BitmapScale () const
 
void DefaultPlotHeight (int px)
 
int DefaultPlotHeight () const
 
void DefaultPlotWidth (int px)
 
int DefaultPlotWidth () const
 
void DefaultFramerate (int fps)
 
int DefaultFramerate () const
 
void TocDepth (int depth)
 
int TocDepth () const
 
bool TeXExponentsAfterSubscript () const
 
void TeXExponentsAfterSubscript (bool ExponentsAfterSubscript)
 
bool UsePartialForDiff () const
 
void UsePartialForDiff (bool usePartialForDiff)
 
void NotifyOfCellRedraw (const Cell *cell)
 Record that this cell has been drawn to ReportMultipleRedraws()
 
void ClearAndEnableRedrawTracing ()
 Clear the memory of ReportMultipleRedraws()
 
void ReportMultipleRedraws ()
 Report if a cell has been redrawn 2 or more times during a simple Draw() command.
 
bool OfferInternalHelpBrowser () const
 If we decide that the HTML browser in the sidebar doesn't work for every platform...
 
bool WrapLatexMath () const
 
void WrapLatexMath (bool wrapLatexMath)
 
bool AllowNetworkHelp () const
 
void AllowNetworkHelp (bool allowNetworkHelp)
 
bool ShowAllDigits () const
 
void ShowAllDigits (bool shw)
 
bool LineBreaksInLongNums () const
 
void LineBreaksInLongNums (bool brk)
 
int MaxClipbrdBitmapMegabytes () const
 
void MaxClipbrdBitmapMegabytes (int maxClipbrd_BitmapMegabytes)
 
void MaximaUsesHtmlBrowser (bool maximaUsesHhtmlBrowser)
 
bool MaximaUsesHtmlBrowser () const
 
void MaximaUsesWxmaximaBrowser (bool maximaUsesWxmaximaBrowser)
 
bool MaximaUsesWxmaximaBrowser () const
 
void ExportContainsWXMX (bool exportContainsWXMX)
 
bool ExportContainsWXMX () const
 
void WizardTab (long tab)
 
long WizardTab () const
 
void Display2d_Unicode (bool unicode)
 
bool Display2d_Unicode () const
 
bool UseWGnuplot () const
 
wxString TexPreamble () const
 
void TexPreamble (wxString texPreamble)
 
void SetMaximaVersion (const wxString &version)
 
wxString GetMaximaVersion () const
 
void SetMaximaArch (const wxString &arch)
 
wxString GetMaximaArch () const
 
void SetLispVersion (const wxString &version)
 
wxString GetLispVersion () const
 
void SetLispType (const wxString &type)
 
wxString GetLispType () const
 
void InitStyles ()
 Initialize the text styles on construction.
 
bool FontRendersChar (wxUniChar ch, const wxFont &font= *wxNORMAL_FONT)
 True if we are confident that the font renders this char.
 
wxTextCtrl * LastActiveTextCtrl () const
 
void LastActiveTextCtrl (wxTextCtrl *last)
 
const std::vector< TextStyle > & GetCodeStylesList () const
 Which styles affect how code is displayed?
 
const std::vector< TextStyle > & GetMathStylesList () const
 Which styles affect how math output is displayed?
 
const std::vector< TextStyle > & GetColorOnlyStylesList () const
 Which styles affect only colors?
 
bool StyleAffectsCode (TextStyle style) const
 
bool StyleAffectsMathOut (TextStyle style) const
 
bool StyleAffectsColorOnly (TextStyle style) const
 
bool UpdateNeeded () const
 true means: The system's config storage has changed since the configuration has been read
 
maximaHelpFormat MaximaHelpFormat () const
 
void MaximaHelpFormat (maximaHelpFormat format)
 
std::int_fast32_t CellCfgCnt () const
 A counter that increases every time we need to recalculate all worksheet cells.
 
void RecalculateForce ()
 

Static Public Member Functions

static const wxString & GetEscCode (const wxString &key)
 Retrieve a symbol for the escape codes that can be typed after hitting the Escape key in the worksheet.
 
static EscCodeIterator EscCodesBegin ()
 Iterators over the escape code list.
 
static EscCodeIterator EscCodesEnd ()
 Iterators over the escape code list.
 
static double GetMinZoomFactor ()
 The lower limit we allow for the zoom factor.
 
static double GetMaxZoomFactor ()
 The upper limit we allow for the zoom factor.
 
static bool GetAutoWrapCode ()
 Do we want to have automatic line breaks for code cells?
 
static const wxString & GetStyleName (TextStyle textStyle)
 
static wxColour InvertColour (wxColour col)
 Inverts a color: In 2020 wxColor still lacks this functionality.
 
static wxString MaximaDefaultLocation ()
 The auto-detected maxima location.
 
static wxString FindProgram (const wxString &location)
 Could a maxima binary be found in the path we expect it to be in?
 
static wxString MathJaXURL_Auto ()
 
static void SetDebugmode ()
 Enable costly checks.
 
static bool GetDebugmode ()
 Enable costly checks?
 
static bool UseThreads ()
 
static void UseThreads (bool use)
 
static void SetMaximaLang (const wxString &LANG)
 
static wxString GetMaximaLang ()
 

Data Fields

StringHash m_maximaOperators
 All maxima operator names we know.
 
wxEnvVariableHashMap m_maximaEnvVars
 
std::vector< CharsExistm_charsInFont
 
StringBoolHash m_hideMarkerForThisMessage
 
Style m_styles [NUMBEROFSTYLES]
 
std::random_device m_rd
 Our random device.
 
std::default_random_engine m_eng
 Our random engine.
 

Static Public Attributes

static wxString m_configfileLocation_override
 Where to store the configuration.
 
static std::unordered_map< TextStyle, wxString > m_styleNames
 The list of names for the worksheet's text styles.
 

Detailed Description

The configuration storage for the current worksheet.

Caching the information here means we don't need to search for the configuration value's name every time we need the information: Reading configuration values from the system's configuration storage can be quite time consuming, especially on a MSW with a long registry.

In order to make all cells temporary listen to a different set of configuration than the default one all that has to be done is to create a new configuration object that contains hold the right settings for printing/export as bitmap or similar: Configuration::Get() will always return the last Configuration that was created and therefore as long as the new configuration object exist will return a pointer to this object if configuration is needed.

Member Enumeration Documentation

◆ drawMode

Enumerator
ascii 

Use ascii characters only.

handdrawn 

A parenthesis sign that was created using draw commands.

◆ InitOpt

Enumerator
temporary 

This configuration is temporary and shouldn't redetect Maxima etc.

Constructor & Destructor Documentation

◆ Configuration()

Configuration::Configuration ( wxDC *  dc = {},
InitOpt  options = none 
)
explicit

The constructor.

Parameters
dcThe drawing context that is to be used for drawing objects

Member Function Documentation

◆ CellCfgCnt()

std::int_fast32_t Configuration::CellCfgCnt ( ) const
inline

A counter that increases every time we need to recalculate all worksheet cells.

If that counter eventually wraps that should be fine: The cells will have been recalculated before that and if someone trying to do a speed run with wxMaxima manages to accumulate billions of config changes before the worksheet manages to recalculate itself the worst thing that can happen is a visual glitch.

◆ FindProgram()

wxString Configuration::FindProgram ( const wxString &  location)
static

Could a maxima binary be found in the path we expect it to be in?

Parameters
locationThe location to search for maxima in. If location == wxEmptyString the default location from the configuration is taken.

◆ GetDisplayedDigits()

long Configuration::GetDisplayedDigits ( ) const
inline

Returns the maximum number of displayed digits.

m_displayedDigits is always >= 20, so we can guarantee the number we return to be unsigned.

◆ GetInterEquationSkip()

double Configuration::GetInterEquationSkip ( ) const
inline

Extra space to leave between two equations in output cells.

Extra space between equations is useful if we don't display labels that show which line begins a new equation and which line merely continues a multi-line equation.

◆ GetLabelWidth()

wxCoord Configuration::GetLabelWidth ( ) const
inline

Get the width of worksheet labels [in unscaled pixels].

Todo:
Should the font size be regarded here?

◆ GetPPI()

wxSize Configuration::GetPPI ( ) const

Get the resolution.

During recalculation the drawing context doesn't know the display's resolution so we need to do some additional tricks here.

◆ GetPrinting()

bool Configuration::GetPrinting ( ) const
inline

Are we currently printing?

This affects the bitmap scale as well as the fact if we want to output objects that are outside the region that currently is redrawn.

◆ GetStyle()

const Style * Configuration::GetStyle ( TextStyle  textStyle) const
inline

Get the text Style for a given text style identifier.

Parameters
textStyleThe text style to resolve the style for.

◆ GetWritableStyle()

Style * Configuration::GetWritableStyle ( TextStyle  textStyle)
inline

Get the text Style for a given text style identifier.

Theoretically GetStyle and GetWritableStyle wouldn't collide if they had the same name. But I am afraid if all developers know how to deal with the situation that performance degrades if a const is missing while the rest works fine.

Parameters
textStyleThe text style to resolve the style for.

◆ MakeColorDifferFromBackground()

wxColor Configuration::MakeColorDifferFromBackground ( wxColor  color)

Make this color differ from the background by a noticeable amount.

Useful for black/white background theme changes

◆ ReadStyles()

void Configuration::ReadStyles ( const wxString &  file = {})

Reads the style settings.

If a file name is given the settings are read from a file.

◆ ReportMultipleRedraws()

void Configuration::ReportMultipleRedraws ( )

Report if a cell has been redrawn 2 or more times during a simple Draw() command.

Only used in debug mode; If a cell is drawn and then re-drawn in the same draw command this most likely means that a 2D-displayed cell draws its sub-cells, but didn't remove them from the Cell::NextToDraw()-list of cells to draw after this cell has been drawn.

◆ Scale_Px()

long Configuration::Scale_Px ( double  px) const

Scales a distance [in pixels] according to the zoom factor.

Is used for displaying/printing/exporting of text/maths.

◆ SetAutoWrap()

void Configuration::SetAutoWrap ( long  autoWrap)
inline

Sets the auto wrap mode.

Parameters
autoWrap
  • 0: No automatic line breaks
  • 1: Automatic line breaks only for text cells
  • 2: Automatic line breaks for text and code cells.

◆ SetIndent()

void Configuration::SetIndent ( long  indent)
inline

Set the indentation of GroupCells.

Normally this parameter is automatically calculated

◆ SetPrinting()

void Configuration::SetPrinting ( bool  printing)

Are we currently printing?

This affects the bitmap scale as well as the fact if we want to output objects that are outside the region that currently is redrawn.

◆ SetZoomFactor()

void Configuration::SetZoomFactor ( double  newzoom)

Sets the zoom factor the worksheet is displayed at.

A comparison operator for wxImage.

◆ WriteStyles()

void Configuration::WriteStyles ( const wxString &  file = {})

Saves the style settings.

Saves the style settings to a file.

If a file name is given the settings are written to a file.

Field Documentation

◆ m_configfileLocation_override

wxString Configuration::m_configfileLocation_override
static

Where to store the configuration.

Empty means: "Use the default location", which on MS Windows is somewhere in the registry.


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