Minsky: 3.17.0
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 "arrays.h" // for array
32 #include "bookmark.h" // for Bookmark
33 #include "cairo.h" // for cairo_t
34 #include "classdesc.h" // for Exclude, NullDescriptor
35 #include "error.h" // for error
36 #include "item.h" // for ItemPtr, Item, ItemPortVector, ItemT, Items
37 #include "operationType.h" // for operator<<
38 #include "port.h" // for GroupPtr, Port (ptr only)
39 #include "tensorVal.h" // for operator<<
40 #include "variable.h" // for VariablePtr, VariableBase
41 #include "variableType.h" // for operator<<
42 #include "variableSummary.h"
43 #include "wire.h" // for WirePtr, Wires, Wire, error
44 namespace classdesc { class pack_t; }
45 namespace classdesc_access { template <class T> struct access_pack; }
46 namespace classdesc_access { template <class T> struct access_unpack; }
47 namespace minsky { class PlotWidget; }
48 namespace minsky { struct LassoBox; }
49 
50 namespace minsky
51 {
52  typedef std::vector<GroupPtr> Groups;
53 
54  // items broken out in a separate structure, as copying is non-default
55  class GroupItems
56  {
57  bool inDestructor=false;
58  protected:
61  WirePtr addWire(const Item& from, const Item& to, unsigned toPortIdx,
62  const std::vector<float>& coords)
63  {
64  if (toPortIdx>=to.portsSize()) return WirePtr();
65  return addWire(from.ports(0), to.ports(toPortIdx), coords);
66  }
67 
68  WirePtr addWire(const std::weak_ptr<Port>& from,
69  const std::weak_ptr<Port>& to,
70  const std::vector<float>& coords);
72  void renameVar(const GroupPtr& origGroup, VariableBase& v);
74  friend class Canvas;
75  public:
79  std::set<Bookmark> bookmarks;
80  std::vector<VariablePtr> inVariables, outVariables;
81  std::vector<VariablePtr> createdIOvariables;
83  virtual ~GroupItems() {inDestructor=true; clear();}
84  // copy operations not deleted to allow ItemT<Group> to compile
85  GroupItems(const GroupItems& x) {};
86  GroupItems& operator=(const GroupItems&) {return *this;}
87  classdesc::Exclude<std::weak_ptr<Group>> self;
88 
89  void clear() {
90  // controlled items need to be removed from a copy
91  auto itemsCopy=items;
92  for (auto& i: itemsCopy) i->removeControlledItems(*this);
93  items.clear();
94  groups.clear();
95  wires.clear();
96  inVariables.clear();
97  outVariables.clear();
98  bookmarks.clear();
99  }
100  bool empty() const {return items.empty() && groups.empty() && wires.empty();}
101 
103  virtual bool nocycles() const=0;
104 
108  template <class M, class O>
109  bool recursiveDo(M GroupItems::*map, O op) const
110  {return GroupRecursiveDo(*this,map,op);}
112  template <class M, class O>
113  bool recursiveDo(M GroupItems::*map, O op)
114  {return GroupRecursiveDo(*this,map,op);}
116 
121  template <class M, class C>
122  const typename M::value_type findAny(M GroupItems::*map, C c) const;
123 
125  //TODO - when functional has lambda support, use type deduction to remove the extra template argument
126  template <class R, class M, class C, class X>
127  std::vector<R> findAll(C c, M (GroupItems::*m), X xfm) const;
128 
129  WirePtr removeWire(const Wire&);
130  GroupPtr removeGroup(const Group&);
131 
132 
134  ItemPtr findItem(const Item& it) const;
135 
137  GroupPtr findGroup(const Group& it) const
138  {return findAny(&GroupItems::groups, [&](const GroupPtr& x){return &*x==&it;});}
139 
141  WirePtr findWire(const Wire& it) const
142  {return findAny(&GroupItems::wires, [&](const WirePtr& x){return x.get()==&it;});}
143 
145  template <class C>
146  std::vector<ItemPtr> findItems(C c) const {
147  return findAll<ItemPtr>(c,&GroupItems::items,[](ItemPtr x){return x;});
148  }
149 
151  template <class C>
152  std::vector<WirePtr> findWires(C c) const {
153  return findAll<WirePtr>(c,&GroupItems::wires,[](WirePtr x){return x;});
154  }
155 
157  template <class C>
158  std::vector<GroupPtr> findGroups(C c) const {
159  return findAll<GroupPtr>(c,&GroupItems::groups,[](GroupPtr x){return x;});
160  }
161 
163  ItemPtr addItem(Item* it, bool inSchema=false) {return addItem(std::shared_ptr<Item>(it),inSchema);}
167  virtual ItemPtr addItem(const std::shared_ptr<Item>&, bool inSchema=false);
168  ItemPtr removeItem(const Item&);
169 
170  GroupPtr addGroup(const std::shared_ptr<Group>&);
171  GroupPtr addGroup(Group* g) {return addGroup(std::shared_ptr<Group>(g));}
172 
175  WirePtr addWire(const Item& from, const Item& to, unsigned toPortIdx)
176  {return addWire(from, to, toPortIdx, {});}
177  WirePtr addWire(const std::shared_ptr<Wire>&);
178  WirePtr addWire(Wire* w) {return addWire(std::shared_ptr<Wire>(w));}
179  WirePtr addWire(const std::weak_ptr<Port>& from, const std::weak_ptr<Port>& to)
180  {return addWire(from,to,{});}
181 
183  static void adjustWiresGroup(Wire& w);
184 
186  std::size_t numItems() const;
188  std::size_t numWires() const;
190  std::size_t numGroups() const;
192  classdesc::Exclude<std::shared_ptr<PlotWidget>> displayPlot;
195  displayPlot.reset();
196  }
197 
198  };
199 
200  template <class G, class M, class O>
201  bool GroupRecursiveDo(G& gp, M GroupItems::*map, O op)
202  {
203  for (auto i=(gp.*map).begin(); i!=(gp.*map).end(); ++i)
204  {
205  assert(*i);
206  if (op(gp.*map,i))
207  return true;
208  }
209  for (auto& g: gp.groups)
210  {
211  assert(g);
212  if (g->recursiveDo(map, op))
213  return true;
214  }
215  return false;
216  }
217 
218  class Group: public ItemT<Group>, public GroupItems, public CallableFunction
219  {
221  VariablePtr addIOVar(const char*);
222  protected:
227  const Group* minimalEnclosingGroup(float x0, float y0, float x1, float y1, const Item*ignore=nullptr) const;
228  Group* minimalEnclosingGroup(float x0, float y0, float x1, float y1, const Item*ignore=nullptr)
229  {return const_cast<Group*>(const_cast<const Group*>(this)->minimalEnclosingGroup(x0,y0,x1,y1,ignore));}
230  friend class Canvas;
231 
235  float contentBounds(double& x0, double& y0, double& x1, double& y1) const;
236 
237  public:
238  std::string title;
239  std:: string name() const override {return title;}
241  double operator()(const std::vector<double>& p) override;
243  std::string formula() const;
245  std::string arguments() const;
246 
247  Group() {iWidth(100); iHeight(100);}
248 
249  bool nocycles() const override;
250 
253  GroupPtr copy() const;
255  GroupPtr copyUnowned() const;
256  Group* clone() const override {throw error("Groups cannot be cloned");}
258 
259  using GroupItems::addItem;
260  ItemPtr addItem(const std::shared_ptr<Item>& it, bool inSchema=false) override
261  {
262  if (it && it->bookmark)
263  addBookmarkXY(it->left(),it->top(),it->bookmarkId());
264  return GroupItems::addItem(it,inSchema);
265  }
266 
267 
269  void makeSubroutine();
270 
271  void draw(cairo_t*) const override;
272 
274  void drawEdgeVariables(cairo_t*) const;
276  void draw1edge(const std::vector<VariablePtr>& vars, cairo_t* cairo,
277  float x) const;
280  void drawIORegion(cairo_t*) const;
281 
283  void moveContents(Group& source);
284 
287 
288  IORegion::type inIORegion(float x, float y) const;
290  void checkAddIORegion(const ItemPtr& x);
291 
292  void addInputVar() {inVariables.push_back(addIOVar("input"));}
293  void addOutputVar() {outVariables.push_back(addIOVar("output"));}
294 
296  void deleteItem(const Item&);
297 
298  void deleteAttachedWires() override {
299  for (auto& i: inVariables) i->deleteAttachedWires();
300  for (auto& i: outVariables) i->deleteAttachedWires();
301  }
302 
304  void resizeOnContents();
305 
306  void resize(const LassoBox& x) override;
307  ClickType::Type clickType(float x, float y) const override;
308 
311  bool higher(const Group&) const;
312 
314  unsigned level() const;
315 
317  const Group& globalGroup() const;
318  Group& globalGroup();
319 
323  bool uniqueItems(std::set<void*>& idset) const;
324  bool uniqueItems() const {
325  std::set<void*> idset;
326  return uniqueItems(idset);
327  }
328 
330  bool displayContents() const {return !group.lock() || zoomFactor()*relZoom>1;}
334 
336  void margins(float& left, float& right) const;
337 
339  std::vector<float> marginsV() const {
340  float l, r; margins(l,r); return {l,r};
341  }
342 
345  float displayZoom{1};
346  float relZoom{1};
347  float computeDisplayZoom();
348  void computeRelZoom();
349  float localZoom() const {
350  return (displayZoom>0 && displayContents())
351  ? zoomFactor()/displayZoom: 1;
352  }
355  void setZoom(float factor);
356  void zoom(float xOrigin, float yOrigin,float factor);
357 
361  float edgeScale() const {
362  float z=zoomFactor();
363  return z*relZoom>1? z*relZoom: z>1? 1: z;
364  }
365 
367  ecolab::array<double> cBounds() const {
368  ecolab::array<double> r(4);
369  contentBounds(r[0],r[1],r[2],r[3]);
370  return r;
371  }
372 
374  float rotFactor() const;
375 
379  ItemPtr select(float x, float y) const override;
380 
383 
386  void normaliseGroupRefs(const std::shared_ptr<Group>& self);
387 
389  void flipContents();
390 
393  std::vector<std::string> accessibleVars() const;
394 
396  std::vector<std::string> bookmarkList() {
397  std::vector<std::string> r;
398  for (auto& b: bookmarks) r.push_back(b.name);
399  return r;
400  }
401  void addBookmarkXY(float dx, float dy, const std::string& name) {
402  bookmarks.erase(Bookmark{0,0,0,name});
403  bookmarks.emplace(x()-dx, y()-dy, relZoom*zoomFactor(), name);
404  }
405  void addBookmark(const std::string& name) {addBookmarkXY(0,0,name);}
406  void deleteBookmark(std::size_t i) {
407  if (i<bookmarks.size())
408  {
409  auto j=bookmarks.begin();
410  std::advance(j, i);
411  bookmarks.erase(j);
412  }
413  }
414  void gotoBookmark_b(const Bookmark& b);
415  void gotoBookmark(std::size_t i) {
416  if (i<bookmarks.size()) {
417  auto j=bookmarks.begin();
418  std::advance(j, i);
419  gotoBookmark_b(*j);
420  }
421  }
422 
424  std::string defaultExtension() const;
425 
427  void autoLayout();
429  void randomLayout();
430 
432  std::vector<Summary> summariseGodleys() const;
433 
435  void renameAllInstances(const std::string& valueId, const std::string& newName);
436 
437  };
438 
439  template <class M, class C>
440  const typename M::value_type GroupItems::findAny(M GroupItems::*map, C c) const
441  {
442  for (auto& i: this->*map)
443  if (c(i))
444  return i;
445  for (auto& g: groups)
446  if (auto& r=g->findAny(map, c))
447  return r;
448  return typename M::value_type();
449  }
450 
451  template <class R, class M, class C, class X>
452  std::vector<R> GroupItems::findAll(C c, M (GroupItems::*m), X xfm) const {
453  std::vector<R> r;
454  for (auto& i: this->*m)
455  {
456  assert(i);
457  if (c(i)) r.push_back(xfm(i));
458  }
459 
460  for (auto& i: groups)
461  {
462  assert(i);
463  auto items=i->findAll<R>(c,m,xfm);
464  r.insert(r.end(), items.begin(), items.end());
465  }
466  return r;
467  }
468 
469 }
470 
471 #ifdef CLASSDESC
472 // omit these, because weak/shared pointers cause problems, and its
473 // not needed anyway
474 #pragma omit pack minsky::Group
475 #pragma omit unpack minsky::Group
476 #endif
477 namespace classdesc_access
478 {
479  template <> struct access_pack<minsky::Group>:
480  public classdesc::NullDescriptor<classdesc::pack_t> {};
481  template <> struct access_unpack<minsky::Group>:
482  public classdesc::NullDescriptor<classdesc::unpack_t> {};
483 }
484 #include "group.cd"
485 #include "group.xcd"
486 #endif
ItemPtr addItem(Item *it, bool inSchema=false)
add item, ownership is passed
Definition: group.h:163
void deleteBookmark(std::size_t i)
Definition: group.h:406
static SVGRenderer svgRenderer
Definition: group.h:257
returns which I/O region (x,y) is in if any
Definition: group.h:286
WirePtr removeWire(const Wire &)
Definition: group.cc:259
std::vector< WirePtr > Wires
Definition: wire.h:99
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:452
std::string name() const override
Definition: group.h:239
float localZoom() const
Definition: group.h:349
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:405
std::vector< WirePtr > findWires(C c) const
returns list of wires matching criterion c
Definition: group.h:152
std::vector< VariablePtr > inVariables
Definition: group.h:80
bool inDestructor
Definition: group.h:57
std::vector< float > marginsV() const
for debugging purposes
Definition: group.h:339
std::size_t portsSize() const
number of ports
Definition: item.h:181
WirePtr addWire(Wire *w)
Definition: group.h:178
float right() const
Definition: item.cc:170
void addOutputVar()
Definition: group.h:293
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:81
bool m_displayContentsChanged
Definition: group.h:220
float relZoom
relative zoom contents of this group are displayed at
Definition: group.h:346
virtual float x() const
Definition: item.cc:107
ItemPtr addItem(const std::shared_ptr< Item > &it, bool inSchema=false) override
Definition: group.h:260
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:1220
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:1171
float iHeight() const
Definition: item.h:221
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:330
std::vector< Summary > summariseGodleys() const
produce a summary of godley table variables
Definition: group.cc:1270
std::set< Bookmark > bookmarks
Definition: group.h:79
std::shared_ptr< Item > ItemPtr
Definition: item.h:55
GroupItems & operator=(const GroupItems &)
Definition: group.h:86
std::shared_ptr< Wire > WirePtr
Definition: wire.h:98
bool displayContentsChanged() const
true if displayContents status changed on this or any contained group last zoom
Definition: group.h:333
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:228
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:109
float edgeScale() const
scale used to render io variables. Smoothly interpolates between the scale at which internal items ar...
Definition: group.h:361
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:367
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:1183
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:1206
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:175
std::vector< VariablePtr > outVariables
Definition: group.h:80
float displayZoom
computes the zoom at which to show contents, given current contentBounds and width ...
Definition: group.h:345
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:192
GroupPtr findGroup(const Group &it) const
finds group within this group or subgroups. Returns null if not found
Definition: group.h:137
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:1194
float left() const
Definition: item.cc:163
GroupPtr addGroup(const std::shared_ptr< Group > &)
Definition: group.cc:659
void gotoBookmark(std::size_t i)
Definition: group.h:415
std::vector< GroupPtr > findGroups(C c) const
returns list of groups matching criterion c
Definition: group.h:158
float iWidth() const
Definition: item.h:214
std::vector< ItemPtr > Items
Definition: item.h:360
void addInputVar()
Definition: group.h:292
bool GroupRecursiveDo(G &gp, M GroupItems::*map, O op)
Definition: group.h:201
void deleteAttachedWires() override
delete all attached wires
Definition: group.h:298
void randomLayout()
randomly lay out items in this group
Definition: group.cc:1264
GroupPtr addGroup(Group *g)
Definition: group.h:171
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:179
void splitBoundaryCrossingWires()
splits any wires that cross group boundaries
Definition: group.cc:424
void clear()
Definition: group.h:89
std::string title
Definition: group.h:238
std::vector< GroupPtr > Groups
Definition: group.h:52
unsigned level() const
return level in the heirarchy
Definition: group.cc:719
bool empty() const
Definition: group.h:100
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:1243
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:141
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:401
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:1043
Groups groups
Definition: group.h:77
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:61
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:440
CLASSDESC_ACCESS(GroupItems)
bool recursiveDo(M GroupItems::*map, O op)
O has signature bool(M&, M::iterator)
Definition: group.h:113
bool uniqueItems() const
Definition: group.h:324
std::shared_ptr< Group > GroupPtr
Definition: port.h:32
GroupItems(const GroupItems &x)
Definition: group.h:85
Group * clone() const override
Definition: group.h:256
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:177
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:194
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:396
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:1151
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:1258
void renameAllInstances(const std::string &valueId, const std::string &newName)
rename all instances of a variable matching valueId to newName
Definition: group.cc:1284
void drawEdgeVariables(cairo_t *) const
draw representations of edge variables around group icon
Definition: group.cc:1075
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:83
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:1251
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:1104
std::vector< ItemPtr > findItems(C c) const
returns list of items matching criterion c
Definition: group.h:146