2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith * Inkscape UI action implementation
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith * Lauris Kaplinski <lauris@kaplinski.com>
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith * Copyright (C) 2003 Lauris Kaplinski
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith * This code is in public domain
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#define SP_ACTION(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_ACTION, SPAction))
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#define SP_ACTION_CLASS(o) (G_TYPE_CHECK_CLASS_CAST((o), SP_TYPE_ACTION, SPActionClass))
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#define SP_IS_ACTION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_ACTION))
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith} // namespace View
a4142717644b885998f4de2b27be4e8648315decMarkus Engel} // namespace UI
9836787d16b657453784c30809d330f50d9bc6d8Liam P. White/** All the data that is required to be an action. This
9836787d16b657453784c30809d330f50d9bc6d8Liam P. White structure identifies the action and has the data to
a4142717644b885998f4de2b27be4e8648315decMarkus Engel create menus and toolbars for the action */
a4142717644b885998f4de2b27be4e8648315decMarkus Engel unsigned sensitive : 1; /**< Value to track whether the action is sensitive */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith unsigned active : 1; /**< Value to track whether the action is active */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith Inkscape::ActionContext context; /**< The context (doc/view) to which this action is attached */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith gchar *name; /**< Full text name of the action */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith gchar *tip; /**< A tooltip to describe the action */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith gchar *image; /**< An image to visually identify the action */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith Inkscape::Verb *verb; /**< The verb that produced this action */
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith sigc::signal<void, Glib::ustring const &> signal_set_name;
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith/** The action class is the same as its parent. */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithSPAction *sp_action_new(Inkscape::ActionContext const &context,
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithvoid sp_action_perform(SPAction *action, void *data);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithvoid sp_action_set_active(SPAction *action, unsigned active);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithvoid sp_action_set_sensitive(SPAction *action, unsigned sensitive);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithvoid sp_action_set_name(SPAction *action, Glib::ustring const &name);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithSPDocument *sp_action_get_document(SPAction *action);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithInkscape::Selection *sp_action_get_selection(SPAction *action);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn SmithInkscape::UI::View::View *sp_action_get_view(SPAction *action);
88381aa2b5d06411a23bed41ae19f73d15c92a80John SmithSPDesktop *sp_action_get_desktop(SPAction *action);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith Local Variables:
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith c-file-style:"stroustrup"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith indent-tabs-mode:nil
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith fill-column:99
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :