~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/ui/dialog/livepatheffect-editor.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 * @brief Live Path Effect editing dialog
 
3
 */
 
4
/* Author:
 
5
 *   Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
 
6
 *
 
7
 * Copyright (C) 2007 Author
 
8
 * Released under GNU GPL.  Read the file 'COPYING' for more information.
 
9
 */
 
10
 
 
11
#ifndef INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
 
12
#define INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
 
13
 
 
14
#include "ui/widget/panel.h"
 
15
#include "ui/widget/button.h"
 
16
 
 
17
#include <gtkmm/label.h>
 
18
#include <gtkmm/comboboxtext.h>
 
19
#include <gtkmm/frame.h>
 
20
#include <gtkmm/tooltips.h>
 
21
#include "ui/widget/combo-enums.h"
 
22
#include "live_effects/effect-enum.h"
 
23
#include <gtkmm/liststore.h>
 
24
#include <gtkmm/treeview.h>
 
25
#include <gtkmm/scrolledwindow.h>
 
26
#include <gtkmm/buttonbox.h>
 
27
#include <gtkmm/toolbar.h>
 
28
 
 
29
 
 
30
class SPDesktop;
 
31
class SPLPEItem;
 
32
 
 
33
namespace Inkscape {
 
34
 
 
35
namespace LivePathEffect {
 
36
    class Effect;
 
37
    class LPEObjectReference;
 
38
}
 
39
 
 
40
namespace UI {
 
41
namespace Dialog {
 
42
 
 
43
class LivePathEffectEditor : public UI::Widget::Panel {
 
44
public:
 
45
    LivePathEffectEditor();
 
46
    virtual ~LivePathEffectEditor();
 
47
 
 
48
    static LivePathEffectEditor &getInstance() { return *new LivePathEffectEditor(); }
 
49
 
 
50
    void onSelectionChanged(Inkscape::Selection *sel);
 
51
    virtual void on_effect_selection_changed();
 
52
    void setDesktop(SPDesktop *desktop);
 
53
 
 
54
private:
 
55
    sigc::connection selection_changed_connection;
 
56
    sigc::connection selection_modified_connection;
 
57
 
 
58
    void set_sensitize_all(bool sensitive);
 
59
 
 
60
    void showParams(LivePathEffect::Effect& effect);
 
61
    void showText(Glib::ustring const &str);
 
62
    void selectInList(LivePathEffect::Effect* effect);
 
63
 
 
64
   // void add_entry(const char* name );
 
65
    void effect_list_reload(SPLPEItem *lpeitem);
 
66
 
 
67
    // callback methods for buttons on grids page.
 
68
    void onApply();
 
69
    void onRemove();
 
70
 
 
71
    void onUp();
 
72
    void onDown();
 
73
 
 
74
    class ModelColumns : public Gtk::TreeModel::ColumnRecord
 
75
    {
 
76
      public:
 
77
        ModelColumns()
 
78
        {
 
79
            add(col_name);
 
80
            add(lperef);
 
81
            add(col_visible);
 
82
        }
 
83
        virtual ~ModelColumns() {}
 
84
 
 
85
        Gtk::TreeModelColumn<Glib::ustring> col_name;
 
86
        Gtk::TreeModelColumn<LivePathEffect::LPEObjectReference *> lperef;
 
87
        Gtk::TreeModelColumn<bool> col_visible;
 
88
    };
 
89
 
 
90
    bool lpe_list_locked;
 
91
 
 
92
    Inkscape::UI::Widget::ComboBoxEnum<LivePathEffect::EffectType> combo_effecttype;
 
93
    
 
94
    Gtk::Widget * effectwidget;
 
95
    Gtk::Label explain_label;
 
96
    Gtk::Frame effectapplication_frame;
 
97
    Gtk::Frame effectcontrol_frame;
 
98
    Gtk::Frame effectlist_frame;
 
99
    Gtk::HBox effectapplication_hbox;
 
100
    Gtk::VBox effectcontrol_vbox;
 
101
    Gtk::VBox effectlist_vbox;
 
102
    Gtk::Tooltips tooltips;
 
103
    ModelColumns columns;
 
104
    Gtk::ScrolledWindow scrolled_window;
 
105
    Gtk::TreeView effectlist_view;
 
106
    Glib::RefPtr<Gtk::ListStore> effectlist_store;
 
107
    Glib::RefPtr<Gtk::TreeSelection> effectlist_selection;
 
108
 
 
109
    void on_visibility_toggled( Glib::ustring const& str );
 
110
 
 
111
    Gtk::Toolbar toolbar;
 
112
    Gtk::ToolButton button_up;
 
113
    Gtk::ToolButton button_down;
 
114
    Gtk::Button button_apply;
 
115
    Gtk::ToolButton button_remove;
 
116
    /*Gtk::HButtonBox button_hbox;
 
117
    Gtk::Button button_up;
 
118
    Gtk::Button button_down;
 
119
    Gtk::Button button_apply;
 
120
    Gtk::Button button_remove;*/
 
121
 
 
122
    SPDesktop * current_desktop;
 
123
    
 
124
    SPLPEItem * current_lpeitem;
 
125
 
 
126
    LivePathEffectEditor(LivePathEffectEditor const &d);
 
127
    LivePathEffectEditor& operator=(LivePathEffectEditor const &d);
 
128
};
 
129
 
 
130
} // namespace Dialog
 
131
} // namespace UI
 
132
} // namespace Inkscape
 
133
 
 
134
#endif // INKSCAPE_UI_DIALOG_LIVE_PATH_EFFECT_H
 
135
 
 
136
/*
 
137
  Local Variables:
 
138
  mode:c++
 
139
  c-file-style:"stroustrup"
 
140
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
141
  indent-tabs-mode:nil
 
142
  fill-column:99
 
143
  End:
 
144
*/
 
145
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :