Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Classes | Defines | Typedefs | Enumerations | Functions | Variables

toolbox.cpp File Reference

Controls bars for some of Inkscape's tools (for some tools, they are in their own files) More...

#include <cstring>
#include <string>
#include <gtkmm.h>
#include <gtk/gtk.h>
#include <iostream>
#include <sstream>
#include <glibmm/i18n.h>
#include "../box3d-context.h"
#include "../box3d.h"
#include "../conn-avoid-ref.h"
#include "../connection-pool.h"
#include "../connector-context.h"
#include "../desktop.h"
#include "../desktop-handles.h"
#include "../desktop-style.h"
#include "../dialogs/dialog-events.h"
#include "../dialogs/text-edit.h"
#include "../document-private.h"
#include "../ege-adjustment-action.h"
#include "../ege-output-action.h"
#include "../ege-select-one-action.h"
#include "../flood-context.h"
#include "gradient-toolbar.h"
#include "../graphlayout.h"
#include "../helper/unit-menu.h"
#include "../helper/units.h"
#include "../helper/unit-tracker.h"
#include "icon.h"
#include "../ink-action.h"
#include "../ink-comboboxentry-action.h"
#include "../inkscape.h"
#include "../interface.h"
#include "../libnrtype/font-instance.h"
#include "../libnrtype/font-lister.h"
#include "../live_effects/effect.h"
#include "../live_effects/lpe-angle_bisector.h"
#include "../live_effects/lpe-line_segment.h"
#include "../lpe-tool-context.h"
#include "../mod360.h"
#include "../pen-context.h"
#include "../preferences.h"
#include "../selection-chemistry.h"
#include "../selection.h"
#include "select-toolbar.h"
#include "../shape-editor.h"
#include "../shortcuts.h"
#include "../sp-clippath.h"
#include "../sp-ellipse.h"
#include "../sp-flowtext.h"
#include "../sp-mask.h"
#include "../sp-namedview.h"
#include "../sp-rect.h"
#include "../sp-spiral.h"
#include "../sp-star.h"
#include "../sp-text.h"
#include "../style.h"
#include "../svg/css-ostringstream.h"
#include "../text-context.h"
#include "../text-editing.h"
#include "../tools-switch.h"
#include "../tweak-context.h"
#include "../spray-context.h"
#include "../ui/dialog/calligraphic-profile-rename.h"
#include "../ui/icon-names.h"
#include "../ui/tool/control-point-selection.h"
#include "../ui/tool/node-tool.h"
#include "../ui/tool/multi-path-manipulator.h"
#include "../ui/widget/style-swatch.h"
#include "../verbs.h"
#include "../widgets/button.h"
#include "../widgets/spinbutton-events.h"
#include "../widgets/spw-utilities.h"
#include "../widgets/widget-sizes.h"
#include "../xml/attribute-record.h"
#include "../xml/node-event-vector.h"
#include "../xml/repr.h"
#include "ui/uxmanager.h"
#include "toolbox.h"

Go to the source code of this file.


class  PrefPusher
class  VerbAction


#define BAR_ID_KEY   "BarIdValue"
#define HANDLE_POS_MARK   "x-inkscape-pos"
#define MODE_LABEL_WIDTH   70
#define noDUMP_DETAILS   1
#define TOOLBAR_SLIDER_HINT   "full"


typedef void(* SetupFunction )(GtkWidget *toolbox, SPDesktop *desktop)
typedef void(* UpdateFunction )(SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox)




static void arc_tb_event_attr_changed (Inkscape::XML::Node *repr, gchar const *, gchar const *, gchar const *, bool, gpointer data)
static void box3d_angle_value_changed (GtkAdjustment *adj, GObject *dataKludge, Proj::Axis axis)
static void box3d_angle_x_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static void box3d_angle_y_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static void box3d_angle_z_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static double box3d_normalize_angle (double a)
static void box3d_persp_tb_event_attr_changed (Inkscape::XML::Node *repr, gchar const *, gchar const *, gchar const *, bool, gpointer data)
static void box3d_resync_toolbar (Inkscape::XML::Node *persp_repr, GObject *data)
static void box3d_set_button_and_adjustment (Persp3D *persp, Proj::Axis axis, GtkAdjustment *adj, GtkAction *act, GtkToggleAction *tact)
static void box3d_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void box3d_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
static void box3d_vp_state_changed (GtkToggleAction *act, GtkAction *, Proj::Axis axis)
static void box3d_vp_x_state_changed (GtkToggleAction *act, GtkAction *box3d_angle)
static void box3d_vp_y_state_changed (GtkToggleAction *act, GtkAction *box3d_angle)
static void box3d_vp_z_state_changed (GtkToggleAction *act, GtkAction *box3d_angle)
static void cell_data_func (GtkCellLayout *, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer)
static void connector_curvature_changed (GtkAdjustment *adj, GObject *tbl)
static void connector_length_changed (GtkAdjustment *adj, GObject *)
static void connector_spacing_changed (GtkAdjustment *adj, GObject *tbl)
static void connector_tb_event_attr_changed (Inkscape::XML::Node *repr, gchar const *name, gchar const *, gchar const *, bool, gpointer data)
static GtkAction * create_action_for_verb (Inkscape::Verb *verb, Inkscape::UI::View::View *view, Inkscape::IconSize size)
static EgeAdjustmentActioncreate_adjustment_action (gchar const *name, gchar const *label, gchar const *shortLabel, gchar const *tooltip, Glib::ustring const &path, gdouble def, GtkWidget *focusTarget, GtkWidget *us, GObject *dataKludge, gboolean altx, gchar const *altx_mark, gdouble lower, gdouble upper, gdouble step, gdouble page, gchar const **descrLabels, gdouble const *descrValues, guint descrCount, void(*callback)(GtkAdjustment *, GObject *), gdouble climb=0.1, guint digits=3, double factor=1.0)
static Glib::RefPtr
< Gtk::ActionGroup > 
create_or_fetch_actions (SPDesktop *desktop)
static void delete_connection (GObject *, sigc::connection *connection)
static void delete_prefspusher (GtkObject *, PrefPusher *watcher)
static void freehand_add_advanced_shape_options (GtkActionGroup *mainActions, GObject *holder, bool tool_is_pencil)
static void freehand_change_shape (EgeSelectOneAction *act, GObject *dataKludge)
static void freehand_mode_changed (EgeSelectOneAction *act, GObject *tbl)
static GList * freehand_shape_dropdown_items_list ()
 Generate the list of freehand advanced shape option entries.
static Glib::ustring const freehand_tool_name (GObject *dataKludge)
static InkNodeToolget_node_tool ()
static void handlebox_attached (GtkHandleBox *, GtkWidget *widget, gpointer)
static void handlebox_detached (GtkHandleBox *, GtkWidget *widget, gpointer)
static void lpetool_open_lpe_dialog (GtkToggleAction *act, gpointer data)
static void lpetool_toggle_set_bbox (GtkToggleAction *act, gpointer data)
static void lpetool_toggle_show_bbox (GtkToggleAction *act, gpointer data)
static void lpetool_toggle_show_measuring_info (GtkToggleAction *act, GObject *tbl)
static void lpetool_unit_changed (GtkAction *, GObject *tbl)
static void paintbucket_autogap_changed (EgeSelectOneAction *act, GObject *)
static void paintbucket_channels_changed (EgeSelectOneAction *act, GObject *)
static void paintbucket_defaults (GtkWidget *, GObject *tbl)
static void paintbucket_offset_changed (GtkAdjustment *adj, GObject *tbl)
static void paintbucket_threshold_changed (GtkAdjustment *adj, GObject *)
static void purge_repr_listener (GObject *, GObject *tbl)
static void rect_tb_event_attr_changed (Inkscape::XML::Node *, gchar const *, gchar const *, gchar const *, bool, gpointer data)
static void setup_aux_toolbox (GtkWidget *toolbox, SPDesktop *desktop)
static void setup_commands_toolbox (GtkWidget *toolbox, SPDesktop *desktop)
static void setup_snap_toolbox (GtkWidget *toolbox, SPDesktop *desktop)
static void setup_tool_toolbox (GtkWidget *toolbox, SPDesktop *desktop)
static void setupToolboxCommon (GtkWidget *toolbox, SPDesktop *desktop, gchar const *descr, gchar const *toolbarName, gchar const *sizePref)
static void sp_action_action_set_sensitive (SPAction *, unsigned int sensitive, void *data)
static void sp_add_freehand_mode_toggle (GtkActionGroup *mainActions, GObject *holder, bool tool_is_pencil)
static void sp_arc_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_arc_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_arctb_defaults (GtkWidget *, GObject *obj)
static void sp_arctb_end_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_arctb_open_state_changed (EgeSelectOneAction *act, GObject *tbl)
static void sp_arctb_sensitivize (GObject *tbl, double v1, double v2)
static void sp_arctb_start_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_arctb_startend_value_changed (GtkAdjustment *adj, GObject *tbl, gchar const *value_name, gchar const *other_name)
static void sp_calligraphy_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_connector_graph_layout (void)
static void sp_connector_mode_toggled (GtkToggleAction *act, GtkObject *)
static void sp_connector_new_connection_point (GtkWidget *, GObject *tbl)
static void sp_connector_orthogonal_toggled (GtkToggleAction *act, GObject *tbl)
static void sp_connector_path_set_avoid (void)
static void sp_connector_path_set_ignore (void)
static void sp_connector_remove_connection_point (GtkWidget *, GObject *tbl)
static void sp_connector_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_connector_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_dcc_build_presets_list (GObject *tbl)
static void sp_dcc_save_profile (GtkWidget *, GObject *tbl)
static void sp_ddc_angle_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_cap_rounding_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_change_profile (EgeSelectOneAction *act, GObject *tbl)
static void sp_ddc_flatness_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_mass_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_tilt_state_changed (GtkToggleAction *act, GObject *tbl)
static void sp_ddc_tremor_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_velthin_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_width_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_ddc_wiggle_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_directed_graph_layout_toggled (GtkToggleAction *act, GtkObject *)
static void sp_dropper_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static GtkWidget * sp_empty_toolbox_new (SPDesktop *desktop)
static void sp_eraser_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_erasertb_mode_changed (EgeSelectOneAction *act, GObject *tbl)
static void sp_erc_width_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_line_segment_build_list (GObject *tbl)
static void sp_lpetool_change_line_segment_type (EgeSelectOneAction *act, GObject *tbl)
static void sp_lpetool_mode_changed (EgeSelectOneAction *act, GObject *tbl)
static void sp_lpetool_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_lpetool_toolbox_sel_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_lpetool_toolbox_sel_modified (Inkscape::Selection *selection, guint, GObject *)
static void sp_node_path_edit_add (void)
static void sp_node_path_edit_auto (void)
static void sp_node_path_edit_break (void)
static void sp_node_path_edit_cusp (void)
static void sp_node_path_edit_delete (void)
static void sp_node_path_edit_delete_segment (void)
static void sp_node_path_edit_join (void)
static void sp_node_path_edit_join_segment (void)
static void sp_node_path_edit_nextLPEparam (GtkAction *, gpointer data)
static void sp_node_path_edit_smooth (void)
static void sp_node_path_edit_symmetrical (void)
static void sp_node_path_edit_tocurve (void)
static void sp_node_path_edit_toline (void)
static void sp_node_path_value_changed (GtkAdjustment *adj, GObject *tbl, Geom::Dim2 d)
static void sp_node_path_x_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_node_path_y_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_node_toolbox_coord_changed (gpointer, GObject *tbl)
static void sp_node_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_node_toolbox_sel_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_node_toolbox_sel_modified (Inkscape::Selection *selection, guint, GObject *tbl)
static void sp_nooverlaps_graph_layout_toggled (GtkToggleAction *act, GtkObject *)
static void sp_paintbucket_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_pen_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_pencil_tb_defaults (GtkWidget *, GtkObject *obj)
static void sp_pencil_tb_tolerance_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_pencil_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_rect_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_rect_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_rtb_defaults (GtkWidget *, GObject *obj)
static void sp_rtb_height_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_rtb_rx_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_rtb_ry_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_rtb_sensitivize (GObject *tbl)
static void sp_rtb_value_changed (GtkAdjustment *adj, GObject *tbl, gchar const *value_name, void(*setter)(SPRect *, gdouble))
static void sp_rtb_width_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_spiral_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_spiral_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_spl_tb_defaults (GtkWidget *, GtkObject *obj)
static void sp_spl_tb_expansion_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_spl_tb_revolution_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_spl_tb_t0_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_spl_tb_value_changed (GtkAdjustment *adj, GObject *tbl, Glib::ustring const &value_name)
static void sp_spray_mean_value_changed (GtkAdjustment *adj, GObject *)
static void sp_spray_mode_changed (EgeSelectOneAction *act, GObject *)
static void sp_spray_population_value_changed (GtkAdjustment *adj, GObject *)
static void sp_spray_pressure_state_changed (GtkToggleAction *act, gpointer)
static void sp_spray_rotation_value_changed (GtkAdjustment *adj, GObject *)
static void sp_spray_scale_value_changed (GtkAdjustment *adj, GObject *)
static void sp_spray_standard_deviation_value_changed (GtkAdjustment *adj, GObject *)
static void sp_spray_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_spray_width_value_changed (GtkAdjustment *adj, GObject *)
static void sp_star_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_star_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
static void sp_stb_defaults (GtkWidget *, GObject *dataKludge)
static void sp_stb_magnitude_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static void sp_stb_proportion_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static void sp_stb_randomized_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static void sp_stb_rounded_value_changed (GtkAdjustment *adj, GObject *dataKludge)
static void sp_stb_sides_flat_state_changed (EgeSelectOneAction *act, GObject *dataKludge)
static void sp_text_align_mode_changed (EgeSelectOneAction *act, GObject *tbl)
static void sp_text_dx_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_text_dy_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_text_fontfamily_value_changed (Ink_ComboBoxEntry_Action *act, GObject *tbl)
static void sp_text_fontsize_value_changed (Ink_ComboBoxEntry_Action *act, GObject *tbl)
static void sp_text_letterspacing_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_text_lineheight_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_text_orientation_mode_changed (EgeSelectOneAction *act, GObject *tbl)
static void sp_text_rotation_value_changed (GtkAdjustment *adj, GObject *tbl)
static void sp_text_script_changed (InkToggleAction *act, GObject *tbl)
static void sp_text_style_changed (InkToggleAction *act, GObject *tbl)
static void sp_text_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_text_toolbox_selection_changed (Inkscape::Selection *, GObject *tbl)
static void sp_text_toolbox_selection_modified (Inkscape::Selection *selection, guint, GObject *tbl)
void sp_text_toolbox_subselection_changed (gpointer, GObject *tbl)
static void sp_text_wordspacing_value_changed (GtkAdjustment *adj, GObject *tbl)
void sp_toolbox_add_label (GtkWidget *tbl, gchar const *title, bool wide)
static GtkWidget * sp_toolbox_button_new_from_verb_with_doubleclick (GtkWidget *t, Inkscape::IconSize size, SPButtonType type, Inkscape::Verb *verb, Inkscape::Verb *doubleclick_verb, Inkscape::UI::View::View *view, GtkTooltips *tt)
static void sp_tweak_fidelity_value_changed (GtkAdjustment *adj, GObject *)
static void sp_tweak_force_value_changed (GtkAdjustment *adj, GObject *)
static void sp_tweak_mode_changed (EgeSelectOneAction *act, GObject *tbl)
static void sp_tweak_pressure_state_changed (GtkToggleAction *act, gpointer)
static void sp_tweak_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void sp_tweak_width_value_changed (GtkAdjustment *adj, GObject *)
static void sp_zoom_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
static void spiral_tb_event_attr_changed (Inkscape::XML::Node *repr, gchar const *, gchar const *, gchar const *, bool, gpointer data)
static void star_tb_event_attr_changed (Inkscape::XML::Node *repr, gchar const *name, gchar const *, gchar const *, bool, gpointer data)
static void toggle_dropper_pick_alpha (GtkToggleAction *act, gpointer tbl)
static void toggle_dropper_set_alpha (GtkToggleAction *act, gpointer tbl)
static void toggle_snap_callback (GtkToggleAction *act, gpointer data)
static GtkWidget * toolboxNewCommon (GtkWidget *tb, BarId id, GtkPositionType handlePos)
static void trigger_sp_action (GtkAction *, gpointer user_data)
static void tweak_toggle_doh (GtkToggleAction *act, gpointer)
static void tweak_toggle_dol (GtkToggleAction *act, gpointer)
static void tweak_toggle_doo (GtkToggleAction *act, gpointer)
static void tweak_toggle_dos (GtkToggleAction *act, gpointer)
static void update_aux_toolbox (SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox)
static void update_commands_toolbox (SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox)
static void update_presets_list (GObject *tbl)
static void update_tool_toolbox (SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox)


static SPActionEventVector action_event_vector
struct {
   GtkWidget *(*   create_func )(SPDesktop *desktop)
   gchar const *   data_name
   void(*   prep_func )(SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
   gchar const *   swatch_tip
   gchar const *   swatch_tool
   gint   swatch_verb_id
   gchar const *   type_name
   gchar const *   ui_name
aux_toolboxes []
struct {
   gchar const *   data_name
   sp_verb_t   doubleclick_verb
   gchar const *   type_name
   sp_verb_t   verb
tools []
static gchar const * ui_descr = "</ui>"
static gchar const *const widget_names []

Detailed Description

Controls bars for some of Inkscape's tools (for some tools, they are in their own files)

Definition in file toolbox.cpp.

Generated by  Doxygen 1.6.0   Back to index