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 "widgets/button.h"
#include "widgets/widget-sizes.h"
#include "widgets/spw-utilities.h"
#include "widgets/spinbutton-events.h"
#include "dialogs/text-edit.h"
#include "dialogs/dialog-events.h"
#include "ui/widget/style-swatch.h"
#include "prefs-utils.h"
#include "verbs.h"
#include "sp-namedview.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "xml/repr.h"
#include "xml/node-event-vector.h"
#include <glibmm/i18n.h>
#include "helper/unit-menu.h"
#include "helper/units.h"
#include "inkscape.h"
#include "conn-avoid-ref.h"
#include "select-toolbar.h"
#include "gradient-toolbar.h"
#include "connector-context.h"
#include "node-context.h"
#include "shape-editor.h"
#include "tweak-context.h"
#include "sp-rect.h"
#include "box3d.h"
#include "box3d-context.h"
#include "sp-star.h"
#include "sp-spiral.h"
#include "sp-ellipse.h"
#include "sp-text.h"
#include "sp-flowtext.h"
#include "style.h"
#include "selection.h"
#include "selection-chemistry.h"
#include "document-private.h"
#include "desktop-style.h"
#include "../libnrtype/font-lister.h"
#include "../libnrtype/font-instance.h"
#include "../connection-pool.h"
#include "../inkscape-stock.h"
#include "icon.h"
#include "graphlayout/graphlayout.h"
#include "mod360.h"
#include "toolbox.h"
#include "flood-context.h"
#include "ink-action.h"
#include "ege-adjustment-action.h"
#include "ege-output-action.h"
#include "ege-select-one-action.h"
#include "helper/unit-tracker.h"
#include "svg/css-ostringstream.h"

Go to the source code of this file.


#define MODE_LABEL_WIDTH   70


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 aux_toolbox_attached (GtkHandleBox *, GtkWidget *child)
static void aux_toolbox_detached (GtkHandleBox *, GtkWidget *child)
void aux_toolbox_space (GtkWidget *tb, gint space)
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 *name, 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 *box3d_angle, 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)
void cell_data_func (GtkTreeViewColumn *, 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, gchar const *path, gchar const *data, 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 GtkActionGroup * create_or_fetch_actions (SPDesktop *desktop)
static void delete_completion (GObject *, GtkWidget *entry)
static void delete_connection (GObject *, sigc::connection *connection)
static ShapeEditor * get_current_shape_editor ()
static void paintbucket_autogap_changed (EgeSelectOneAction *act, GObject *)
static void paintbucket_channels_changed (EgeSelectOneAction *act, GObject *)
static void paintbucket_defaults (GtkWidget *, GObject *dataKludge)
static void paintbucket_offset_changed (GtkAdjustment *adj, GObject *tbl)
static void paintbucket_threshold_changed (GtkAdjustment *adj, GObject *)
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)
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_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_ddc_angle_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_cap_rounding_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_defaults (GtkWidget *, GObject *dataKludge)
static void sp_ddc_flatness_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_mass_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_pressure_state_changed (GtkToggleAction *act, gpointer)
static void sp_ddc_tilt_state_changed (GtkToggleAction *act, GtkAction *calligraphy_angle)
static void sp_ddc_trace_background_changed (GtkToggleAction *act, gpointer)
static void sp_ddc_tremor_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_velthin_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_width_value_changed (GtkAdjustment *adj, GObject *)
static void sp_ddc_wiggle_value_changed (GtkAdjustment *adj, GObject *)
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)
void sp_node_path_edit_add (void)
void sp_node_path_edit_break (void)
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_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)
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_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, gchar 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)
GtkWidget * sp_tb_spinbutton (gchar *label, gchar const *tooltip, gchar const *path, gchar const *data, gdouble def, GtkWidget *us, GtkWidget *tbl, gboolean altx, gchar const *altx_mark, gdouble lower, gdouble upper, gdouble step, gdouble page, void(*callback)(GtkAdjustment *, GtkWidget *), gdouble climb=0.1, guint digits=3, double factor=1.0)
void sp_text_toolbox_anchoring_toggled (GtkRadioButton *button, gpointer data)
gboolean sp_text_toolbox_entry_focus_in (GtkWidget *entry, GdkEventFocus *, GObject *)
void sp_text_toolbox_family_changed (GtkTreeSelection *selection, GObject *tbl)
void sp_text_toolbox_family_entry_activate (GtkEntry *entry, 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 *)
GtkWidget * sp_text_toolbox_new (SPDesktop *desktop)
GtkWidget * sp_text_toolbox_new (SPDesktop *desktop)
void sp_text_toolbox_orientation_toggled (GtkRadioButton *button, gpointer data)
gboolean sp_text_toolbox_popdown_focus_in (GtkWidget *popdown, GdkEventFocus *, GObject *)
gboolean sp_text_toolbox_popdown_focus_out (GtkWidget *popdown, GdkEventFocus *, GObject *)
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 *event, 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)
void sp_text_toolbox_text_popdown_clicked (GtkButton *, 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 (GtkWidget *t, Inkscape::IconSize size, SPButtonType type, Inkscape::Verb *verb, Inkscape::UI::View::View *view, GtkTooltips *tt)
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)
GtkWidget * sp_toolbox_button_normal_new_from_verb (GtkWidget *t, Inkscape::IconSize size, Inkscape::Verb *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_show_handles (GtkToggleAction *act, gpointer)
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_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 []
bool popdown_hasfocus = false
bool popdown_visible = false
struct {
   gchar const *   data_name
   sp_verb_t   doubleclick_verb
   gchar const *   type_name
   sp_verb_t   verb
tools []
static gchar const * ui_descr

Generated by  Doxygen 1.6.0   Back to index