~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/live_effects/parameter/parameter.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#include "live_effects/effect.h"
11
11
#include "svg/svg.h"
12
12
#include "libnr/nr-values.h"
13
 
 
 
13
#include "xml/repr.h"
14
14
#include <gtkmm.h>
15
 
#include "ui/widget/scalar.h"
 
15
#include "ui/widget/registered-widget.h"
16
16
 
17
17
#include "svg/stringstream.h"
18
18
 
28
28
Parameter::Parameter( const Glib::ustring& label, const Glib::ustring& tip,
29
29
                      const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr,
30
30
                      Effect* effect )
31
 
    : oncanvas_editable(false)
 
31
    : param_key(key),
 
32
      param_wr(wr),
 
33
      param_label(label),
 
34
      oncanvas_editable(false),
 
35
      param_tooltip(tip),
 
36
      param_effect(effect)
32
37
{
33
 
    param_label = label;
34
 
    param_tooltip = tip;
35
 
    param_key = key;
36
 
    param_wr = wr;
37
 
    param_effect = effect;
38
38
}
39
39
 
40
40
 
50
50
ScalarParam::ScalarParam( const Glib::ustring& label, const Glib::ustring& tip,
51
51
                      const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr,
52
52
                      Effect* effect, gdouble default_value)
53
 
    : Parameter(label, tip, key, wr, effect)
 
53
    : Parameter(label, tip, key, wr, effect),
 
54
      value(default_value),
 
55
      min(-NR_HUGE),
 
56
      max(NR_HUGE),
 
57
      integer(false),
 
58
      defvalue(default_value),
 
59
      digits(2),
 
60
      inc_step(0.1),
 
61
      inc_page(1)
54
62
{
55
 
    defvalue = default_value;
56
 
    value = defvalue;
57
 
    min = -NR_HUGE;
58
 
    max = NR_HUGE;
59
 
    integer = false;
60
 
    inc_step = 0.1;
61
 
    inc_page = 1;
62
 
    digits = 2;
63
63
}
64
64
 
65
65
ScalarParam::~ScalarParam()
79
79
}
80
80
 
81
81
gchar *
82
 
ScalarParam::param_writeSVGValue() const
 
82
ScalarParam::param_getSVGValue() const
83
83
{
84
84
    Inkscape::SVGOStringStream os;
85
85
    os << value;
124
124
}
125
125
 
126
126
Gtk::Widget *
127
 
ScalarParam::param_newWidget(Gtk::Tooltips * tooltips)
 
127
ScalarParam::param_newWidget(Gtk::Tooltips * /*tooltips*/)
128
128
{
129
129
    Inkscape::UI::Widget::RegisteredScalar *rsu = Gtk::manage( new Inkscape::UI::Widget::RegisteredScalar(
130
130
        param_label, param_tooltip, param_key, *param_wr, param_effect->getRepr(), param_effect->getSPDoc() ) );