text-toolbar.cpp revision effb34c3ff27490bf38020db63e6b4736c8e97b7
/**
* @file
* Text aux toolbar
*/
/* Authors:
* MenTaLguY <mental@rydia.net>
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
* Frank Felfe <innerspace@iname.com>
* John Cliff <simarilius@yahoo.com>
* David Turner <novalis@gnu.org>
* Josh Andler <scislac@scislac.com>
* Jon A. Cruz <jon@joncruz.org>
* Maximilian Albert <maximilian.albert@gmail.com>
* Tavmjong Bah <tavmjong@free.fr>
* Abhishek Sharma
* Kris De Gussem <Kris.DeGussem@gmail.com>
*
* Copyright (C) 2004 David Turner
* Copyright (C) 2003 MenTaLguY
* Copyright (C) 1999-2011 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "text-toolbar.h"
#include "../desktop.h"
#include "../desktop-handles.h"
#include "../desktop-style.h"
#include "document-undo.h"
#include "../verbs.h"
#include "../inkscape.h"
#include "../connection-pool.h"
#include "../selection-chemistry.h"
#include "../selection.h"
#include "../ege-adjustment-action.h"
#include "../ege-output-action.h"
#include "../ege-select-one-action.h"
#include "../ink-action.h"
#include "../ink-comboboxentry-action.h"
#include "../widgets/spinbutton-events.h"
#include "../widgets/spw-utilities.h"
#include "../widgets/widget-sizes.h"
#include "../xml/node-event-vector.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
#include "../helper/unit-menu.h"
#include "../helper/unit-tracker.h"
#include "../pen-context.h"
#include "../sp-namedview.h"
#include "../svg/css-ostringstream.h"
#include "../sp-flowtext.h"
#include "../sp-text.h"
#include "../style.h"
#include "../libnrtype/font-lister.h"
#include "../libnrtype/font-instance.h"
#include "../text-context.h"
#include "../text-editing.h"
#include "widgets/font-selector.h"
using Inkscape::UnitTracker;
using Inkscape::DocumentUndo;
//#define DEBUG_TEXT
//########################
//## Text Toolbox ##
//########################
// Functions for debugging:
#ifdef DEBUG_TEXT
<< " Style set? " << style_set
<< " FontSpec set? " << fontspec_set
<< " FontSpec: "
}
"NORMAL", "BOLD", "LIGHTER", "BOLDER", "Out of range"};
// Missing book = 380
}
}
#endif
// Format family drop-down menu.
gpointer /*data*/)
{
if (show_sample) {
} else {
}
// This doesn't work for two reasons... it set both selected and not selected backgrounds
// to white.. which means that white foreground text is invisible. It also only effects
// the text region, leaving the padding untouched.
// g_object_set (G_OBJECT (cell), "cell-background", "white", "cell-background-set", true, NULL);
}
/*
* Fill the font style combobox with the available font styles for the selected font family
* Set the selected style to that in font
*/
{
Ink_ComboBoxEntry_Action* act = INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontFamilyAction" ) );
// Get an iter to the selected font from the model data
// We cant get it from the combo, cause it might not have been created yet
while ( valid ) {
// Get text from list entry
// Check for match
found = true;
break;
}
}
if (!found) {
return;
}
// Get the list of styles from the selected font
Ink_ComboBoxEntry_Action* fontStyleAction = INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontStyleAction" ) );
// Add list of styles to the style combo
{
}
// Select the style in the combo that best matches font
if (font) {
} else if (current_style) {
}
}
// Font family
//
// In most cases we should just be able to set the new family name
// but there may be cases where a font family doesn't follow the
// standard naming pattern. To handle those cases, we do a song and
// dance to use Pango to find the best match. To do that we start
// with the old "fontSpec" (which is the returned string from
// pango_font_description_to_string() with the size unset). This
// has the form "[family-list] [style-options]" where the
// family-list is a comma separated list of font-family names
// (optionally terminated by a comma). An example would be
// "DejaVu Sans, Sans Bold". Only a "fontSpec" containing a
// single font-family will work with Pango's best match routine.
// If we can't obtain a good "fontSpec", we then resort to blindly
// changing the font-family.
{
#ifdef DEBUG_TEXT
#endif
// quit if run by the _changed callbacks
return;
}
#ifdef DEBUG_TEXT
#endif
// First try to get the old font spec from the stored value
int result_fontspec = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION);
Glib::ustring fontSpec = query->text->font_specification.set ? query->text->font_specification.value : "";
#ifdef DEBUG_TEXT
#endif
// If that didn't work, try to get font spec from style
// Must query all to fill font-family, font-style, font-weight, font-specification
// Construct a new font specification if it does not yet exist
if( fontFromStyle ) {
fontFromStyle->Unref();
}
#ifdef DEBUG_TEXT
sp_print_font( query );
#endif
}
// And if that didn't work use default. DO WE REALLY WANT TO DO THIS?
// Construct a new font specification if it does not yet exist
if ( fontFromStyle ) {
fontFromStyle->Unref();
}
#ifdef DEBUG_TEXT
sp_print_font( query );
#endif
}
// Now we have a font specification, replace family.
if (!fontSpec.empty()) newFontSpec = font_factory::Default()->ReplaceFontSpecificationFamily(fontSpec, family);
#ifdef DEBUG_TEXT
std::cout << " New FontSpec from ReplaceFontSpecificationFamily :" << newFontSpec << ":" << std::endl;
#endif
if (fontSpec != newFontSpec) {
if (font) {
// Set all the these just in case they were altered when finding the best
// match for the new family and old style... Unnecessary?
gchar c[256];
// Set the list of font styles
} else {
}
}
} else {
// Either old font does not exist on system or ReplaceFontSpecificationFamily() failed.
// Blindly fall back to setting the family to text in the font-family chooser.
#ifdef DEBUG_TEXT
#endif
}
// If querying returned nothing, update default style.
if (result_fontspec == QUERY_STYLE_NOTHING)
{
//sp_text_edit_dialog_default_set_insensitive (); //FIXME: Replace through a verb
}
else
{
}
// Save for undo
if (result_fontspec != QUERY_STYLE_NOTHING) {
_("Text: Change font family"));
}
// unfreeze
// focus to canvas (not useful if you want to choose font for your text)
//gtk_widget_grab_focus (GTK_WIDGET((SP_ACTIVE_DESKTOP)->canvas));
#ifdef DEBUG_TEXT
#endif
}
// Font size
{
// quit if run by the _changed callbacks
return;
}
return;
}
int max_size = prefs->getInt("/dialogs/textandfont/maxFontSize", 10000); // somewhat arbitrary, but text&font preview freezes with too huge fontsizes
// Set css font size.
} else {
}
// Apply font size to selected objects.
// If no selected objects, set default.
int result_numbers =
if (result_numbers == QUERY_STYLE_NOTHING)
{
} else {
// Save for undo
_("Text: Change font size"));
}
}
/*
* Font style
*/
//static void sp_text_fontstyle_value_changed( EgeSelectOneAction *act, GObject *tbl )
{
// quit if run by the _changed callbacks
return;
}
// First query font-specification, this is the most complete font face description.
int result_fontspec = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION);
// font_specification will not be set unless defined explicitily on a tspan.
// This should be fixed!
Glib::ustring fontSpec = query->text->font_specification.set ? query->text->font_specification.value : "";
// Construct a new font specification if it does not yet exist
// Must query font-family, font-style, font-weight, to find correct font face.
if ( fontFromStyle ) {
fontFromStyle->Unref();
}
}
} else {
// if the font_family is not set, get it from the font family combo instead
Ink_ComboBoxEntry_Action* act = INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontFamilyAction" ) );
}
font_instance *font = (font_factory::Default())->FaceFromUIStrings (fontFamily.c_str(), current_style);
if (font) {
gchar c[256];
}
// If querying returned nothing, update default style.
if (result_fontspec == QUERY_STYLE_NOTHING)
{
}
// Do we need to update other CSS values?
if (result_fontspec != QUERY_STYLE_NOTHING) {
_("Text: Change font style"));
}
}
// Handles both Superscripts and Subscripts
{
// quit if run by the _changed callbacks
return;
}
// Called by Superscript or Subscript button?
#ifdef DEBUG_TEXT
#endif
// Query baseline
int result_baseline = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_BASELINES);
bool setSuper = false;
bool setSub = false;
// If not set or mixed, turn on superscript or subscript
if( prop == 0 ) {
setSuper = true;
} else {
setSub = true;
}
} else {
// Superscript
// Subscript
}
// Set css properties
// Openoffice 2.3 and Adobe use 58%, Microsoft Word 2002 uses 65%, LaTex about 70%.
// 58% looks too small to me, especially if a superscript is placed on a superscript.
// If you make a change here, consider making a change to baseline-shift amount
// in style.cpp.
} else {
}
if( setSuper ) {
} else if( setSub ) {
} else {
}
// Apply css to selected objects.
// Save for undo
if(result_baseline != QUERY_STYLE_NOTHING) {
_("Text: Change superscript or subscript"));
}
}
{
// quit if run by the _changed callbacks
return;
}
// move the x of all texts to preserve the same bbox
// below, variable names suggest horizontal move, but we check the writing direction
// and move in the corresponding axis
} else {
}
if (!bbox)
continue;
// If you want to align within some frame, other than the text's own bbox, calculate
// the left and right (or top and bottom for tb text) slacks of the text inside that
// frame (currently unused)
double left_slack = 0;
double right_slack = 0;
double move = 0;
switch (mode) {
case 0:
move = -left_slack;
break;
case 1:
break;
case 2:
break;
}
} else if (old_align == SP_CSS_TEXT_ALIGN_CENTER) {
switch (mode) {
case 0:
break;
case 1:
break;
case 2:
break;
}
switch (mode) {
case 0:
break;
case 1:
break;
case 2:
move = right_slack;
break;
}
}
} else {
}
item->updateRepr();
}
}
switch (mode)
{
case 0:
{
break;
}
case 1:
{
break;
}
case 2:
{
break;
}
case 3:
{
break;
}
}
int result_numbers =
// If querying returned nothing, update default style.
if (result_numbers == QUERY_STYLE_NOTHING)
{
}
if (result_numbers != QUERY_STYLE_NOTHING)
{
_("Text: Change alignment"));
}
}
{
// quit if run by the _changed callbacks
return;
}
// At the moment this handles only numerical values (i.e. no percent).
// Set css line height.
// Apply line-height to selected objects.
// Until deprecated sodipodi:linespacing purged:
bool modmade = false;
SP_OBJECT(items->data)->getRepr()->setAttribute("sodipodi:linespacing", sp_repr_css_property (css, "line-height", NULL));
modmade = true;
}
}
// Save for undo
if(modmade) {
_("Text: Change line-height"));
}
// If no selected objects, set default.
int result_numbers =
if (result_numbers == QUERY_STYLE_NOTHING)
{
}
}
{
// quit if run by the _changed callbacks
return;
}
// At the moment this handles only numerical values (i.e. no em unit).
// Set css word-spacing
// Apply word-spacing to selected objects.
// If no selected objects, set default.
int result_numbers =
if (result_numbers == QUERY_STYLE_NOTHING)
{
} else {
// Save for undo
_("Text: Change word-spacing"));
}
}
{
// quit if run by the _changed callbacks
return;
}
// At the moment this handles only numerical values (i.e. no em unit).
// Set css letter-spacing
// Apply letter-spacing to selected objects.
// If no selected objects, set default.
int result_numbers =
if (result_numbers == QUERY_STYLE_NOTHING)
{
}
else
{
// Save for undo
_("Text: Change letter-spacing"));
}
}
{
// quit if run by the _changed callbacks
return;
}
bool modmade = false;
if( tc ) {
unsigned char_index = -1;
text_tag_attributes_at_position( tc->text, std::min(tc->text_sel_start, tc->text_sel_end), &char_index );
if( attributes ) {
modmade = true;
}
}
}
if(modmade) {
// Save for undo
_("Text: Change dx (kern)"));
}
}
{
// quit if run by the _changed callbacks
return;
}
bool modmade = false;
if( tc ) {
unsigned char_index = -1;
text_tag_attributes_at_position( tc->text, std::min(tc->text_sel_start, tc->text_sel_end), &char_index );
if( attributes ) {
modmade = true;
}
}
}
if(modmade) {
// Save for undo
_("Text: Change dy"));
}
}
{
// quit if run by the _changed callbacks
return;
}
bool modmade = false;
if( tc ) {
unsigned char_index = -1;
text_tag_attributes_at_position( tc->text, std::min(tc->text_sel_start, tc->text_sel_end), &char_index );
if( attributes ) {
sp_te_adjust_rotation( tc->text, tc->text_sel_start, tc->text_sel_end, SP_ACTIVE_DESKTOP, delta_deg );
modmade = true;
}
}
}
// Save for undo
if(modmade) {
_("Text: Change rotate"));
}
}
{
// quit if run by the _changed callbacks
return;
}
switch (mode)
{
case 0:
{
break;
}
case 1:
{
break;
}
}
int result_numbers =
// If querying returned nothing, update default style.
if (result_numbers == QUERY_STYLE_NOTHING)
{
}
{
_("Text: Change orientation"));
}
}
/*
* Set the default list of font sizes, scaled to the users preferred unit
*/
{
// List of font sizes for drop-down menu
int sizes[] = {
4, 6, 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 28,
32, 36, 40, 48, 56, 64, 72, 144
};
// Array must be same length as SPCSSUnit in style.h
for( unsigned int i = 0; i < G_N_ELEMENTS(sizes); ++i ) {
}
}
/*
* This function sets up the text-tool tool-controls, setting the entry boxes
* etc. to the values from the current selection or the default if no selection.
* It is called whenever a text selection is changed, including stepping cursor
* through text, or setting focus to text.
*/
{
#ifdef DEBUG_TEXT
static int count = 0;
++count;
{
}
#endif
// quit if run by the _changed callbacks
#ifdef DEBUG_TEXT
#endif
return;
}
// Only flowed text can be justified, only normal text can be kerned...
// Find out if we have flowed text now so we can use it several places
// const gchar* id = reinterpret_cast<SPItem *>(items->data)->getId();
// std::cout << " " << id << std::endl;
isFlow = true;
// std::cout << " Found flowed text" << std::endl;
break;
}
}
/*
* Query from current selection:
* Font family (font-family)
* Style (font-weight, font-style, font-stretch, font-variant, font-align)
* Numbers (font-size, letter-spacing, word-spacing, line-height, text-anchor, writing-mode)
* Font specification (Inkscape private attribute)
*/
int result_family = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTFAMILY);
int result_style = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTSTYLE);
int result_numbers = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTNUMBERS);
int result_baseline = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_BASELINES);
/*
* If no text in selection (querying returned nothing), read the style from
* tool bar already set to these preferences.
*/
if (result_family == QUERY_STYLE_NOTHING || result_style == QUERY_STYLE_NOTHING || result_numbers == QUERY_STYLE_NOTHING) {
// There are no texts in selection, read from preferences.
#ifdef DEBUG_TEXT
sp_print_font( query );
#endif
// Do not reset the toolbar style from prefs if we already did it last time
#ifdef DEBUG_TEXT
#endif
return;
}
} else {
}
// If we have valid query data for text (font-family, font-specification) set toolbar accordingly.
{
// Font family
}
// Size (average of text selected)
//gchar size_text[G_ASCII_DTOSTR_BUF_SIZE];
//g_ascii_dtostr (size_text, sizeof (size_text), size);
Glib::ustring tooltip = Glib::ustring::format(_("Font size"), " (", sp_style_get_css_unit_string(unit), ")");
// Font styles
// Superscript
InkToggleAction* textSuperscriptAction = INK_TOGGLE_ACTION( g_object_get_data( tbl, "TextSuperscriptAction" ) );
// Subscript
InkToggleAction* textSubscriptAction = INK_TOGGLE_ACTION( g_object_get_data( tbl, "TextSubscriptAction" ) );
// Alignment
EgeSelectOneAction* textAlignAction = EGE_SELECT_ONE_ACTION( g_object_get_data( tbl, "TextAlignAction" ) );
// Note: SVG 1.1 doesn't include text-align, SVG 1.2 Tiny doesn't include text-align="justify"
// text-align="justify" was a draft SVG 1.2 item (along with flowed text).
// Only flowed text can be left and right justified at the same time.
// Disable button if we don't have flowed text.
// The GtkTreeModel class doesn't have a set function so we can't
// simply add an ege_select_one_action_set_sensitive method!
// We must set values directly with the GtkListStore and then
// ask that the GtkAction update the sensitive parameters.
// ege_select_one_action_set_sensitive( textAlignAction, 3, isFlow );
int activeButton = 0;
{
activeButton = 3;
} else {
}
// Line height (spacing)
double height;
} else {
} else {
}
}
// Word spacing
double wordSpacing;
// Letter spacing
double letterSpacing;
else letterSpacing = query->letter_spacing.computed; // Assume no units (change in desktop-style.cpp)
// Orientation
} // if( query->text )
#ifdef DEBUG_TEXT
#endif
// Kerning (xshift), yshift, rotation. NB: These are not CSS attributes.
if( tc ) {
unsigned char_index = -1;
text_tag_attributes_at_position( tc->text, std::min(tc->text_sel_start, tc->text_sel_end), &char_index );
if( attributes ) {
// Dx
// Dy
// Rotation
/* SVG value is between 0 and 360 but we're using -180 to 180 in widget */
#ifdef DEBUG_TEXT
#endif
}
}
}
{
}
#ifdef DEBUG_TEXT
#endif
}
static void sp_text_toolbox_selection_modified(Inkscape::Selection *selection, guint /*flags*/, GObject *tbl)
{
}
static void
{
}
// Define all the "widgets" in the toolbar.
{
// Is this used?
/* Font family */
{
// Font list
_("Font Family"),
_("Select Font Family (Alt-X to access)"),
NULL,
-1, // Entry width
50, // Extra list width
// Change style of drop-down from menu to list
"style \"dropdown-as-list-style\"\n"
"{\n"
" GtkComboBox::appears-as-list = 1\n"
"}\n"
"widget \"*.TextFontFamilyAction_combobox\" style \"dropdown-as-list-style\"");
}
/* Font size */
{
// List of font sizes for drop-down menu
Glib::ustring tooltip = Glib::ustring::format(_("Font size"), " (", sp_style_get_css_unit_string(unit), ")");
_("Font Size"),
NULL,
4, // Width in characters
0, // Extra list width
NULL, // Cell layout
}
/* Font styles */
{
_("Font Style"),
_("Font style"),
NULL,
12, // Width in characters
0, // Extra list width
NULL, // Cell layout
}
/* Style - Superscript */
{
_("Toggle Superscript"), // Label
_("Toggle superscript"), // Tooltip
"text_superscript", // Icon (inkId)
secondarySize ); // Icon size
}
/* Style - Subscript */
{
_("Toggle Subscript"), // Label
_("Toggle subscript"), // Tooltip
"text_subscript", // Icon (inkId)
secondarySize ); // Icon size
}
/* Alignment */
{
GtkListStore* model = gtk_list_store_new( 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN );
0, _("Align left"),
1, _("Align left"),
3, true,
-1 );
0, _("Align center"),
1, _("Align center"),
3, true,
-1 );
0, _("Align right"),
1, _("Align right"),
3, true,
-1 );
0, _("Justify"),
1, _("Justify (only flowed text)"),
3, false,
-1 );
_("Alignment"), // Label
_("Text alignment"), // Tooltip
NULL, // StockID
}
/* Orientation (Left to Right, Top to Bottom */
{
0, _("Horizontal"),
1, _("Horizontal text"),
-1 );
0, _("Vertical"),
1, _("Vertical text"),
-1 );
_("Orientation"), // Label
_("Text orientation"), // Tooltip
NULL, // StockID
g_signal_connect_after( G_OBJECT(act), "changed", G_CALLBACK(sp_text_orientation_mode_changed), holder );
}
/* Line height */
{
// Drop down menu
gchar const* labels[] = {_("Smaller spacing"), 0, 0, 0, 0, C_("Text tool", "Normal"), 0, 0, 0, 0, 0, _("Larger spacing")};
"TextLineHeightAction", /* name */
_("Line Height"), /* label */
_("Line:"), /* short label */
_("Spacing between lines (times font size)"), /* tooltip */
"/tools/text/lineheight", /* preferences path */
0.0, /* default */
NULL, /* unit selector */
holder, /* dataKludge */
FALSE, /* set alt-x keyboard shortcut? */
NULL, /* altx_mark */
sp_text_lineheight_value_changed, /* callback */
0.1, /* step (used?) */
2, /* digits to show */
1.0 /* factor (multiplies default) */
);
}
/* Word spacing */
{
// Drop down menu
gchar const* labels[] = {_("Negative spacing"), 0, 0, 0, C_("Text tool", "Normal"), 0, 0, 0, 0, 0, 0, 0, _("Positive spacing")};
"TextWordSpacingAction", /* name */
_("Word spacing"), /* label */
_("Word:"), /* short label */
_("Spacing between words (px)"), /* tooltip */
"/tools/text/wordspacing", /* preferences path */
0.0, /* default */
NULL, /* unit selector */
holder, /* dataKludge */
FALSE, /* set alt-x keyboard shortcut? */
NULL, /* altx_mark */
sp_text_wordspacing_value_changed, /* callback */
0.1, /* step (used?) */
2, /* digits to show */
1.0 /* factor (multiplies default) */
);
}
/* Letter spacing */
{
// Drop down menu
gchar const* labels[] = {_("Negative spacing"), 0, 0, 0, C_("Text tool", "Normal"), 0, 0, 0, 0, 0, 0, 0, _("Positive spacing")};
"TextLetterSpacingAction", /* name */
_("Letter spacing"), /* label */
_("Letter:"), /* short label */
_("Spacing between letters (px)"), /* tooltip */
"/tools/text/letterspacing", /* preferences path */
0.0, /* default */
NULL, /* unit selector */
holder, /* dataKludge */
FALSE, /* set alt-x keyboard shortcut? */
NULL, /* altx_mark */
sp_text_letterspacing_value_changed, /* callback */
0.1, /* step (used?) */
2, /* digits to show */
1.0 /* factor (multiplies default) */
);
}
/* Character kerning (horizontal shift) */
{
// Drop down menu
"TextDxAction", /* name */
_("Kerning"), /* label */
_("Kern:"), /* short label */
_("Horizontal kerning (px)"), /* tooltip */
0.0, /* default */
NULL, /* unit selector */
holder, /* dataKludge */
FALSE, /* set alt-x keyboard shortcut? */
NULL, /* altx_mark */
sp_text_dx_value_changed, /* callback */
0.1, /* step (used?) */
2, /* digits to show */
1.0 /* factor (multiplies default) */
);
}
/* Character vertical shift */
{
// Drop down menu
"TextDyAction", /* name */
_("Vertical Shift"), /* label */
_("Vert:"), /* short label */
_("Vertical shift (px)"), /* tooltip */
0.0, /* default */
NULL, /* unit selector */
holder, /* dataKludge */
FALSE, /* set alt-x keyboard shortcut? */
NULL, /* altx_mark */
sp_text_dy_value_changed, /* callback */
0.1, /* step (used?) */
2, /* digits to show */
1.0 /* factor (multiplies default) */
);
}
/* Character rotation */
{
// Drop down menu
"TextRotationAction", /* name */
_("Letter rotation"), /* label */
_("Rot:"), /* short label */
_("Character rotation (degrees)"),/* tooltip */
0.0, /* default */
NULL, /* unit selector */
holder, /* dataKludge */
FALSE, /* set alt-x keyboard shortcut? */
NULL, /* altx_mark */
sp_text_rotation_value_changed, /* callback */
0.1, /* step (used?) */
2, /* digits to show */
1.0 /* factor (multiplies default) */
);
}
// Is this necessary to call? Shouldn't hurt.
// Watch selection
Inkscape::ConnectionPool* pool = Inkscape::ConnectionPool::new_connection_pool ("ISTextToolboxGTK");
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :