~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

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

  • Committer: Steren Giannini
  • Date: 2010-05-29 15:00:23 UTC
  • mfrom: (9012.1.442 trunk)
  • Revision ID: steren.giannini@gmail.com-20100529150023-mi9r10jkhtfs7yyj
sync with rev 9454

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include "svg/stringstream.h"
14
14
#include <gtkmm.h>
15
15
 
16
 
// needed for on-canvas editting:
17
 
class SPDesktop;
 
16
#include "ui/widget/registered-widget.h"
 
17
#include "live_effects/effect.h"
 
18
#include "desktop.h"
18
19
 
19
20
namespace Inkscape {
20
21
 
82
83
Gtk::Widget *
83
84
VectorParam::param_newWidget(Gtk::Tooltips * /*tooltips*/)
84
85
{
85
 
/*
86
 
    Inkscape::UI::Widget::RegisteredTransformedPoint * pointwdg = Gtk::manage(
87
 
        new Inkscape::UI::Widget::RegisteredTransformedPoint( param_label,
88
 
                                                              param_tooltip,
89
 
                                                              param_key,
90
 
                                                              *param_wr,
91
 
                                                              param_effect->getRepr(),
92
 
                                                              param_effect->getSPDoc() ) );
93
 
    // TODO: fix to get correct desktop (don't use SP_ACTIVE_DESKTOP)
94
 
    SPDesktop *desktop = SP_ACTIVE_DESKTOP;
95
 
    Geom::Matrix transf = desktop->doc2dt();
96
 
    pointwdg->setTransform(transf);
97
 
    pointwdg->setValue( *this );
 
86
    Inkscape::UI::Widget::RegisteredVector * pointwdg = Gtk::manage(
 
87
        new Inkscape::UI::Widget::RegisteredVector( param_label,
 
88
                                                    param_tooltip,
 
89
                                                    param_key,
 
90
                                                    *param_wr,
 
91
                                                    param_effect->getRepr(),
 
92
                                                    param_effect->getSPDoc() ) );
 
93
    pointwdg->setPolarCoords();
 
94
    pointwdg->setValue( vector, origin );
98
95
    pointwdg->clearProgrammatically();
99
 
    pointwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change point parameter"));
 
96
    pointwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change vector parameter"));
100
97
 
101
98
    Gtk::HBox * hbox = Gtk::manage( new Gtk::HBox() );
102
99
    static_cast<Gtk::HBox*>(hbox)->pack_start(*pointwdg, true, true);
103
100
    static_cast<Gtk::HBox*>(hbox)->show_all_children();
104
101
 
105
102
    return dynamic_cast<Gtk::Widget *> (hbox);
106
 
    */ return NULL;
107
103
}
108
104
 
109
105
void