#include <xap_Prefs.h>
XAP_Prefs::XAP_Prefs | ( | ) |
XAP_Prefs::~XAP_Prefs | ( | void | ) | [virtual] |
References m_vecLog, m_vecPluginSchemes, m_vecPrefsListeners, m_vecRecent, m_vecSchemes, UT_VECTOR_FREEALL, and UT_VECTOR_PURGEALL.
XAP_PrefsScheme * XAP_Prefs::_getNthScheme | ( | UT_uint32 | k, | |
const UT_GenericVector< XAP_PrefsScheme * > & | vecSchemes | |||
) | const [protected] |
References UT_GenericVector< T >::getItemCount(), and UT_GenericVector< T >::getNthItem().
Referenced by getNthPluginScheme(), and getNthScheme().
void XAP_Prefs::_markPrefChange | ( | const gchar * | szKey | ) |
References _sendPrefsSignal(), UT_GenericStringMap< T >::insert(), m_ahashChanges, m_bInChangeBlock, and UT_GenericStringMap< T >::pick().
Referenced by XAP_PrefsScheme::setValue().
void XAP_Prefs::_pruneRecent | ( | void | ) | [protected] |
References UT_GenericVector< T >::clear(), FREEP, UT_GenericVector< T >::getNthItem(), getRecentCount(), m_iMaxRecent, m_vecRecent, and removeRecent().
Referenced by addRecent(), and startElement().
void XAP_Prefs::_sendPrefsSignal | ( | UT_StringPtrMap * | hash | ) | [protected] |
void XAP_Prefs::_startElement_SystemDefaultFile | ( | const gchar * | name, | |
const gchar ** | atts | |||
) | [private] |
References gchar, m_builtinScheme, m_parserState, XAP_PrefsScheme::setValue(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by startElement().
void XAP_Prefs::addListener | ( | PrefsListener | pFunc, | |
void * | data | |||
) |
References UT_GenericVector< T >::addItem(), XAP_Prefs::tPrefsListenersPair::m_pData, XAP_Prefs::tPrefsListenersPair::m_pFunc, m_vecPrefsListeners, UT_ASSERT, and UT_return_if_fail.
Referenced by AP_LeftRuler::AP_LeftRuler(), AP_TopRuler::AP_TopRuler(), FV_View::FV_View(), and FL_DocLayout::setView().
bool XAP_Prefs::addPluginScheme | ( | XAP_PrefsScheme * | pNewScheme | ) |
References UT_GenericVector< T >::addItem(), and m_vecPluginSchemes.
Referenced by doRegistration(), and startElement().
void XAP_Prefs::addRecent | ( | const char * | szRecent | ) |
References _pruneRecent(), UT_GenericVector< T >::deleteNthItem(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), UT_GenericVector< T >::insertItemAt(), m_bIgnoreThisOne, m_iMaxRecent, m_vecRecent, UT_continue_if_fail, and UT_return_if_fail.
Referenced by PD_Document::_importFile(), and PD_Document::_saveAs().
bool XAP_Prefs::addScheme | ( | XAP_PrefsScheme * | pNewScheme | ) |
References UT_GenericVector< T >::addItem(), gchar, getBuiltinSchemeName(), XAP_PrefsScheme::getSchemeName(), m_builtinScheme, m_vecSchemes, and UT_ASSERT.
Referenced by getCurrentScheme(), AP_Prefs::loadBuiltinPrefs(), and startElement().
void XAP_Prefs::charData | ( | const gchar * | s, | |
int | len | |||
) | [virtual] |
Implements UT_XML::Listener.
void XAP_Prefs::endBlockChange | ( | ) |
References _sendPrefsSignal(), m_ahashChanges, and m_bInChangeBlock.
Referenced by AP_Dialog_Options::_storeDataForControl(), AP_Dialog_Options::_storeWindowData(), and AP_Prefs::fullInit().
void XAP_Prefs::endElement | ( | const gchar * | name | ) | [virtual] |
Implements UT_XML::Listener.
virtual void XAP_Prefs::fullInit | ( | void | ) | [pure virtual] |
Implemented in AP_Prefs.
bool XAP_Prefs::getAutoSavePrefs | ( | void | ) | const |
References m_bAutoSavePrefs.
Referenced by AP_Dialog_Options::_populateWindowData(), and AP_Dialog_Options::_storeWindowData().
virtual const gchar* XAP_Prefs::getBuiltinSchemeName | ( | void | ) | const [pure virtual] |
Implemented in AP_Prefs.
Referenced by addScheme(), savePrefsFile(), and startElement().
XAP_PrefsScheme * XAP_Prefs::getCurrentScheme | ( | bool | bCreate = false |
) |
References addScheme(), gchar, XAP_PrefsScheme::getSchemeName(), m_currentScheme, setCurrentScheme(), UT_ASSERT, UT_ASSERT_HARMLESS, and UT_TODO.
Referenced by AP_Dialog_Options::_event_SetDefaults(), AP_Dialog_Options::_storeDataForControl(), AP_Dialog_Options::_storeWindowData(), _viewTBx(), checkViewModeIsPrint(), Defun(), Defun1(), Defun_EV_GetMenuItemState_Fn(), XAP_CocoaToolPalette::instance:, AP_Dialog_Spell::nextMisspelledWord(), XAP_Toolbar_Factory::restoreToolbarsFromCurrentScheme(), s_doZoomDlg(), XAP_Dialog_HTMLOptions::saveDefaults(), AP_Dialog_EpubExportOptions::saveDefaults(), XAP_Toolbar_Factory::saveToolbarsInCurrentScheme(), XAP_App::setDefaultGraphicsId(), XAP_Frame::setZoomPercentage(), and XAP_CocoaToolPalette::windowWillClose:.
XAP_FontSettings& XAP_Prefs::getFontSettings | ( | ) | [inline] |
Referenced by GR_CairoGraphics::getAllFontNames().
UT_sint32 XAP_Prefs::getMaxRecent | ( | void | ) | const |
References m_iMaxRecent.
XAP_PrefsScheme * XAP_Prefs::getNthPluginScheme | ( | UT_uint32 | k | ) | const |
References _getNthScheme(), and m_vecPluginSchemes.
Referenced by getPluginScheme(), and savePrefsFile().
XAP_PrefsScheme * XAP_Prefs::getNthScheme | ( | UT_uint32 | k | ) | const |
References _getNthScheme(), and m_vecSchemes.
Referenced by getScheme(), and savePrefsFile().
XAP_PrefsScheme * XAP_Prefs::getPluginScheme | ( | const gchar * | szSchemeName | ) | const |
References UT_GenericVector< T >::getItemCount(), getNthPluginScheme(), XAP_PrefsScheme::getSchemeName(), m_vecPluginSchemes, and UT_ASSERT_HARMLESS.
Referenced by doRegistration(), and startElement().
virtual const char* XAP_Prefs::getPrefsPathname | ( | void | ) | const [pure virtual] |
Implemented in AP_Prefs.
Referenced by loadPrefsFile(), and savePrefsFile().
bool XAP_Prefs::getPrefsValue | ( | const gchar * | szKey, | |
const gchar ** | pszValue, | |||
bool | bAllowBuiltin = true | |||
) | const |
References DEBUG_PREFIX, XAP_PrefsScheme::getValue(), m_builtinScheme, m_currentScheme, NO_PREF_VALUE, and UT_return_val_if_fail.
Referenced by AP_Dialog_Options::_populateWindowData(), FV_View::_prefsListener(), FL_DocLayout::_prefsListener(), AP_TopRuler::_prefsListener(), AP_LeftRuler::_prefsListener(), AP_Dialog_Paragraph::AP_Dialog_Paragraph(), AP_Dialog_EpubExportOptions::getEpubExportDefaults(), XAP_Dialog_HTMLOptions::getHTMLDefaults(), XAP_App::getPrefsValue(), XAP_AppImpl::localizeHelpUrl(), s_AskForPathname(), fl_DocSectionLayout::setPaperColor(), and FL_DocLayout::updateColor().
bool XAP_Prefs::getPrefsValueBool | ( | const gchar * | szKey, | |
bool * | pbValue, | |||
bool | bAllowBuiltin = true | |||
) | const |
References DEBUG_PREFIX, XAP_PrefsScheme::getValueBool(), m_builtinScheme, m_currentScheme, and UT_return_val_if_fail.
Referenced by AP_Dialog_Options::_populateWindowData(), FV_View::_prefsListener(), FL_DocLayout::_prefsListener(), XAP_UnixDialog_FileOpenSaveAs::_run_gtk_main(), FL_DocLayout::considerSmartQuoteCandidateAt(), Defun(), Defun1(), Defun_EV_GetMenuItemState_Fn(), XAP_App::getPrefsValueBool(), AP_Dialog_Spell::nextMisspelledWord(), PD_Document::PD_Document(), PD_Document::setAttrProp(), and FL_DocLayout::setView().
bool XAP_Prefs::getPrefsValueInt | ( | const gchar * | szKey, | |
int & | nValue, | |||
bool | bAllowBuiltin = true | |||
) | const |
References DEBUG_PREFIX, XAP_PrefsScheme::getValueInt(), m_builtinScheme, m_currentScheme, and UT_return_val_if_fail.
Referenced by AP_Dialog_Options::_populateWindowData(), and FL_DocLayout::considerSmartQuoteCandidateAt().
const char * XAP_Prefs::getRecent | ( | UT_sint32 | k | ) | const |
References UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_iMaxRecent, m_vecRecent, and UT_return_val_if_fail.
Referenced by _openRecent(), Defun_EV_GetMenuItemComputedLabel_Fn(), and savePrefsFile().
UT_sint32 XAP_Prefs::getRecentCount | ( | void | ) | const |
References UT_GenericVector< T >::getItemCount(), and m_vecRecent.
Referenced by _pruneRecent(), Defun_EV_GetMenuItemState_Fn(), and removeRecent().
XAP_PrefsScheme * XAP_Prefs::getScheme | ( | const gchar * | szSchemeName | ) | const |
References UT_GenericVector< T >::getItemCount(), getNthScheme(), XAP_PrefsScheme::getSchemeName(), m_vecSchemes, and UT_ASSERT_HARMLESS.
Referenced by setCurrentScheme(), and startElement().
bool XAP_Prefs::getUseEnvLocale | ( | void | ) | const |
References m_bUseEnvLocale.
bool XAP_Prefs::isIgnoreRecent | ( | void | ) | [inline] |
virtual bool XAP_Prefs::loadBuiltinPrefs | ( | void | ) | [pure virtual] |
Implemented in AP_Win32Prefs, and AP_Prefs.
bool XAP_Prefs::loadPrefsFile | ( | void | ) |
References FREEP, getPrefsPathname(), m_bLoadSystemDefaultFile, m_parserState, UT_XML::parse(), setCurrentScheme(), UT_XML::setListener(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by AP_Prefs::fullInit().
bool XAP_Prefs::loadSystemDefaultPrefsFile | ( | const char * | szSystemDefaultPrefsPathname | ) |
References m_bLoadSystemDefaultFile, m_parserState, UT_XML::parse(), UT_XML::setListener(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by AP_Prefs::overlaySystemPrefs().
void XAP_Prefs::log | ( | const char * | where, | |
const char * | what, | |||
XAPPrefsLog_Level | level = Log | |||
) |
References UT_GenericVector< T >::addItem(), Error, UT_UTF8String::escape(), UT_UTF8String::escapeXML(), Log, m_vecLog, s, time, UT_return_if_fail, UT_UTF8String::utf8_str(), and Warning.
Referenced by GR_Win32USPGraphics::_constructorCommonCode().
void XAP_Prefs::removeListener | ( | PrefsListener | pFunc, | |
void * | data = 0 | |||
) |
References UT_GenericVector< T >::deleteNthItem(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), XAP_Prefs::tPrefsListenersPair::m_pData, XAP_Prefs::tPrefsListenersPair::m_pFunc, m_vecPrefsListeners, and UT_ASSERT_HARMLESS.
Referenced by AP_LeftRuler::~AP_LeftRuler(), AP_TopRuler::~AP_TopRuler(), FL_DocLayout::~FL_DocLayout(), and FV_View::~FV_View().
void XAP_Prefs::removeRecent | ( | UT_sint32 | k | ) |
References UT_GenericVector< T >::deleteNthItem(), FREEP, UT_GenericVector< T >::getNthItem(), getRecentCount(), m_vecRecent, and UT_return_if_fail.
Referenced by _openRecent(), and _pruneRecent().
bool XAP_Prefs::savePrefsFile | ( | void | ) |
References UT_Win32LocaleString::c_str(), DEBUG_PREFIX, UT_UTF8String::escapeXML(), UT_Win32LocaleString::fromUTF8(), gchar, XAP_App::getApp(), getBuiltinSchemeName(), XAP_FontSettings::getFonts(), XAP_FontSettings::getIncludeFlag(), UT_GenericVector< T >::getItemCount(), UT_GrowBuf::getLength(), UT_GenericVector< T >::getNthItem(), getNthPluginScheme(), getNthScheme(), XAP_PrefsScheme::getNthValue(), UT_GrowBuf::getPointer(), getPrefsPathname(), getRecent(), XAP_PrefsScheme::getSchemeName(), XAP_PrefsScheme::getValue(), m_bAutoSavePrefs, m_builtinScheme, m_bUseEnvLocale, m_currentScheme, XAP_Prefs::Pref_Geometry::m_flags, m_fonts, m_geom, XAP_Prefs::Pref_Geometry::m_height, m_iMaxRecent, XAP_Prefs::Pref_Geometry::m_posx, XAP_Prefs::Pref_Geometry::m_posy, m_vecLog, m_vecPluginSchemes, m_vecRecent, m_vecSchemes, XAP_Prefs::Pref_Geometry::m_width, NO_PREF_VALUE, s, XAP_App::s_szBuild_CompileDate, XAP_App::s_szBuild_CompileTime, XAP_App::s_szBuild_ID, XAP_App::s_szBuild_Options, XAP_App::s_szBuild_Target, XAP_App::s_szBuild_Version, UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_decodeUTF8string(), UT_UTF8String::utf8_str(), and v.
Referenced by AP_Dialog_Options::_storeDataForControl(), and AP_Dialog_Options::_storeWindowData().
void XAP_Prefs::setAutoSavePrefs | ( | bool | bAuto | ) |
References m_bAutoSavePrefs.
Referenced by AP_Dialog_Options::_storeWindowData(), and setGeometry().
bool XAP_Prefs::setCurrentScheme | ( | const gchar * | szSchemeName | ) |
References getScheme(), m_currentScheme, and UT_DEBUGMSG.
Referenced by AP_Dialog_Options::_event_SetDefaults(), getCurrentScheme(), AP_Prefs::loadBuiltinPrefs(), and loadPrefsFile().
bool XAP_Prefs::setGeometry | ( | UT_sint32 | posx, | |
UT_sint32 | posy, | |||
UT_uint32 | width, | |||
UT_uint32 | height, | |||
UT_uint32 | flags = 0 | |||
) |
References XAP_Prefs::Pref_Geometry::m_flags, m_geom, XAP_Prefs::Pref_Geometry::m_height, m_parserState, XAP_Prefs::Pref_Geometry::m_posx, XAP_Prefs::Pref_Geometry::m_posy, XAP_Prefs::Pref_Geometry::m_width, and setAutoSavePrefs().
Referenced by XAP_UnixFrameImpl::_setGeometry(), and XAP_App::setGeometry().
void XAP_Prefs::setIgnoreNextRecent | ( | void | ) | [inline] |
void XAP_Prefs::setMaxRecent | ( | UT_sint32 | k | ) |
References m_iMaxRecent, UT_ASSERT_HARMLESS, and XAP_PREF_LIMIT_MaxRecent.
void XAP_Prefs::setUseEnvLocale | ( | bool | bUse | ) |
References m_bUseEnvLocale.
void XAP_Prefs::startBlockChange | ( | ) |
References m_bInChangeBlock.
Referenced by AP_Dialog_Options::_storeDataForControl(), AP_Dialog_Options::_storeWindowData(), and AP_Prefs::fullInit().
void XAP_Prefs::startElement | ( | const gchar * | name, | |
const gchar ** | atts | |||
) | [virtual] |
Implements UT_XML::Listener.
References _pruneRecent(), _startElement_SystemDefaultFile(), XAP_FontSettings::addFont(), UT_GenericVector< T >::addItem(), addPluginScheme(), addScheme(), DELETEP, flags, FREEP, gchar, XAP_App::getApp(), XAP_App::getApplicationName(), getBuiltinSchemeName(), XAP_App::getDefaultGeometry(), getPluginScheme(), getScheme(), m_bAutoSavePrefs, m_bLoadSystemDefaultFile, m_bUseEnvLocale, XAP_Prefs::Pref_Geometry::m_flags, m_fonts, m_geom, XAP_Prefs::Pref_Geometry::m_height, m_iMaxRecent, m_parserState, XAP_Prefs::Pref_Geometry::m_posx, XAP_Prefs::Pref_Geometry::m_posy, xmlToIdMapping::m_type, m_vecRecent, XAP_Prefs::Pref_Geometry::m_width, n_compare(), PREF_FLAG_GEOMETRY_MAXIMIZED, PREF_FLAG_GEOMETRY_NOUPDATE, PREF_FLAG_GEOMETRY_POS, PREF_FLAG_GEOMETRY_SIZE, XAP_FontSettings::setIncludeFlag(), XAP_PrefsScheme::setSchemeName(), XAP_PrefsScheme::setValue(), TT_ABIPREFERENCES, TT_FACE, TT_FONTS, TT_GEOMETRY, TT_LOG, TT_PLUGIN, TT_RECENT, TT_SCHEME, TT_SELECT, UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_go_filename_to_uri(), UT_go_path_is_uri(), and UT_SHOULD_NOT_HAPPEN.
UT_StringPtrMap XAP_Prefs::m_ahashChanges [protected] |
Referenced by _markPrefChange(), and endBlockChange().
bool XAP_Prefs::m_bAutoSavePrefs [protected] |
Referenced by getAutoSavePrefs(), savePrefsFile(), setAutoSavePrefs(), startElement(), and XAP_Prefs().
bool XAP_Prefs::m_bIgnoreThisOne [private] |
Referenced by addRecent(), and XAP_Prefs().
bool XAP_Prefs::m_bInChangeBlock [protected] |
Referenced by _markPrefChange(), endBlockChange(), startBlockChange(), and XAP_Prefs().
bool XAP_Prefs::m_bLoadSystemDefaultFile [private] |
Referenced by loadPrefsFile(), loadSystemDefaultPrefsFile(), and startElement().
XAP_PrefsScheme* XAP_Prefs::m_builtinScheme [protected] |
bool XAP_Prefs::m_bUseEnvLocale [protected] |
XAP_PrefsScheme* XAP_Prefs::m_currentScheme [protected] |
Referenced by getCurrentScheme(), getPrefsValue(), getPrefsValueBool(), getPrefsValueInt(), savePrefsFile(), setCurrentScheme(), and XAP_Prefs().
XAP_FontSettings XAP_Prefs::m_fonts [protected] |
Referenced by savePrefsFile(), and startElement().
Pref_Geometry XAP_Prefs::m_geom [protected] |
Referenced by getGeometry(), savePrefsFile(), setGeometry(), startElement(), and XAP_Prefs().
UT_sint32 XAP_Prefs::m_iMaxRecent [protected] |
Referenced by _pruneRecent(), addRecent(), getMaxRecent(), getRecent(), savePrefsFile(), setMaxRecent(), startElement(), and XAP_Prefs().
struct { ... } XAP_Prefs::m_parserState [private] |
Referenced by _startElement_SystemDefaultFile(), getGeometry(), loadPrefsFile(), loadSystemDefaultPrefsFile(), setGeometry(), and startElement().
UT_GenericVector<UT_UTF8String *> XAP_Prefs::m_vecLog [protected] |
Referenced by log(), savePrefsFile(), and ~XAP_Prefs().
UT_GenericVector<XAP_PrefsScheme *> XAP_Prefs::m_vecPluginSchemes [protected] |
Referenced by addPluginScheme(), getNthPluginScheme(), getPluginScheme(), savePrefsFile(), and ~XAP_Prefs().
UT_GenericVector<tPrefsListenersPair *> XAP_Prefs::m_vecPrefsListeners [protected] |
Referenced by _sendPrefsSignal(), addListener(), removeListener(), and ~XAP_Prefs().
UT_GenericVector<char*> XAP_Prefs::m_vecRecent [protected] |
Referenced by _pruneRecent(), addRecent(), getRecent(), getRecentCount(), removeRecent(), savePrefsFile(), startElement(), and ~XAP_Prefs().
UT_GenericVector<XAP_PrefsScheme *> XAP_Prefs::m_vecSchemes [protected] |
Referenced by addScheme(), getNthScheme(), getScheme(), savePrefsFile(), and ~XAP_Prefs().