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

toolbox.cpp File Reference

Detailed Description

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

Definition in file toolbox.cpp.

#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/graphlayout.h"
#include "../helper/unit-menu.h"
#include "../helper/units.h"
#include "../helper/unit-tracker.h"
#include "icon.h"
#include "../ink-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 "../node-context.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 "../tools-switch.h"
#include "../tweak-context.h"
#include "../ui/dialog/calligraphic-profile-rename.h"
#include "../ui/icon-names.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 "toolbox.h"

Go to the source code of this file.


class  PencilToleranceObserver
class  VerbAction


#define MODE_LABEL_WIDTH   70
#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 cbe_add_completion (GtkComboBoxEntry *cbe, GObject *tbl)
void cell_data_func (GtkCellLayout *, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer)
static void connector_length_changed (GtkAdjustment *adj, GObject *tbl)
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 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)
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 ShapeEditor * get_current_shape_editor ()
void handlebox_attached (GtkHandleBox *, GtkWidget *widget, gpointer)
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 *)
Inkscape::IconSize prefToSize (Glib::ustring const &path, int base)
static void purge_repr_listener (GObject *obj, 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)
void setup_snap_toolbox (GtkWidget *toolbox, SPDesktop *desktop)
static void setup_tool_toolbox (GtkWidget *toolbox, SPDesktop *desktop)
void show_aux_toolbox (GtkWidget *toolbox_toplevel)
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)
GtkWidget * sp_aux_toolbox_new ()
void sp_aux_toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop)
static void sp_calligraphy_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
GtkWidget * sp_commands_toolbox_new ()
void sp_commands_toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop)
static void sp_connector_graph_layout (void)
static void sp_connector_path_set_avoid (void)
static void sp_connector_path_set_ignore (void)
static void sp_connector_toolbox_prep (SPDesktop *desktop, GtkActionGroup *mainActions, GObject *holder)
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_pressure_state_changed (GtkToggleAction *act, GObject *tbl)
static void sp_ddc_tilt_state_changed (GtkToggleAction *act, GObject *tbl)
static void sp_ddc_trace_background_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)
void sp_lpetool_toolbox_sel_changed (Inkscape::Selection *selection, GObject *tbl)
void sp_lpetool_toolbox_sel_modified (Inkscape::Selection *selection, guint, GObject *)
void sp_node_path_edit_add (void)
void sp_node_path_edit_auto (void)
void sp_node_path_edit_break (void)
void sp_node_path_edit_clippath (GtkAction *, gpointer data)
void sp_node_path_edit_cusp (void)
void sp_node_path_edit_delete (void)
void sp_node_path_edit_delete_segment (void)
void sp_node_path_edit_join (void)
void sp_node_path_edit_join_segment (void)
void sp_node_path_edit_maskpath (GtkAction *, gpointer data)
void sp_node_path_edit_nextLPEparam (GtkAction *, gpointer data)
void sp_node_path_edit_smooth (void)
void sp_node_path_edit_symmetrical (void)
void sp_node_path_edit_tocurve (void)
void sp_node_path_edit_toline (void)
static void sp_node_path_value_changed (GtkAdjustment *adj, GObject *tbl, gchar const *value_name)
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)
void sp_node_toolbox_sel_changed (Inkscape::Selection *selection, GObject *tbl)
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)
GtkWidget * sp_snap_toolbox_new ()
void sp_snap_toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop)
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_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)
void sp_text_toolbox_anchoring_toggled (GtkRadioButton *button, gpointer data)
gboolean sp_text_toolbox_entry_focus_in (GtkWidget *entry, GdkEventFocus *, GObject *tbl)
gboolean sp_text_toolbox_entry_focus_out (GtkWidget *entry, GdkEventFocus *, GObject *tbl)
void sp_text_toolbox_family_changed (GtkComboBoxEntry *, GObject *tbl)
gboolean sp_text_toolbox_family_keypress (GtkWidget *, GdkEventKey *event, GObject *tbl)
gboolean sp_text_toolbox_family_list_keypress (GtkWidget *w, GdkEventKey *event, GObject *)
void sp_text_toolbox_family_popnotify (GtkComboBox *widget, void *property, GObject *tbl)
GtkWidget * sp_text_toolbox_new (SPDesktop *desktop)
GtkWidget * sp_text_toolbox_new (SPDesktop *desktop)
void sp_text_toolbox_orientation_toggled (GtkRadioButton *button, gpointer data)
void sp_text_toolbox_selection_changed (Inkscape::Selection *, GObject *tbl)
void sp_text_toolbox_selection_modified (Inkscape::Selection *selection, guint, GObject *tbl)
void sp_text_toolbox_size_changed (GtkComboBox *cbox, GObject *tbl)
gboolean sp_text_toolbox_size_focusout (GtkWidget *, GdkEventFocus *, GObject *tbl)
gboolean sp_text_toolbox_size_keypress (GtkWidget *, GdkEventKey *event, GObject *tbl)
void sp_text_toolbox_style_toggled (GtkToggleButton *button, gpointer data)
void sp_text_toolbox_subselection_changed (gpointer, GObject *tbl)
GtkWidget * sp_tool_toolbox_new ()
 Main toolbox.
void sp_tool_toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop)
void sp_toolbox_add_label (GtkWidget *tbl, gchar const *title, bool wide)
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)
gboolean text_toolbox_completion_match_selected (GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, GObject *tbl)
static void toggle_dropper_pick_alpha (GtkToggleAction *act, gpointer tbl)
static void toggle_dropper_set_alpha (GtkToggleAction *act, gpointer tbl)
static void toggle_show_handles (GtkToggleAction *act, gpointer)
static void toggle_show_helperpath (GtkToggleAction *act, gpointer)
void toggle_snap_callback (GtkToggleAction *act, gpointer data)
static void toolbox_set_desktop (GtkWidget *toolbox, SPDesktop *desktop, SetupFunction setup_func, UpdateFunction update_func, sigc::connection *)
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)
void update_snap_toolbox (SPDesktop *desktop, SPEventContext *, GtkWidget *toolbox)
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
static gchar const *const widget_names []

Generated by  Doxygen 1.6.0   Back to index