本文整理汇总了C++中XAP_App::getUserPrivateDirectory方法的典型用法代码示例。如果您正苦于以下问题:C++ XAP_App::getUserPrivateDirectory方法的具体用法?C++ XAP_App::getUserPrivateDirectory怎么用?C++ XAP_App::getUserPrivateDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XAP_App
的用法示例。
在下文中一共展示了XAP_App::getUserPrivateDirectory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
void GR_MathManager::initialize(void)
{
XAP_App *pApp = XAP_App::getApp();
// load the gtkmathview settings and operator dictionaries from the private user directory, ...
UT_UTF8String userConfDir(pApp->getUserPrivateDirectory());
UT_UTF8String userDictDir(pApp->getUserPrivateDirectory());
UT_UTF8String userCombiningDictDir(pApp->getUserPrivateDirectory());
UT_UTF8String userLocalDictDir(pApp->getUserPrivateDirectory());
#if defined(WIN32)
userConfDir += "\\math\\gtkmathview.conf.xml";
userDictDir += "\\math\\dictionary.xml";
userCombiningDictDir += "\\math\\dictionary-combining.xml";
userLocalDictDir += "\\math\\dictionary-local.xml";
#else
userConfDir += "/math/gtkmathview.conf.xml";
userDictDir += "/math/dictionary.xml";
userCombiningDictDir += "/math/dictionary-combining.xml";
userLocalDictDir += "/math/dictionary-local.xml";
#endif
// ... or from the (common) AbiSuite directory
UT_UTF8String libConfDir(pApp->getAbiSuiteLibDir());
UT_UTF8String libDictDir(pApp->getAbiSuiteLibDir());
UT_UTF8String libCombiningDictDir(pApp->getAbiSuiteLibDir());
UT_UTF8String libLocalDictDir(pApp->getAbiSuiteLibDir());
#if defined(WIN32)
libConfDir += "\\math\\gtkmathview.conf.xml";
libDictDir += "\\math\\dictionary.xml";
libCombiningDictDir += "\\math\\dictionary-combining.xml";
libLocalDictDir += "\\math\\dictionary-local.xml";
#else
libConfDir += "/math/gtkmathview.conf.xml";
libDictDir += "/math/dictionary.xml";
libCombiningDictDir += "/math/dictionary-combining.xml";
libLocalDictDir += "/math/dictionary-local.xml";
#endif
// add the configuration paths
#ifdef TOOLKIT_COCOA
if (const char * resources = getenv("ABIWORD_COCOA_BUNDLED_RESOURCES"))
{
UT_UTF8String bundleConfDir(resources);
bundleConfDir += "/gtkmathview/gtkmathview.conf.xml";
Configuration::addConfigurationPath(bundleConfDir.utf8_str());
}
#endif
Configuration::addConfigurationPath( libConfDir.utf8_str() );
Configuration::addConfigurationPath( userConfDir.utf8_str() );
SmartPtr<AbstractLogger> logger = Logger::create();
m_pLogger = logger;
SmartPtr<Configuration> configuration = initConfiguration<libxml2_MathView>(logger, getenv("GTKMATHVIEWCONF"));
logger->setLogLevel(LOG_INFO);
// add the dictionary paths
#ifdef TOOLKIT_COCOA
if (const char * resources = getenv("ABIWORD_COCOA_BUNDLED_RESOURCES"))
{
UT_UTF8String bundleDictDir(resources);
UT_UTF8String bundleCombiningDictDir(resources);
UT_UTF8String bundleLocalDictDir(resources);
bundleDictDir += "/gtkmathview/dictionary.xml";
bundleCombiningDictDir += "/gtkmathview/dictionary-combining.xml";
bundleLocalDictDir += "/gtkmathview/dictionary-local.xml";
configuration->add("dictionary/path", bundleDictDir.utf8_str());
configuration->add("dictionary/path", bundleCombiningDictDir.utf8_str());
configuration->add("dictionary/path", bundleLocalDictDir.utf8_str());
}
#endif
configuration->add("dictionary/path", libDictDir.utf8_str());
configuration->add("dictionary/path", libCombiningDictDir.utf8_str());
configuration->add("dictionary/path", libLocalDictDir.utf8_str());
configuration->add("dictionary/path", userDictDir.utf8_str());
configuration->add("dictionary/path", userCombiningDictDir.utf8_str());
configuration->add("dictionary/path", userLocalDictDir.utf8_str());
SmartPtr<GR_Abi_MathGraphicDevice> mathGraphicDevice
= GR_Abi_MathGraphicDevice::create(logger, configuration, getGraphics());
m_pMathGraphicDevice = mathGraphicDevice;
m_pAbiContext = new GR_Abi_RenderingContext(getGraphics());
UT_DEBUGMSG(("MAthView New rendering context %p Graphics %p \n",m_pAbiContext,getGraphics()));
m_pOperatorDictionary = initOperatorDictionary<libxml2_MathView>(logger, configuration);
}