Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
satellitearray.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Inkscape::LivePathEffectParameters
4 *
5 * Copyright (C) Theodore Janeczko 2012 <flutterguy317@gmail.com>
6 *
7 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
8 */
9
10#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_SATELLITEARRAY_H
11#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_SATELLITEARRAY_H
12
13#include <memory>
14#include <vector>
15#include <glibmm/refptr.h>
16#include <glibmm/ustring.h>
17#include <gtkmm/treemodel.h>
18
19#include <sigc++/scoped_connection.h>
24
25namespace Gtk {
26class TreeStore;
27class TreeView;
28class ScrolledWindow;
29} // namespace Gtk
30
31class SPObject;
32
34
35class SatelliteReference;
36
37class SatelliteArrayParam : public ArrayParam<std::shared_ptr<SatelliteReference>>
38{
39public:
40 class ModelColumns;
41
42 SatelliteArrayParam(const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key,
44 ~SatelliteArrayParam() override;
45
48
49 Gtk::Widget *param_newWidget() override;
50 bool param_readSVGValue(char const * strvalue) override;
51 void link(SPObject *to, size_t pos = Glib::ustring::npos);
52 void unlink(std::shared_ptr<SatelliteReference> const &to);
53 void unlink(SPObject *to);
54 bool is_connected(){ return linked_connections.size() != 0; };
55 void clear();
56 void start_listening();
57 void quit_listening();
58 ParamType paramType() const override { return ParamType::SATELLITE_ARRAY; };
59
60private:
61 void linked_modified(SPObject *linked_obj, guint flags);
62 bool _selectIndex(const Gtk::TreeModel::iterator &iter, int *i);
63 void updatesignal();
64
65 std::unique_ptr<ModelColumns> _model;
66 Glib::RefPtr<Gtk::TreeStore> _store;
67 std::unique_ptr<Gtk::TreeView> _tree;
68 std::unique_ptr<Gtk::ScrolledWindow> _scroller;
69
72 void move_up_down(int delta, Glib::ustring const &word);
73 void on_up_button_click();
75 void on_active_toggled(const Glib::ustring &item);
76
77 void update();
78 void initui();
79
80 bool _visible{};
81 std::vector<sigc::scoped_connection> linked_connections;
82 std::vector<SPObject *> param_get_satellites() override;
83};
84
85} // namespace Inkscape::LivePathEffect
86
87#endif // INKSCAPE_LIVEPATHEFFECT_PARAMETER_SATELLITEARRAY_H
88
89/*
90 Local Variables:
91 mode:c++
92 c-file-style:"stroustrup"
93 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
94 indent-tabs-mode:nil
95 fill-column:99
96 End:
97*/
98// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
Geom::IntRect visible
Definition canvas.cpp:154
Glib::RefPtr< Gtk::TreeStore > _store
SatelliteArrayParam & operator=(const SatelliteArrayParam &)=delete
void on_active_toggled(const Glib::ustring &item)
bool param_readSVGValue(char const *strvalue) override
std::unique_ptr< Gtk::TreeView > _tree
bool _selectIndex(const Gtk::TreeModel::iterator &iter, int *i)
void link(SPObject *to, size_t pos=Glib::ustring::npos)
std::unique_ptr< Gtk::ScrolledWindow > _scroller
SatelliteArrayParam(const SatelliteArrayParam &)=delete
std::unique_ptr< ModelColumns > _model
void unlink(std::shared_ptr< SatelliteReference > const &to)
void linked_modified(SPObject *linked_obj, guint flags)
void move_up_down(int delta, Glib::ustring const &word)
std::vector< SPObject * > param_get_satellites() override
std::vector< sigc::scoped_connection > linked_connections
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
SPItem * item
Glib::ustring label
Definition desktop.h:50
Live Path Effects code.
static cairo_user_data_key_t key
TODO: insert short description here.
int delta