#include "ut_assert.h"
#include "ut_debugmsg.h"
#include "ut_path.h"
#include "ut_sleep.h"
#include "ut_process.h"
#include "xap_App.h"
#include "xap_DialogFactory.h"
#include "xap_Dlg_FileOpenSaveAs.h"
#include "xap_Frame.h"
#include "xap_Menu_Layouts.h"
#include "xap_Module.h"
#include "xap_Prefs.h"
#include "ap_Dialog_Id.h"
#include "ap_Menu_Id.h"
#include "ev_EditMethod.h"
#include "ev_Menu.h"
#include "ev_Menu_Actions.h"
#include "ev_Menu_Labels.h"
#include "ev_Menu_Layouts.h"
#include "fg_Graphic.h"
#include "fl_BlockLayout.h"
#include "fp_Run.h"
#include "fv_View.h"
#include "ie_imp.h"
#include "ie_impGraphic.h"
#include "ie_exp.h"
#include "ie_types.h"
#include <sys/types.h>
#include <sys/stat.h>
Go to the source code of this file.
Classes | |
struct | AbiMenuOptions |
Defines | |
#define | ABI_PLUGIN_NAME AbiPlugin |
#define | ABI_PLUGIN_SOURCE __FILE__ |
#define | ABI_PLUGIN_mk2str(x) # x |
#define | ABI_PLUGIN_mkstr(x) ABI_PLUGIN_mk2str(x) |
#define | ABI_PLUGIN_glue(a, b) a ## b |
#define | ABI_PLUGIN_xglue(a, b) ABI_PLUGIN_glue(a,b) |
#define | ABI_PLUGIN_METHODNAME(a) ABI_PLUGIN_xglue(ABI_PLUGIN_NAME,a) |
#define | ABI_PLUGIN_SCHEME ABI_PLUGIN_xglue(_,ABI_PLUGIN_xglue(ABI_PLUGIN_NAME,_)) |
#define | ABI_PLUGIN_SCHEME_NAME ABI_PLUGIN_mkstr(ABI_PLUGIN_SCHEME) |
#define | ABI_PLUGIN_METHOD(m) ABI_PLUGIN_METHODNAME(_PluginCallback_##m) |
#define | ABI_PLUGIN_METHOD_STR(m) ABI_PLUGIN_mkstr(ABI_PLUGIN_METHOD(m)) |
#define | DECLARE_ABI_PLUGIN_METHOD(m) bool ABI_PLUGIN_METHOD(m)(AV_View* v, EV_EditMethodCallData *d) |
#define | ABI_GRAYABLE_MENUITEM(m) ABI_PLUGIN_METHODNAME(_MenuGrayState_##m) |
#define | ABI_GRAYABLE_MENUITEM_PROTOTYPE(m) EV_Menu_ItemState ABI_GRAYABLE_MENUITEM(m)(AV_View * pAV_View, XAP_Menu_Id id) |
#define | DECLARE_ABI_GRAYABLE_MENUITEM(m, boolFunc) |
#define | ABI_TOGGLEABLE_MENUITEM(m) ABI_PLUGIN_METHODNAME(_MenuToggleState_##m) |
#define | ABI_TOGGLEABLE_MENUITEM_PROTOTYPE(m) EV_Menu_ItemState ABI_TOGGLEABLE_MENUITEM(m)(AV_View * pAV_View, XAP_Menu_Id id) |
#define | DECLARE_ABI_TOGGLEABLE_MENUITEM(m, boolFunc) |
#define | lockGUI(d) plugin_imp_lockGUI(d) |
#define | unlockGUI(d) plugin_imp_unlockGUI(d) |
Typedefs | |
typedef struct AbiMenuOptions | AbiMenuOptions |
Functions | |
ABI_FAR_CALL int | abi_plugin_register (XAP_ModuleInfo *mi) |
Register the OpenDocument plugin. | |
ABI_FAR_CALL int | abi_plugin_unregister (XAP_ModuleInfo *mi) |
Unregister the OpenDocument plugin. | |
ABI_FAR_CALL int | abi_plugin_supports_version (UT_uint32 major, UT_uint32 minor, UT_uint32 release) |
UT_Error | addToMenus (AbiMenuOptions amo[], UT_uint32 num_menuitems, XAP_Menu_Id prevMM, XAP_Menu_Id prevCM) |
UT_Error | removeFromMenus (const AbiMenuOptions amo[], UT_uint32 num_menuitems) |
bool | getFileName (std::string &szFile, XAP_Frame *pFrame, XAP_Dialog_Id id, const char **szDescList, const char **szSuffixList, int *ft) |
bool | isImageSelected (void) |
void | plugin_imp_lockGUI (EV_EditMethodCallData *d) |
void | plugin_imp_unlockGUI (EV_EditMethodCallData *d) |
XAP_ModuleInfo * | getModuleInfo (void) |
bool | doRegistration (void) |
void | doUnregistration (void) |
Variables | |
XAP_Prefs * | prefs |
XAP_PrefsScheme * | prefsScheme |
const gchar * | szAbiPluginSchemeName |
#define ABI_GRAYABLE_MENUITEM | ( | m | ) | ABI_PLUGIN_METHODNAME(_MenuGrayState_##m) |
#define ABI_GRAYABLE_MENUITEM_PROTOTYPE | ( | m | ) | EV_Menu_ItemState ABI_GRAYABLE_MENUITEM(m)(AV_View * pAV_View, XAP_Menu_Id id) |
#define ABI_PLUGIN_glue | ( | a, | ||
b | ||||
) | a ## b |
#define ABI_PLUGIN_METHOD | ( | m | ) | ABI_PLUGIN_METHODNAME(_PluginCallback_##m) |
#define ABI_PLUGIN_METHOD_STR | ( | m | ) | ABI_PLUGIN_mkstr(ABI_PLUGIN_METHOD(m)) |
#define ABI_PLUGIN_METHODNAME | ( | a | ) | ABI_PLUGIN_xglue(ABI_PLUGIN_NAME,a) |
#define ABI_PLUGIN_NAME AbiPlugin |
#define ABI_PLUGIN_SCHEME ABI_PLUGIN_xglue(_,ABI_PLUGIN_xglue(ABI_PLUGIN_NAME,_)) |
#define ABI_PLUGIN_SCHEME_NAME ABI_PLUGIN_mkstr(ABI_PLUGIN_SCHEME) |
#define ABI_PLUGIN_SOURCE __FILE__ |
#define ABI_PLUGIN_xglue | ( | a, | ||
b | ||||
) | ABI_PLUGIN_glue(a,b) |
#define ABI_TOGGLEABLE_MENUITEM | ( | m | ) | ABI_PLUGIN_METHODNAME(_MenuToggleState_##m) |
#define ABI_TOGGLEABLE_MENUITEM_PROTOTYPE | ( | m | ) | EV_Menu_ItemState ABI_TOGGLEABLE_MENUITEM(m)(AV_View * pAV_View, XAP_Menu_Id id) |
#define DECLARE_ABI_GRAYABLE_MENUITEM | ( | m, | ||
boolFunc | ||||
) |
ABI_GRAYABLE_MENUITEM_PROTOTYPE(m) \ { \ UT_UNUSED(pAV_View); \ UT_UNUSED(id); \ if (boolFunc()) \ return EV_MIS_ZERO; \ else \ return EV_MIS_Gray; \ }
#define DECLARE_ABI_PLUGIN_METHOD | ( | m | ) | bool ABI_PLUGIN_METHOD(m)(AV_View* v, EV_EditMethodCallData *d) |
#define DECLARE_ABI_TOGGLEABLE_MENUITEM | ( | m, | ||
boolFunc | ||||
) |
ABI_TOGGLEABLE_MENUITEM_PROTOTYPE(m) \ { \ if (boolFunc()) \ return EV_MIS_ZERO; \ else \ return EV_MIS_Toggled; \ }
#define lockGUI | ( | d | ) | plugin_imp_lockGUI(d) |
Referenced by Defun1().
#define unlockGUI | ( | d | ) | plugin_imp_unlockGUI(d) |
Referenced by Defun1().
typedef struct AbiMenuOptions AbiMenuOptions |
ABI_FAR_CALL int abi_plugin_register | ( | XAP_ModuleInfo * | mi | ) |
Register the OpenDocument plugin.
References ABI_CMD_CONTEXT_TYPE, AbiCommand_registerMethod(), AbiGimp_addToMenus(), AbiGOffice_addToMenus(), AbiMathView_addToMenus(), AbiTest_registerMethod(), XAP_App::addListener(), AiksaurusABI_addToMenus(), XAP_ModuleInfo::author, BabelFish_addToMenus(), GR_GOChartManager::buildContextualMenu(), connection_pool, conversion_program, XAP_ModuleInfo::desc, doRegistration(), FREEP, FreeTranslation_addToMenus(), Garble_registerMethod(), gchar, GDA_addToMenus(), GDict_addToMenus(), XAP_App::getAbiSuiteAppDir(), XAP_App::getApp(), AbiCollabSessionManager::getManager(), getModuleInfo(), XAP_App::getPrefs(), XAP_App::getUserPrivateDirectory(), Google_addToMenus(), GR_GOComponentManager::GR_GOComponentManager(), LoadBindings_registerMethod(), LoadKeybindings(), AbiCollabSessionManager::loadProfile(), mime_types, XAP_ModuleInfo::name, Ots_addToMenus(), pdf_conversion_programs, PLUGIN_NAME, PLUGIN_TEXT, PLUGIN_WORD, Presentation_registerMethod(), progExists(), register_mime_cb(), AbiCollabSessionManager::registerAccountHandlers(), AbiCollabSessionManager::registerDialogs(), XAP_App::registerEmbeddable(), IE_Exp::registerExporter(), IE_ImpGraphic::registerImporter(), IE_Imp::registerImporter(), s_abicollab_add_menus(), AbiGrammar::setID(), AP_Win32Dialog_EpubExportOptions::setInstance(), URLDict_addToMenus(), XAP_ModuleInfo::usage, UT_ASSERT, UT_DEBUGMSG, UT_go_filename_to_uri(), UT_return_val_if_fail, UT_UTF8String::utf8_str(), XAP_ModuleInfo::version, and Wikipedia_addToMenus().
ABI_FAR_CALL int abi_plugin_supports_version | ( | UT_uint32 | major, | |
UT_uint32 | minor, | |||
UT_uint32 | release | |||
) |
References isCurrentAbiVersion, and UT_UNUSED.
ABI_FAR_CALL int abi_plugin_unregister | ( | XAP_ModuleInfo * | mi | ) |
Unregister the OpenDocument plugin.
References AbiCommand_RemoveFromMethods(), AbiGimp_RemoveFromMenus(), AbiGOffice_removeFromMenus(), AbiMathView_removeFromMenus(), AbiTest_RemoveFromMethods(), AikSaurusABI_RemoveFromMenus(), XAP_ModuleInfo::author, BabelFish_RemoveFromMenus(), connection_pool, XAP_App::deleteClipboardFmt(), DELETEP, XAP_ModuleInfo::desc, AbiCollabSessionManager::destroyAccounts(), AbiCollabSessionManager::disconnectSessions(), doUnregistration(), FreeTranslation_RemoveFromMenus(), Garble_RemoveFromMethods(), GDA_removeFromMenus(), GDict_removeFromMenus(), XAP_App::getApp(), AbiCollabSessionManager::getManager(), GR_LasemMathManager::getObjectType(), GR_GOComponentManager::getObjectType(), GR_GOChartManager::getObjectType(), Google_removeFromMenus(), LoadBindings_RemoveFromMethods(), m_impSniffer, mime_types, XAP_ModuleInfo::name, Ots_removeFromMenus(), Presentation_RemoveFromMethods(), GR_GOChartManager::removeContextualMenu(), XAP_App::removeListener(), s_abicollab_remove_menus(), AbiCollabSessionManager::storeProfile(), AbiCollabSessionManager::unregisterAccountHandlers(), AbiCollabSessionManager::unregisterDialogs(), XAP_App::unRegisterEmbeddable(), IE_Exp::unregisterExporter(), IE_ImpGraphic::unregisterImporter(), IE_Imp::unregisterImporter(), AbiCollabSessionManager::unregisterSniffers(), URLDict_removeFromMenus(), XAP_ModuleInfo::usage, UT_ASSERT, UT_return_val_if_fail, XAP_ModuleInfo::version, and Wikipedia_removeFromMenus().
UT_Error addToMenus | ( | AbiMenuOptions | amo[], | |
UT_uint32 | num_menuitems, | |||
XAP_Menu_Id | prevMM, | |||
XAP_Menu_Id | prevCM | |||
) |
References EV_Menu_ActionSet::addAction(), EV_EditMethodContainer::addEditMethod(), XAP_Menu_Factory::addNewLabel(), XAP_Menu_Factory::addNewMenuAfter(), description, flags, XAP_App::getApp(), XAP_App::getEditMethodContainer(), XAP_App::getFrame(), XAP_App::getFrameCount(), XAP_App::getMenuActionSet(), XAP_App::getMenuFactory(), XAP_Menu_Factory::getNewID(), AbiMenuOptions::id, label, method, methodName, and XAP_Frame::rebuildMenus().
Referenced by doRegistration().
bool doRegistration | ( | void | ) |
References ABIPAINT_PREF_KEY_bLeaveImageAsPNG, ABIPAINT_PREF_KEY_szProgramName, XAP_Prefs::addPluginScheme(), addToMenus(), getDefaultApp(), XAP_Prefs::getPluginScheme(), NUM_MENUITEMS, prefs, XAP_PrefsScheme::setValue(), XAP_PrefsScheme::setValueBool(), szAbiPluginSchemeName, and UT_return_val_if_fail.
Referenced by abi_plugin_register().
void doUnregistration | ( | void | ) |
References NUM_MENUITEMS, and removeFromMenus().
Referenced by abi_plugin_unregister().
bool getFileName | ( | std::string & | szFile, | |
XAP_Frame * | pFrame, | |||
XAP_Dialog_Id | id, | |||
const char ** | szDescList, | |||
const char ** | szSuffixList, | |||
int * | ft | |||
) |
References XAP_Dialog_FileOpenSaveAs::getAnswer(), XAP_Frame::getDialogFactory(), XAP_Dialog_FileOpenSaveAs::getPathname(), XAP_DialogFactory::releaseDialog(), XAP_DialogFactory::requestDialog(), XAP_Dialog_FileOpenSaveAs::runModal(), XAP_Dialog_FileOpenSaveAs::setCurrentPathname(), XAP_Dialog_FileOpenSaveAs::setFileTypeList(), XAP_Dialog_FileOpenSaveAs::setSuggestFilename(), and UT_ASSERT.
Referenced by DECLARE_ABI_PLUGIN_METHOD().
XAP_ModuleInfo* getModuleInfo | ( | void | ) |
Referenced by abi_plugin_register().
bool isImageSelected | ( | void | ) |
void plugin_imp_lockGUI | ( | EV_EditMethodCallData * | d | ) |
void plugin_imp_unlockGUI | ( | EV_EditMethodCallData * | d | ) |
References ev_EditMethod_invoke(), and UT_ASSERT.
UT_Error removeFromMenus | ( | const AbiMenuOptions | amo[], | |
UT_uint32 | num_menuitems | |||
) |
References DELETEP, ev_EditMethod_lookup(), XAP_App::getApp(), XAP_App::getEditMethodContainer(), XAP_App::getFrame(), XAP_App::getFrameCount(), XAP_App::getMenuFactory(), methodName, XAP_Frame::rebuildMenus(), EV_EditMethodContainer::removeEditMethod(), and XAP_Menu_Factory::removeMenuItem().
Referenced by doUnregistration().
Referenced by doRegistration(), XAP_App::getGeometry(), and XAP_App::setGeometry().
const gchar* szAbiPluginSchemeName |
Referenced by doRegistration().