synfig-studio  1.0.3
selectionmanager.h
Go to the documentation of this file.
1 /* === S Y N F I G ========================================================= */
21 /* ========================================================================= */
22 
23 /* === S T A R T =========================================================== */
24 
25 #ifndef __SYNFIG_APP_SELECTIONMANAGER_H
26 #define __SYNFIG_APP_SELECTIONMANAGER_H
27 
28 /* === H E A D E R S ======================================================= */
29 
30 #include <list>
31 #include <set>
32 #include <ETL/handle>
33 #include <synfig/layer.h>
34 #include <synfig/valuenode.h>
35 #include "value_desc.h"
36 
37 /* === M A C R O S ========================================================= */
38 
39 /* === T Y P E D E F S ===================================================== */
40 
41 /* === C L A S S E S & S T R U C T S ======================================= */
42 
43 namespace synfigapp {
44 
45 class SelectionManager : public etl::shared_object
46 {
47 public:
48  typedef std::pair<synfig::Layer::Handle,synfig::String> LayerParam;
49  typedef std::list<LayerParam> LayerParamList;
50 
51  typedef std::list<synfig::Layer::Handle> LayerList;
52  typedef std::list<ValueDesc> ChildrenList;
53  //typedef std::list<synfig::ValueNode::Handle> ValueNodeList;
54 
55  virtual ~SelectionManager() { }
56 
58  virtual int get_selected_layer_count()const=0;
59 
61  virtual LayerList get_selected_layers()const=0;
62 
65 
67  virtual void set_selected_layers(const LayerList &layer_list)=0;
68 
70  virtual void set_selected_layer(const synfig::Layer::Handle &layer)=0;
71 
73  virtual void clear_selected_layers()=0;
74 
75 
76 
78  virtual int get_selected_children_count()const=0;
79 
81  virtual ChildrenList get_selected_children()const=0;
82 
84  virtual ChildrenList::value_type get_selected_child()const=0;
85 
87  virtual void set_selected_children(const ChildrenList &children_list)=0;
88 
90  virtual void set_selected_child(const ChildrenList::value_type &children)=0;
91 
93  virtual void clear_selected_children()=0;
94 
95 
97  virtual int get_selected_layer_parameter_count()const=0;
98 
101 
103  virtual LayerParam get_selected_layer_parameter()const=0;
104 
106  virtual void set_selected_layer_parameters(const LayerParamList &layer_param_list)=0;
107 
109  virtual void set_selected_layer_param(const LayerParam &layer_param)=0;
110 
112  virtual void clear_selected_layer_parameters()=0;
113 }; // END of class SelectionManager
114 
117 {
118 public:
119  int get_selected_layer_count()const { return 0; }
122  void set_selected_layers(const LayerList &/*layer_list*/) { return; }
123  void set_selected_layer(const synfig::Layer::Handle &/*layer*/) { return; }
124  void clear_selected_layers() { return; }
125 
126 
127  int get_selected_children_count()const { return 0; }
129  ChildrenList::value_type get_selected_child()const { return ChildrenList::value_type(); }
130  void set_selected_children(const ChildrenList &/*children_list*/) { return; }
131  void set_selected_child(const ChildrenList::value_type &/*child*/) { return; }
132  void clear_selected_children() { return; }
133 
134  int get_selected_layer_parameter_count()const { return 0; }
137  void set_selected_layer_parameters(const LayerParamList &/*layer_param_list*/) { return; }
138  void set_selected_layer_param(const LayerParam &/*layer_param*/) { return; }
140 
141 }; // END of class NullSelectionManager
142 
143 }; // END of namespace synfigapp
144 
145 /* === E N D =============================================================== */
146 
147 #endif