GnuCash  4.12-11-g8193d7f23a+
Data Structures | Macros | Functions

Functions for adding plugins to a GnuCash window. More...

#include "gnc-main-window.h"
#include "gnc-plugin-page.h"

Go to the source code of this file.

Data Structures

struct  GncPlugin
 The instance data structure for a menu-only plugin. More...
 
struct  GncPluginClass
 The class data structure for a menu-only plugin. More...
 
struct  action_toolbar_labels
 A structure for defining alternate action names for use in the toolbar. More...
 

Macros

#define GNC_TYPE_PLUGIN   (gnc_plugin_get_type ())
 
#define GNC_PLUGIN(o)   (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_PLUGIN, GncPlugin))
 
#define GNC_PLUGIN_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN, GncPluginClass))
 
#define GNC_IS_PLUGIN(o)   (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_PLUGIN))
 
#define GNC_IS_PLUGIN_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN))
 
#define GNC_PLUGIN_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_PLUGIN, GncPluginClass))
 
#define GNC_PLUGIN_NAME   "GncPlugin"
 

Functions

GType gnc_plugin_get_type (void)
 Get the type of a menu-only plugin. More...
 
void gnc_plugin_add_to_window (GncPlugin *plugin, GncMainWindow *window, GQuark type)
 Add the specified plugin from the specified window. More...
 
void gnc_plugin_remove_from_window (GncPlugin *plugin, GncMainWindow *window, GQuark type)
 Remove the specified plugin from the specified window. More...
 
const gchar * gnc_plugin_get_name (GncPlugin *plugin)
 Retrieve the textual name of a plugin. More...
 
void gnc_plugin_init_short_names (GtkActionGroup *action_group, action_toolbar_labels *toolbar_labels)
 Add "short" labels to existing actions. More...
 
void gnc_plugin_set_important_actions (GtkActionGroup *action_group, const gchar **name)
 Mark certain actions as "important". More...
 
void gnc_plugin_update_actions (GtkActionGroup *action_group, const gchar **action_names, const gchar *property_name, gboolean value)
 Update a property on a set of existing GtkActions. More...
 
gint gnc_plugin_add_actions (GtkUIManager *ui_merge, GtkActionGroup *action_group, const gchar *filename)
 Load a new set of actions into an existing UI. More...
 

Detailed Description

Functions for adding plugins to a GnuCash window.

Author
Copyright (C) 2003 Jan Arne Petersen
Copyright (C) 2003,2005 David Hampton hampt.nosp@m.on@e.nosp@m.mploy.nosp@m.ees..nosp@m.org

A GncPlugin is the basic object for adding a menu item or items to the GnuCash user interface. This object should be instantiated once at startup time and passed to the plugin manager. Whenever a new window is opened, the main window code will ask the plugin manager for a list of all plugins, and will add each plugin to the new window by calling the gnc_plugin_add_to_window function. This function handles installing the plugin's actions, and then calls the plugin to allow it to perform any plugin specific actions. When a main window is closed, the gnc_plugin_remove_from_window function is called, which first calls the plugin to perform plugin specific actions and then removes the plugin's actions from the window.

Definition in file gnc-plugin.h.