Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

AP_Dialog_Options Class Reference

#include <ap_Dialog_Options.h>

Inheritance diagram for AP_Dialog_Options:
XAP_TabbedDialog_NonPersistent XAP_Dialog_NonPersistent XAP_Dialog AP_CocoaDialog_Options AP_UnixDialog_Options AP_Win32Dialog_Options

List of all members.

Public Types

enum  tAnswer { a_OK, a_CANCEL, a_SAVE, a_APPLY }
enum  tControl {
  id_CHECK_SPELL_CHECK_AS_TYPE = 0, id_CHECK_SPELL_HIDE_ERRORS, id_CHECK_SPELL_SUGGEST, id_CHECK_SPELL_MAIN_ONLY,
  id_CHECK_SPELL_UPPERCASE, id_CHECK_SPELL_NUMBERS, id_BUTTON_SPELL_AUTOREPLACE, id_CHECK_GRAMMAR_CHECK,
  id_CHECK_SMART_QUOTES_ENABLE, id_CHECK_CUSTOM_SMART_QUOTES, id_LIST_VIEW_OUTER_QUOTE_STYLE, id_LIST_VIEW_INNER_QUOTE_STYLE,
  id_CHECK_OTHER_DEFAULT_DIRECTION_RTL, id_CHECK_AUTO_SAVE_FILE, id_TEXT_AUTO_SAVE_FILE_EXT, id_TEXT_AUTO_SAVE_FILE_PERIOD,
  id_TEXT_AUTO_SAVE_FILE_PERIOD_SPIN, id_CHECK_PREFS_AUTO_SAVE, id_COMBO_PREFS_SCHEME, id_CHECK_VIEW_SHOW_RULER,
  id_LIST_VIEW_RULER_UNITS, id_CHECK_VIEW_CURSOR_BLINK, id_CHECK_VIEW_SHOW_STATUS_BAR, id_CHECK_VIEW_ALL,
  id_CHECK_VIEW_HIDDEN_TEXT, id_CHECK_VIEW_UNPRINTABLE, id_CHECK_COLOR_FOR_TRANSPARENT_IS_WHITE, id_PUSH_CHOOSE_COLOR_FOR_TRANSPARENT,
  id_BUTTON_SAVE, id_BUTTON_DEFAULTS, id_BUTTON_OK, id_BUTTON_CANCEL,
  id_BUTTON_APPLY, id_CHECK_ENABLE_SMOOTH_SCROLLING, id_CHECK_ENABLE_OVERWRITE, id_CHECK_AUTO_LOAD_PLUGINS,
  id_NOTEBOOK, id_CHECK_LANG_WITH_KEYBOARD, id_CHECK_DIR_MARKER_AFTER_CLOSING_PARENTHESIS, id_last
}
typedef std::vector< std::pair
< std::string, int > > 
UnitMenuContent

Public Member Functions

 AP_Dialog_Options (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id)
virtual ~AP_Dialog_Options (void)
virtual void runModal (XAP_Frame *pFrame)=0
AP_Dialog_Options::tAnswer getAnswer (void) const
virtual void _populateWindowData (void)
void _enableDisableLogic (tControl id)
virtual void _storeWindowData (void)
virtual void _storeDataForControl (tControl id)
void _event_SetDefaults (void)
const gchar * _gatherColorForTransparent (void)
void _setColorForTransparent (const gchar *pzsColorForTransparent)
bool isInitialPopulationHappenning (void)
void _getUnitMenuContent (const XAP_StringSet *pSS, UnitMenuContent &content)

Protected Member Functions

virtual void _controlEnable (tControl id, bool value)=0
void _initEnableControls ()
virtual void _initEnableControlsPlatformSpecific ()
void _eventSave (void)
 SET_GATHER (SpellCheckAsType, bool)
 SET_GATHER (SpellHideErrors, bool)
 SET_GATHER (SpellSuggest, bool)
 SET_GATHER (SpellMainOnly, bool)
 SET_GATHER (SpellUppercase, bool)
 SET_GATHER (SpellNumbers, bool)
 SET_GATHER (GrammarCheck, bool)
 SET_GATHER (CustomSmartQuotes, bool)
 SET_GATHER (SmartQuotes, bool)
 SET_GATHER (PrefsAutoSave, bool)
 SET_GATHER (EnableOverwrite, bool)
 SET_GATHER (ViewShowRuler, bool)
virtual bool _gatherViewShowToolbar (UT_uint32 t)=0
virtual void _setViewShowToolbar (UT_uint32 row, bool b)=0
 SET_GATHER (ViewShowStatusBar, bool)
 SET_GATHER (ViewRulerUnits, UT_Dimension)
 SET_GATHER (OuterQuoteStyle, gint)
 SET_GATHER (InnerQuoteStyle, gint)
 SET_GATHER (ViewCursorBlink, bool)
 SET_GATHER (ViewAll, bool)
 SET_GATHER (ViewHiddenText, bool)
 SET_GATHER (ViewUnprintable, bool)
 SET_GATHER (AutoLoadPlugins, bool)
 SET_GATHER (OtherDirectionRtl, bool)
 SET_GATHER (AutoSaveFile, bool)
virtual void _gatherAutoSaveFilePeriod (UT_String &stRetVal)=0
virtual void _setAutoSaveFilePeriod (const UT_String &stPeriod)=0
virtual void _gatherAutoSaveFileExt (UT_String &stRetVal)=0
virtual void _setAutoSaveFileExt (const UT_String &stExt)=0
virtual void _gatherUILanguage (UT_String &stRetVal)
virtual void _setUILanguage (const UT_String &)
virtual bool _gatherLanguageWithKeyboard ()
virtual void _setLanguageWithKeyboard (const bool)
virtual bool _gatherDirMarkerAfterClosingParenthesis ()
virtual void _setDirMarkerAfterClosingParenthesis (const bool)
 SET_GATHER (NotebookPageNum, int)

Protected Attributes

tAnswer m_answer
XAP_Framem_pFrame
gchar m_CurrentTransparentColor [10]

Private Attributes

bool m_bInitialPop

Member Typedef Documentation

typedef std::vector<std::pair<std::string, int> > AP_Dialog_Options::UnitMenuContent

Member Enumeration Documentation

Enumerator:
a_OK 
a_CANCEL 
a_SAVE 
a_APPLY 
Enumerator:
id_CHECK_SPELL_CHECK_AS_TYPE 
id_CHECK_SPELL_HIDE_ERRORS 
id_CHECK_SPELL_SUGGEST 
id_CHECK_SPELL_MAIN_ONLY 
id_CHECK_SPELL_UPPERCASE 
id_CHECK_SPELL_NUMBERS 
id_BUTTON_SPELL_AUTOREPLACE 
id_CHECK_GRAMMAR_CHECK 
id_CHECK_SMART_QUOTES_ENABLE 
id_CHECK_CUSTOM_SMART_QUOTES 
id_LIST_VIEW_OUTER_QUOTE_STYLE 
id_LIST_VIEW_INNER_QUOTE_STYLE 
id_CHECK_OTHER_DEFAULT_DIRECTION_RTL 
id_CHECK_AUTO_SAVE_FILE 
id_TEXT_AUTO_SAVE_FILE_EXT 
id_TEXT_AUTO_SAVE_FILE_PERIOD 
id_TEXT_AUTO_SAVE_FILE_PERIOD_SPIN 
id_CHECK_PREFS_AUTO_SAVE 
id_COMBO_PREFS_SCHEME 
id_CHECK_VIEW_SHOW_RULER 
id_LIST_VIEW_RULER_UNITS 
id_CHECK_VIEW_CURSOR_BLINK 
id_CHECK_VIEW_SHOW_STATUS_BAR 
id_CHECK_VIEW_ALL 
id_CHECK_VIEW_HIDDEN_TEXT 
id_CHECK_VIEW_UNPRINTABLE 
id_CHECK_COLOR_FOR_TRANSPARENT_IS_WHITE 
id_PUSH_CHOOSE_COLOR_FOR_TRANSPARENT 
id_BUTTON_SAVE 
id_BUTTON_DEFAULTS 
id_BUTTON_OK 
id_BUTTON_CANCEL 
id_BUTTON_APPLY 
id_CHECK_ENABLE_SMOOTH_SCROLLING 
id_CHECK_ENABLE_OVERWRITE 
id_CHECK_AUTO_LOAD_PLUGINS 
id_NOTEBOOK 
id_CHECK_LANG_WITH_KEYBOARD 
id_CHECK_DIR_MARKER_AFTER_CLOSING_PARENTHESIS 
id_last 

Constructor & Destructor Documentation

AP_Dialog_Options::AP_Dialog_Options ( XAP_DialogFactory pDlgFactory,
XAP_Dialog_Id  id 
)
AP_Dialog_Options::~AP_Dialog_Options ( void   )  [virtual]

Member Function Documentation

virtual void AP_Dialog_Options::_controlEnable ( tControl  id,
bool  value 
) [protected, pure virtual]
void AP_Dialog_Options::_eventSave ( void   )  [protected]

References _storeWindowData(), and m_answer.

virtual void AP_Dialog_Options::_gatherAutoSaveFileExt ( UT_String stRetVal  )  [protected, pure virtual]
virtual void AP_Dialog_Options::_gatherAutoSaveFilePeriod ( UT_String stRetVal  )  [protected, pure virtual]
const gchar * AP_Dialog_Options::_gatherColorForTransparent ( void   ) 
virtual bool AP_Dialog_Options::_gatherDirMarkerAfterClosingParenthesis (  )  [inline, protected, virtual]
virtual bool AP_Dialog_Options::_gatherLanguageWithKeyboard (  )  [inline, protected, virtual]
virtual void AP_Dialog_Options::_gatherUILanguage ( UT_String stRetVal  )  [inline, protected, virtual]

References UT_String::clear().

Referenced by _storeWindowData().

virtual bool AP_Dialog_Options::_gatherViewShowToolbar ( UT_uint32  t  )  [protected, pure virtual]

Referenced by _storeWindowData().

void AP_Dialog_Options::_getUnitMenuContent ( const XAP_StringSet pSS,
UnitMenuContent content 
)
virtual void AP_Dialog_Options::_initEnableControlsPlatformSpecific (  )  [inline, protected, virtual]

Referenced by _initEnableControls().

void AP_Dialog_Options::_populateWindowData ( void   )  [virtual]

References _initEnableControls(), _setAutoSaveFileExt(), _setAutoSaveFilePeriod(), _setColorForTransparent(), _setDirMarkerAfterClosingParenthesis(), _setLanguageWithKeyboard(), _setUILanguage(), _setViewShowToolbar(), AP_PREF_KEY_AutoGrammarCheck, AP_PREF_KEY_AutoSpellCheck, AP_PREF_KEY_CursorBlink, AP_PREF_KEY_DefaultDirectionRtl, AP_PREF_KEY_InsertModeToggle, AP_PREF_KEY_OptionsTabNumber, AP_PREF_KEY_ParaVisible, AP_PREF_KEY_RulerUnits, AP_PREF_KEY_RulerVisible, AP_PREF_KEY_SpellCheckCaps, AP_PREF_KEY_SpellCheckNumbers, AP_PREF_KEY_StatusBarVisible, AP_PREF_KEY_StringSet, XAP_Toolbar_Factory::countToolbars(), gchar, XAP_Prefs::getAutoSavePrefs(), XAP_TabbedDialog_NonPersistent::getInitialPageNum(), XAP_App::getPrefs(), XAP_Prefs::getPrefsValue(), XAP_Prefs::getPrefsValueBool(), XAP_Prefs::getPrefsValueInt(), XAP_App::getToolbarFactory(), m_bInitialPop, XAP_Dialog::m_pApp, XAP_Toolbar_Factory::prefKeyForToolbar(), UT_determineDimension(), UT_return_if_fail, XAP_PREF_KEY_AutoLoadPlugins, XAP_PREF_KEY_AutoSaveFile, XAP_PREF_KEY_AutoSaveFileExt, XAP_PREF_KEY_AutoSaveFilePeriod, XAP_PREF_KEY_ChangeLanguageWithKeyboard, XAP_PREF_KEY_ColorForTransparent, XAP_PREF_KEY_CustomSmartQuotes, XAP_PREF_KEY_DirMarkerAfterClosingParenthesis, XAP_PREF_KEY_EnableSmoothScrolling, XAP_PREF_KEY_InnerQuoteStyle, XAP_PREF_KEY_OuterQuoteStyle, and XAP_PREF_KEY_SmartQuotesEnable.

Referenced by _event_SetDefaults(), AP_Win32Dialog_Options_Sheet::_onInitDialog(), AP_UnixDialog_Options::runModal(), and AP_UnixDialog_Options::s_defaults_clicked().

virtual void AP_Dialog_Options::_setAutoSaveFileExt ( const UT_String stExt  )  [protected, pure virtual]

Referenced by _populateWindowData().

virtual void AP_Dialog_Options::_setAutoSaveFilePeriod ( const UT_String stPeriod  )  [protected, pure virtual]

Referenced by _populateWindowData().

void AP_Dialog_Options::_setColorForTransparent ( const gchar *  pzsColorForTransparent  ) 
virtual void AP_Dialog_Options::_setDirMarkerAfterClosingParenthesis ( const   bool  )  [inline, protected, virtual]

Referenced by _populateWindowData().

virtual void AP_Dialog_Options::_setLanguageWithKeyboard ( const   bool  )  [inline, protected, virtual]

Referenced by _populateWindowData().

virtual void AP_Dialog_Options::_setUILanguage ( const UT_String  )  [inline, protected, virtual]

Referenced by _populateWindowData().

virtual void AP_Dialog_Options::_setViewShowToolbar ( UT_uint32  row,
bool  b 
) [protected, pure virtual]

Referenced by _populateWindowData().

void AP_Dialog_Options::_storeDataForControl ( tControl  id  )  [virtual]

References _gatherAutoSaveFileExt(), _gatherAutoSaveFilePeriod(), _gatherColorForTransparent(), _gatherDirMarkerAfterClosingParenthesis(), _gatherLanguageWithKeyboard(), AP_PREF_KEY_AutoGrammarCheck, AP_PREF_KEY_AutoSpellCheck, AP_PREF_KEY_CursorBlink, AP_PREF_KEY_DefaultDirectionRtl, AP_PREF_KEY_InsertModeToggle, AP_PREF_KEY_OptionsTabNumber, AP_PREF_KEY_ParaVisible, AP_PREF_KEY_RulerUnits, AP_PREF_KEY_RulerVisible, AP_PREF_KEY_SpellCheckCaps, AP_PREF_KEY_SpellCheckNumbers, AP_PREF_KEY_StatusBarVisible, UT_String::c_str(), XAP_Prefs::endBlockChange(), gchar, XAP_Prefs::getCurrentScheme(), XAP_Frame::getFrameData(), XAP_App::getPrefs(), id_BUTTON_APPLY, id_BUTTON_CANCEL, id_BUTTON_DEFAULTS, id_BUTTON_OK, id_BUTTON_SAVE, id_BUTTON_SPELL_AUTOREPLACE, id_CHECK_AUTO_LOAD_PLUGINS, id_CHECK_AUTO_SAVE_FILE, id_CHECK_COLOR_FOR_TRANSPARENT_IS_WHITE, id_CHECK_CUSTOM_SMART_QUOTES, id_CHECK_DIR_MARKER_AFTER_CLOSING_PARENTHESIS, id_CHECK_ENABLE_OVERWRITE, id_CHECK_ENABLE_SMOOTH_SCROLLING, id_CHECK_GRAMMAR_CHECK, id_CHECK_LANG_WITH_KEYBOARD, id_CHECK_OTHER_DEFAULT_DIRECTION_RTL, id_CHECK_PREFS_AUTO_SAVE, id_CHECK_SMART_QUOTES_ENABLE, id_CHECK_SPELL_CHECK_AS_TYPE, id_CHECK_SPELL_HIDE_ERRORS, id_CHECK_SPELL_MAIN_ONLY, id_CHECK_SPELL_NUMBERS, id_CHECK_SPELL_SUGGEST, id_CHECK_SPELL_UPPERCASE, id_CHECK_VIEW_ALL, id_CHECK_VIEW_CURSOR_BLINK, id_CHECK_VIEW_HIDDEN_TEXT, id_CHECK_VIEW_SHOW_RULER, id_CHECK_VIEW_SHOW_STATUS_BAR, id_CHECK_VIEW_UNPRINTABLE, id_COMBO_PREFS_SCHEME, id_last, id_LIST_VIEW_INNER_QUOTE_STYLE, id_LIST_VIEW_OUTER_QUOTE_STYLE, id_LIST_VIEW_RULER_UNITS, id_NOTEBOOK, id_PUSH_CHOOSE_COLOR_FOR_TRANSPARENT, id_TEXT_AUTO_SAVE_FILE_EXT, id_TEXT_AUTO_SAVE_FILE_PERIOD, id_TEXT_AUTO_SAVE_FILE_PERIOD_SPIN, AP_FrameData::m_bShowRuler, AP_FrameData::m_bShowStatusBar, XAP_Dialog::m_pApp, m_pFrame, Save_Pref_Bool(), XAP_Prefs::savePrefsFile(), XAP_PrefsScheme::setValue(), XAP_PrefsScheme::setValueInt(), XAP_Prefs::startBlockChange(), XAP_Frame::toggleRuler(), XAP_Frame::toggleStatusBar(), UT_DEBUGMSG, UT_dimensionName(), UT_return_if_fail, XAP_PREF_KEY_AutoLoadPlugins, XAP_PREF_KEY_AutoSaveFile, XAP_PREF_KEY_AutoSaveFileExt, XAP_PREF_KEY_AutoSaveFilePeriod, XAP_PREF_KEY_ChangeLanguageWithKeyboard, XAP_PREF_KEY_ColorForTransparent, XAP_PREF_KEY_CustomSmartQuotes, XAP_PREF_KEY_DirMarkerAfterClosingParenthesis, XAP_PREF_KEY_EnableSmoothScrolling, XAP_PREF_KEY_InnerQuoteStyle, XAP_PREF_KEY_OuterQuoteStyle, and XAP_PREF_KEY_SmartQuotesEnable.

Referenced by AP_CocoaDialog_OptionsController::controlChanged:, and AP_UnixDialog_Options::s_control_changed().

void AP_Dialog_Options::_storeWindowData ( void   )  [virtual]

References _gatherAutoSaveFileExt(), _gatherAutoSaveFilePeriod(), _gatherColorForTransparent(), _gatherDirMarkerAfterClosingParenthesis(), _gatherLanguageWithKeyboard(), _gatherUILanguage(), _gatherViewShowToolbar(), a_SAVE, AP_PREF_KEY_AutoGrammarCheck, AP_PREF_KEY_AutoSpellCheck, AP_PREF_KEY_CursorBlink, AP_PREF_KEY_DefaultDirectionRtl, AP_PREF_KEY_InsertModeToggle, AP_PREF_KEY_OptionsTabNumber, AP_PREF_KEY_ParaVisible, AP_PREF_KEY_RulerUnits, AP_PREF_KEY_RulerVisible, AP_PREF_KEY_SpellCheckCaps, AP_PREF_KEY_SpellCheckNumbers, AP_PREF_KEY_StatusBarVisible, AP_PREF_KEY_StringSet, UT_String::c_str(), XAP_Toolbar_Factory::countToolbars(), XAP_Prefs::endBlockChange(), gchar, XAP_Dialog::getApp(), XAP_App::getApp(), XAP_Prefs::getAutoSavePrefs(), XAP_Prefs::getCurrentScheme(), XAP_Frame::getCurrentView(), XAP_Frame::getFrameData(), XAP_App::getPrefs(), XAP_App::getToolbarFactory(), UT_String::length(), m_answer, AP_FrameData::m_bIsFullScreen, AP_FrameData::m_bShowBar, AP_FrameData::m_bShowPara, AP_FrameData::m_bShowRuler, AP_FrameData::m_bShowStatusBar, XAP_Dialog::m_pApp, m_pFrame, XAP_Toolbar_Factory::prefKeyForToolbar(), Save_Pref_Bool(), XAP_Prefs::savePrefsFile(), XAP_Prefs::setAutoSavePrefs(), XAP_App::setEnableSmoothScrolling(), FV_View::setShowPara(), XAP_PrefsScheme::setValue(), XAP_Prefs::startBlockChange(), XAP_Frame::toggleBar(), XAP_Frame::toggleRuler(), XAP_Frame::toggleStatusBar(), UT_DEBUGMSG, UT_dimensionName(), UT_return_if_fail, XAP_PREF_KEY_AutoLoadPlugins, XAP_PREF_KEY_AutoSaveFile, XAP_PREF_KEY_AutoSaveFileExt, XAP_PREF_KEY_AutoSaveFilePeriod, XAP_PREF_KEY_ChangeLanguageWithKeyboard, XAP_PREF_KEY_ColorForTransparent, XAP_PREF_KEY_CustomSmartQuotes, XAP_PREF_KEY_DirMarkerAfterClosingParenthesis, XAP_PREF_KEY_EnableSmoothScrolling, and XAP_PREF_KEY_SmartQuotesEnable.

Referenced by _eventSave(), and AP_Win32Dialog_Options_Sheet::_onCommand().

AP_Dialog_Options::tAnswer AP_Dialog_Options::getAnswer ( void   )  const

References m_answer.

bool AP_Dialog_Options::isInitialPopulationHappenning ( void   )  [inline]
virtual void AP_Dialog_Options::runModal ( XAP_Frame pFrame  )  [pure virtual]
AP_Dialog_Options::SET_GATHER ( NotebookPageNum  ,
int   
) [protected]
AP_Dialog_Options::SET_GATHER ( SpellNumbers  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( SmartQuotes  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewUnprintable  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( GrammarCheck  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( AutoLoadPlugins  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( SpellMainOnly  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( SpellSuggest  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( SpellHideErrors  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( SpellCheckAsType  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( CustomSmartQuotes  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( InnerQuoteStyle  ,
gint   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewCursorBlink  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( OtherDirectionRtl  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewAll  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( OuterQuoteStyle  ,
gint   
) [protected]
AP_Dialog_Options::SET_GATHER ( SpellUppercase  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewHiddenText  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewRulerUnits  ,
UT_Dimension   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewShowStatusBar  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( PrefsAutoSave  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( ViewShowRuler  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( AutoSaveFile  ,
bool   
) [protected]
AP_Dialog_Options::SET_GATHER ( EnableOverwrite  ,
bool   
) [protected]

Member Data Documentation


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