Minsky
group.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2015
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef GROUP_H
21 #define GROUP_H
22 #include "SVGItem.h"
23 #include "callableFunction.h"
24 
25 #include <assert.h> // for assert
26 #include <string.h> // for std::size_t, memcpy
27 #include <memory> // for shared_ptr, weak_ptr, __shared_ptr_access
28 #include <set> // for set
29 #include <string> // for string, basic_string, operator+, operator==
30 #include <vector> // for vector
31 #include "TCL_obj_stl.h" // for TCL_objp
32 #include "arrays.h" // for array
33 #include "bookmark.h" // for Bookmark
34 #include "cairo.h" // for cairo_t
35 #include "classdesc.h" // for Exclude, NullDescriptor
36 #include "ecolab.h" // for unpack_t
37 #include "error.h" // for error
38 #include "item.h" // for ItemPtr, Item, ItemPortVector, ItemT, Items
39 #include "operationType.h" // for operator<<
40 #include "port.h" // for GroupPtr, Port (ptr only)
41 #include "tensorVal.h" // for operator<<
42 #include "variable.h" // for VariablePtr, VariableBase
43 #include "variableType.h" // for operator<<
44 #include "variableSummary.h"
45 #include "wire.h" // for WirePtr, Wires, Wire, error
46 namespace classdesc { class pack_t; }
47 namespace classdesc_access { template <class T> struct access_pack; }
48 namespace classdesc_access { template <class T> struct access_unpack; }
49 namespace minsky { class PlotWidget; }
50 namespace minsky { struct LassoBox; }
51 
52 namespace minsky
53 {
54  typedef std::vector<GroupPtr> Groups;
55 
56  // items broken out in a separate structure, as copying is non-default
57  class GroupItems
58  {
59  bool inDestructor=false;
60  protected:
63  WirePtr addWire(const Item& from, const Item& to, unsigned toPortIdx,
64  const std::vector<float>& coords)
65  {
66  if (toPortIdx>=to.portsSize()) return WirePtr();
67  return addWire(from.ports(0), to.ports(toPortIdx), coords);
68  }
69 
70  WirePtr addWire(const std::weak_ptr<Port>& from,
71  const std::weak_ptr<Port>& to,
72  const std::vector<float>& coords);
74  void renameVar(const GroupPtr& origGroup, VariableBase& v);
76  friend class Canvas;
77  public:
81  std::set<Bookmark> bookmarks;
82  std::vector<VariablePtr> inVariables, outVariables;
83  std::vector<VariablePtr> createdIOvariables;
85  virtual ~GroupItems() {inDestructor=true; clear();}
86  // copy operations not deleted to allow ItemT<Group> to compile
87  GroupItems(const GroupItems& x) {};
88  GroupItems& operator=(const GroupItems&) {return *this;}
89  classdesc::Exclude<std::weak_ptr<Group>> self;
90 
91  void clear() {
92  // controlled items need to be removed from a copy
93  auto itemsCopy=items;
94  for (auto& i: itemsCopy) i->removeControlledItems(*this);
95  items.clear();
96  groups.clear();
97  wires.clear();
98  inVariables.clear();
99  outVariables.clear();
100  bookmarks.clear();
101  }
102  bool empty() const {return items.empty() && groups.empty() && wires.empty();}
103 
105  virtual bool nocycles() const=0;
106 
110  template <class M, class O>
111  bool recursiveDo(M GroupItems::*map, O op) const
112  {return GroupRecursiveDo(*this,map,op);}
114  template <class M, class O>
115  bool recursiveDo(M GroupItems::*map, O op)
116  {return GroupRecursiveDo(*this,map,op);}
118 
123  template <class M, class C>
124  const typename M::value_type findAny(M GroupItems::*map, C c) const;
125 
127  //TODO - when functional has lambda support, use type deduction to remove the extra template argument
128  template <class R, class M, class C, class X>
129  std::vector<R> findAll(C c, M (GroupItems::*m), X xfm) const;
130 
131  WirePtr removeWire(const Wire&);
132  GroupPtr removeGroup(const Group&);
133 
134 
136  ItemPtr findItem(const Item& it) const;
137 
139  GroupPtr findGroup(const Group& it) const
140  {return findAny(&GroupItems::groups, [&](const GroupPtr& x){return &*x==&it;});}
141 
143  WirePtr findWire(const Wire& it) const
144  {return findAny(&GroupItems::wires, [&](const WirePtr& x){return x.get()==&it;});}
145 
147  template <class C>
148  std::vector<ItemPtr> findItems(C c) const {
149  return findAll<ItemPtr>(c,&GroupItems::items,[](ItemPtr x){return x;});
150  }
151 
153  template <class C>
154  std::vector<WirePtr> findWires(C c) const {
155  return findAll<WirePtr>(c,&GroupItems::wires,[](WirePtr x){return x;});
156  }
157 
159  template <class C>
160  std::vector<GroupPtr> findGroups(C c) const {
161  return findAll<GroupPtr>(c,&GroupItems::groups,[](GroupPtr x){return x;});
162  }
163 
165  ItemPtr addItem(Item* it, bool inSchema=false) {return addItem(std::shared_ptr<Item>(it),inSchema);}
169  virtual ItemPtr addItem(const std::shared_ptr<Item>&, bool inSchema=false);
170  ItemPtr removeItem(const Item&);
171 
172  GroupPtr addGroup(const std::shared_ptr<Group>&);
173  GroupPtr addGroup(Group* g) {return addGroup(std::shared_ptr<Group>(g));}
174 
177  WirePtr addWire(const Item& from, const Item& to, unsigned toPortIdx)
178  {return addWire(from, to, toPortIdx, {});}
179  WirePtr addWire(const std::shared_ptr<Wire>&);
180  WirePtr addWire(Wire* w) {return addWire(std::shared_ptr<Wire>(w));}
181  WirePtr addWire(const std::weak_ptr<Port>& from, const std::weak_ptr<Port>& to)
182  {return addWire(from,to,{});}
183 
185  static void adjustWiresGroup(Wire& w);
186 
188  std::size_t numItems() const;
190  std::size_t numWires() const;
192  std::size_t numGroups() const;
194  classdesc::Exclude<std::shared_ptr<PlotWidget>> displayPlot;
197  displayPlot.reset();
198  }
199 
200  };
201 
202  template <class G, class M, class O>
203  bool GroupRecursiveDo(G& gp, M GroupItems::*map, O op)
204  {
205  for (auto i=(gp.*map).begin(); i!=(gp.*map).end(); ++i)
206  {
207  assert(*i);
208  if (op(gp.*map,i))
209  return true;
210  }
211  for (auto& g: gp.groups)
212  {
213  assert(g);
214  if (g->recursiveDo(map, op))
215  return true;
216  }
217  return false;
218  }
219 
220  class Group: public ItemT<Group>, public GroupItems, public CallableFunction
221  {
223  VariablePtr addIOVar(const char*);
224  protected:
229  const Group* minimalEnclosingGroup(float x0, float y0, float x1, float y1, const Item*ignore=nullptr) const;
230  Group* minimalEnclosingGroup(float x0, float y0, float x1, float y1, const Item*ignore=nullptr)
231  {return const_cast<Group*>(const_cast<const Group*>(this)->minimalEnclosingGroup(x0,y0,x1,y1,ignore));}
232  friend class Canvas;
233 
237  float contentBounds(double& x0, double& y0, double& x1, double& y1) const;
238 
239  public:
240  std::string title;
241  std:: string name() const override {return title;}
243  double operator()(const std::vector<double>& p) override;
245  std::string formula() const;
247  std::string arguments() const;
248 
249  Group() {iWidth(100); iHeight(100);}
250 
251  bool nocycles() const override;
252 
255  GroupPtr copy() const;
257  GroupPtr copyUnowned() const;
258  Group* clone() const override {throw error("Groups cannot be cloned");}
260 
261  using GroupItems::addItem;
262  ItemPtr addItem(const std::shared_ptr<Item>& it, bool inSchema=false) override
263  {
264  if (it && it->bookmark)
265  addBookmarkXY(it->left(),it->top(),it->bookmarkId());
266  return GroupItems::addItem(it,inSchema);
267  }
268 
269 
271  void makeSubroutine();
272 
273  void draw(cairo_t*) const override;
274 
276  void drawEdgeVariables(cairo_t*) const;
278  void draw1edge(const std::vector<VariablePtr>& vars, cairo_t* cairo,
279  float x) const;
282  void drawIORegion(cairo_t*) const;
283 
285  void moveContents(Group& source);
286 
289 
290  IORegion::type inIORegion(float x, float y) const;
292  void checkAddIORegion(const ItemPtr& x);
293 
294  void addInputVar() {inVariables.push_back(addIOVar("input"));}
295  void addOutputVar() {outVariables.push_back(addIOVar("output"));}
296 
298  void deleteItem(const Item&);
299 
300  void deleteAttachedWires() override {
301  for (auto& i: inVariables) i->deleteAttachedWires();
302  for (auto& i: outVariables) i->deleteAttachedWires();
303  }
304 
306  void resizeOnContents();
307 
308  void resize(const LassoBox& x) override;
309  ClickType::Type clickType(float x, float y) const override;
310 
313  bool higher(const Group&) const;
314 
316  unsigned level() const;
317 
319  const Group& globalGroup() const;
320  Group& globalGroup();
321 
325  bool uniqueItems(std::set<void*>& idset) const;
326  bool uniqueItems() const {
327  std::set<void*> idset;
328  return uniqueItems(idset);
329  }
330 
332  bool displayContents() const {return !group.lock() || zoomFactor()*relZoom>1;}
336 
338  void margins(float& left, float& right) const;
339 
341  std::vector<float> marginsV() const {
342  float l, r; margins(l,r); return {l,r};
343  }
344 
347  float displayZoom{1};
348  float relZoom{1};
349  float computeDisplayZoom();
350  void computeRelZoom();
351  float localZoom() const {
352  return (displayZoom>0 && displayContents())
353  ? zoomFactor()/displayZoom: 1;
354  }
357  void setZoom(float factor);
358  void zoom(float xOrigin, float yOrigin,float factor);
359 
363  float edgeScale() const {
364  float z=zoomFactor();
365  return z*relZoom>1? z*relZoom: z>1? 1: z;
366  }
367 
369  ecolab::array<double> cBounds() const {
370  ecolab::array<double> r(4);
371  contentBounds(r[0],r[1],r[2],r[3]);
372  return r;
373  }
374 
376  float rotFactor() const;
377 
381  ItemPtr select(float x, float y) const override;
382 
385 
388  void normaliseGroupRefs(const std::shared_ptr<Group>& self);
389 
391  void flipContents();
392 
395  std::vector<std::string> accessibleVars() const;
396 
398  std::vector<std::string> bookmarkList() {
399  std::vector<std::string> r;
400  for (auto& b: bookmarks) r.push_back(b.name);
401  return r;
402  }
403  void addBookmarkXY(float dx, float dy, const std::string& name) {
404  bookmarks.erase(Bookmark{0,0,0,name});
405  bookmarks.emplace(x()-dx, y()-dy, relZoom*zoomFactor(), name);
406  }
407  void addBookmark(const std::string& name) {addBookmarkXY(0,0,name);}
408  void deleteBookmark(std::size_t i) {
409  if (i<bookmarks.size())
410  {
411  auto j=bookmarks.begin();
412  std::advance(j, i);
413  bookmarks.erase(j);
414  }
415  }
416  void gotoBookmark_b(const Bookmark& b);
417  void gotoBookmark(std::size_t i) {
418  if (i<bookmarks.size()) {
419  auto j=bookmarks.begin();
420  std::advance(j, i);
421  gotoBookmark_b(*j);
422  }
423  }
424 
426  std::string defaultExtension() const;
427 
429  void autoLayout();
431  void randomLayout();
432 
434  std::vector<Summary> summariseGodleys() const;
435 
437  void renameAllInstances(const std::string& valueId, const std::string& newName);
438 
439  };
440 
441  template <class M, class C>
442  const typename M::value_type GroupItems::findAny(M GroupItems::*map, C c) const
443  {
444  for (auto& i: this->*map)
445  if (c(i))
446  return i;
447  for (auto& g: groups)
448  if (auto& r=g->findAny(map, c))
449  return r;
450  return typename M::value_type();
451  }
452 
453  template <class R, class M, class C, class X>
454  std::vector<R> GroupItems::findAll(C c, M (GroupItems::*m), X xfm) const {
455  std::vector<R> r;
456  for (auto& i: this->*m)
457  {
458  assert(i);
459  if (c(i)) r.push_back(xfm(i));
460  }
461 
462  for (auto& i: groups)
463  {
464  assert(i);
465  auto items=i->findAll<R>(c,m,xfm);
466  r.insert(r.end(), items.begin(), items.end());
467  }
468  return r;
469  }
470 
471 }
472 
473 #ifdef CLASSDESC
474 // omit these, because weak/shared pointers cause problems, and its
475 // not needed anyway
476 #pragma omit pack minsky::Group
477 #pragma omit unpack minsky::Group
478 #endif
479 namespace classdesc_access
480 {
481  template <> struct access_pack<minsky::Group>:
482  public classdesc::NullDescriptor<classdesc::pack_t> {};
483  template <> struct access_unpack<minsky::Group>:
484  public classdesc::NullDescriptor<classdesc::unpack_t> {};
485 }
486 #include "group.cd"
487 #include "group.xcd"
488 #endif
ItemPtr addItem(Item *it, bool inSchema=false)
add item, ownership is passed
Definition: group.h:165
void deleteBookmark(std::size_t i)
Definition: group.h:408
static SVGRenderer svgRenderer
Definition: group.h:259
returns which I/O region (x,y) is in if any
Definition: group.h:288
WirePtr removeWire(const Wire &)
Definition: group.cc:259
std::vector< WirePtr > Wires
Definition: wire.h:103
std::vector< R > findAll(C c, M(GroupItems::*m), X xfm) const
finds all items/wires matching criterion c. Found items are transformed by xfm
Definition: group.h:454
std::string name() const override
Definition: group.h:241
float localZoom() const
Definition: group.h:351
GroupPtr copyUnowned() const
make a copy of this, that is not owned by any group
Definition: group.cc:129
std::size_t numItems() const
total number of items in this and child groups
Definition: group.cc:477
void addBookmark(const std::string &name)
Definition: group.h:407
std::vector< WirePtr > findWires(C c) const
returns list of wires matching criterion c
Definition: group.h:154
std::vector< VariablePtr > inVariables
Definition: group.h:82
bool inDestructor
Definition: group.h:59
std::vector< float > marginsV() const
for debugging purposes
Definition: group.h:341
std::size_t portsSize() const
number of ports
Definition: item.h:184
WirePtr addWire(Wire *w)
Definition: group.h:180
float right() const
Definition: item.cc:170
void addOutputVar()
Definition: group.h:295
void checkAddIORegion(const ItemPtr &x)
check if item is a variable and located in an I/O region, and add it if it is
Definition: group.cc:550
std::vector< VariablePtr > createdIOvariables
Definition: group.h:83
bool m_displayContentsChanged
Definition: group.h:222
float relZoom
relative zoom contents of this group are displayed at
Definition: group.h:348
virtual float x() const
Definition: item.cc:107
ItemPtr addItem(const std::shared_ptr< Item > &it, bool inSchema=false) override
Definition: group.h:262
IORegion::type inIORegion(float x, float y) const
Definition: group.cc:531
virtual float y() const
Definition: item.cc:114
std::vector< std::string > accessibleVars() const
return a list of existing variables a variable in this group could be connected to ...
Definition: group.cc:1221
bool nocycles() const override
tests that groups are arranged heirarchically without any recurrence
Definition: group.cc:649
float rotFactor() const
scaling factor to allow a rotated icon to fit on the bitmap
Definition: group.cc:1172
float iHeight() const
Definition: item.h:224
GroupPtr removeGroup(const Group &)
Definition: group.cc:275
represents rectangular region of a lasso operation
Definition: lasso.h:28
void resize(const LassoBox &x) override
resize this item on the canvas
Definition: group.cc:624
bool displayContents() const
returns whether contents should be displayed. Top level group always displayed
Definition: group.h:332
std::vector< Summary > summariseGodleys() const
produce a summary of godley table variables
Definition: group.cc:1271
std::set< Bookmark > bookmarks
Definition: group.h:81
std::shared_ptr< Item > ItemPtr
Definition: item.h:57
GroupItems & operator=(const GroupItems &)
Definition: group.h:88
std::shared_ptr< Wire > WirePtr
Definition: wire.h:102
bool displayContentsChanged() const
true if displayContents status changed on this or any contained group last zoom
Definition: group.h:335
string valueId(const string &name)
construct a valueId from fully qualified name @ name should not be canonicalised
Definition: valueId.cc:75
Group * minimalEnclosingGroup(float x0, float y0, float x1, float y1, const Item *ignore=nullptr)
Definition: group.h:230
bool recursiveDo(M GroupItems::*map, O op) const
Perform action heirarchically on elements of map map. If op returns true, the operation terminates...
Definition: group.h:111
float edgeScale() const
scale used to render io variables. Smoothly interpolates between the scale at which internal items ar...
Definition: group.h:363
void deleteItem(const Item &)
remove item from group, and also all attached wires.
Definition: group.cc:247
void moveContents(Group &source)
move all items from source to this
Definition: group.cc:499
ecolab::array< double > cBounds() const
for TCL debugging
Definition: group.h:369
void resizeOnContents()
adjust position and size of icon to just cover contents
Definition: group.cc:574
virtual float zoomFactor() const
Definition: item.cc:121
ItemPtr select(float x, float y) const override
returns the variable if point (x,y) is within a I/O variable icon, null otherwise, indicating that the Group has been selected.
Definition: group.cc:1184
const Group * minimalEnclosingGroup(float x0, float y0, float x1, float y1, const Item *ignore=nullptr) const
returns the smallest group whose icon completely encloses the rectangle given by the argument...
Definition: group.cc:864
void flipContents()
rotate all conatined items by 180 degrees
Definition: group.cc:1207
WirePtr addWire(const Item &from, const Item &to, unsigned toPortIdx)
add a wire from item from, to item to, connecting to the toIdx port of to
Definition: group.h:177
std::vector< VariablePtr > outVariables
Definition: group.h:82
float displayZoom
computes the zoom at which to show contents, given current contentBounds and width ...
Definition: group.h:347
void setZoom(float factor)
sets the zoom factor to factor. Recursively set the zoomfactor on contained objects to the computed l...
Definition: group.cc:878
classdesc::Exclude< std::shared_ptr< PlotWidget > > displayPlot
plot widget used for group icon
Definition: group.h:194
GroupPtr findGroup(const Group &it) const
finds group within this group or subgroups. Returns null if not found
Definition: group.h:139
ItemPtr findItem(const Item &it) const
finds item within this group or subgroups. Returns null if not found
Definition: group.cc:291
std::string formula() const
algebraic formula representing value of first output argument of this group
Definition: group.cc:74
void normaliseGroupRefs(const std::shared_ptr< Group > &self)
fix up subgroup pointers self is a shared pointer ref to this
Definition: group.cc:1195
float left() const
Definition: item.cc:163
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky&#39;s state cha...
Definition: constMap.h:22
GroupPtr addGroup(const std::shared_ptr< Group > &)
Definition: group.cc:659
void gotoBookmark(std::size_t i)
Definition: group.h:417
std::vector< GroupPtr > findGroups(C c) const
returns list of groups matching criterion c
Definition: group.h:160
float iWidth() const
Definition: item.h:217
std::vector< ItemPtr > Items
Definition: item.h:366
void addInputVar()
Definition: group.h:294
bool GroupRecursiveDo(G &gp, M GroupItems::*map, O op)
Definition: group.h:203
void deleteAttachedWires() override
delete all attached wires
Definition: group.h:300
void randomLayout()
randomly lay out items in this group
Definition: group.cc:1265
GroupPtr addGroup(Group *g)
Definition: group.h:173
void renameVar(const GroupPtr &origGroup, VariableBase &v)
rename variable so that it maintains most general scope possible
Definition: group.cc:303
WirePtr addWire(const std::weak_ptr< Port > &from, const std::weak_ptr< Port > &to)
Definition: group.h:181
void splitBoundaryCrossingWires()
splits any wires that cross group boundaries
Definition: group.cc:424
void clear()
Definition: group.h:91
std::string title
Definition: group.h:240
std::vector< GroupPtr > Groups
Definition: group.h:54
unsigned level() const
return level in the heirarchy
Definition: group.cc:719
bool empty() const
Definition: group.h:102
double operator()(const std::vector< double > &p) override
evaluate function on arbitrary number of arguments (exprtk support)
Definition: group.cc:50
void gotoBookmark_b(const Bookmark &b)
Definition: group.cc:1244
static void adjustWiresGroup(Wire &w)
adjust wire&#39;s group to be the least common ancestor of its ports
Definition: group.cc:404
WirePtr findWire(const Wire &it) const
finds wire within this group or subgroups. Returns null if not found
Definition: group.h:143
virtual bool nocycles() const =0
tests that groups are arranged heirarchically without any recurrence
void computeRelZoom()
Definition: group.cc:851
GroupPtr copy() const
Make a copy of this as a sibling group (owned by parent). Attempting to copying minsky.model is a null operation.
Definition: group.cc:121
void addBookmarkXY(float dx, float dy, const std::string &name)
Definition: group.h:403
float computeDisplayZoom()
Definition: group.cc:824
const Group & globalGroup() const
top level group
Definition: group.cc:739
void draw1edge(const std::vector< VariablePtr > &vars, cairo_t *cairo, float x) const
draw the variables of one of the edges
Definition: group.cc:1044
Groups groups
Definition: group.h:79
bool higher(const Group &) const
returns true if this is higher in the heirarchy than the argument this->higher(*this) is false ...
Definition: group.cc:712
WirePtr addWire(const Item &from, const Item &to, unsigned toPortIdx, const std::vector< float > &coords)
add a wire from item from, to item to, connecting to the toIdx port of to, with coordinates ...
Definition: group.h:63
const M::value_type findAny(M GroupItems::*map, C c) const
search for the first item in the heirarchy of map for which c is true. M::value_type must evaluate in...
Definition: group.h:442
CLASSDESC_ACCESS(GroupItems)
bool recursiveDo(M GroupItems::*map, O op)
O has signature bool(M&, M::iterator)
Definition: group.h:115
bool uniqueItems() const
Definition: group.h:326
std::shared_ptr< Group > GroupPtr
Definition: port.h:32
GroupItems(const GroupItems &x)
Definition: group.h:87
Group * clone() const override
Definition: group.h:258
ClickType::Type clickType(float x, float y) const override
returns the clicktype given a mouse click at x, y.
Definition: group.cc:910
VariablePtr addIOVar(const char *)
Definition: group.cc:519
virtual std::weak_ptr< Port > ports(std::size_t i) const
callback to be run when item deleted from group
Definition: item.h:180
Definition: group.tcl:84
std::size_t numGroups() const
total number of groups in this and child groups
Definition: group.cc:491
void removeDisplayPlot()
remove the display plot
Definition: group.h:196
float contentBounds(double &x0, double &y0, double &x1, double &y1) const
return bounding box coordinates for all variables, operators etc in this group. Returns the zoom scal...
Definition: group.cc:759
std::vector< std::string > bookmarkList()
returns list of bookmark names for populating menu
Definition: group.h:398
void makeSubroutine()
Make all variables not present in outerscope local to this group.
Definition: group.cc:191
void margins(float &left, float &right) const
margin sizes to allow space for edge variables.
Definition: group.cc:1152
std::string arguments() const
argument declaration, to be appended to name() for function declaration
Definition: group.cc:88
void autoLayout()
automatically lay out items in this group using a graph layout algorithm
Definition: group.cc:1259
void renameAllInstances(const std::string &valueId, const std::string &newName)
rename all instances of a variable matching valueId to newName
Definition: group.cc:1285
void drawEdgeVariables(cairo_t *) const
draw representations of edge variables around group icon
Definition: group.cc:1076
void draw(cairo_t *) const override
draw this item into a cairo context
Definition: group.cc:924
std::size_t numWires() const
total number of wires in this and child groups
Definition: group.cc:484
virtual ~GroupItems()
Definition: group.h:85
void zoom(float xOrigin, float yOrigin, float factor)
Definition: group.cc:894
std::string defaultExtension() const
return default extension for this group - .mky if no ravels in group, .rvl otherwise ...
Definition: group.cc:1252
ItemPtr removeItem(const Item &)
Definition: group.cc:212
void drawIORegion(cairo_t *) const
draw notches in the I/O region to indicate dockability of variables there
Definition: group.cc:1105
std::vector< ItemPtr > findItems(C c) const
returns list of items matching criterion c
Definition: group.h:148