1
#ifndef __SPELL_CHECK_ENGINE_OPTION__
2
#define __SPELL_CHECK_ENGINE_OPTION__
4
// For compilers that support precompilation, includes "wx/wx.h".
11
// for all others, include the necessary headers (this file is usually all you
12
// need because it includes almost all "standard" wxWindows headers)
17
#include <wx/dynarray.h>
18
#include <wx/variant.h>
20
WX_DECLARE_OBJARRAY(wxVariant, VariantArray);
22
class SpellCheckEngineOption
36
SpellCheckEngineOption();
37
SpellCheckEngineOption(wxString strName);
38
SpellCheckEngineOption(wxString strName, wxString strText);
39
SpellCheckEngineOption(wxString strName, wxString strText, wxString strValue, int nType = SpellCheckEngineOption::STRING);
40
SpellCheckEngineOption(wxString strName, wxString strText, long nValue);
41
SpellCheckEngineOption(wxString strName, wxString strText, double dblValue);
42
SpellCheckEngineOption(wxString strName, wxString strText, bool bValue);
44
void SetName(wxString strName) { m_strOptionName = strName; if (m_strDialogText.IsEmpty()) m_strDialogText = strName; }
45
wxString GetName() { return m_strOptionName; }
46
void SetText(wxString strText) { m_strDialogText = strText; if (m_strOptionName.IsEmpty()) m_strOptionName = strText; }
47
wxString GetText() { return m_strDialogText; }
48
void AddPossibleValue(wxString strValue);
49
void AddPossibleValue(long nValue);
50
void AddPossibleValue(double dblValue);
51
void AddPossibleValue(bool bValue);
52
VariantArray* GetPossibleValuesArray() { return &m_PossibleValuesArray; }
53
void SetOptionType(int nType);
54
int GetOptionType() { return m_nOptionType; }
55
wxString GetStringValue();
57
double GetDoubleValue();
59
void SetShowOption(bool bShow) { m_bShowOption = bShow; }
60
bool GetShowOption() { return m_bShowOption; }
61
wxString GetValueAsString() { return m_OptionValue.MakeString(); }
62
void SetValue(wxString strValue, int nType = SpellCheckEngineOption::STRING);
63
void SetValue(long nValue);
64
void SetValue(double dblValue);
65
void SetValue(bool bValue);
66
void SetDependency(wxString strOptionName) { m_strDependency = strOptionName; }
67
wxString GetDependency() { return m_strDependency; }
70
wxString m_strOptionName; // Option name as the spell check engine knows it
71
wxString m_strDialogText; // Option name suitable for the options dialog
72
VariantArray m_PossibleValuesArray; // This can be used to populate choice boxes on the options dialog
73
wxString m_strDependency; // This is the name of the option on which this option depends
74
wxVariant m_OptionValue;
75
int m_nOptionType; // Since we want to keep track of where this is a file or directory, we can't always use wxVariant.GetType()
76
bool m_bShowOption; // When presenting the options to the user, show this option on the dialog
79
#endif // __SPELL_CHECK_ENGINE_OPTION__