Minsky
|
#include <group.h>
Classes | |
struct | IORegion |
returns which I/O region (x,y) is in if any More... | |
Public Member Functions | |
std::string | name () const override |
double | operator() (const std::vector< double > &p) override |
evaluate function on arbitrary number of arguments (exprtk support) More... | |
std::string | formula () const |
algebraic formula representing value of first output argument of this group More... | |
std::string | arguments () const |
argument declaration, to be appended to name() for function declaration More... | |
Group () | |
bool | nocycles () const override |
tests that groups are arranged heirarchically without any recurrence More... | |
GroupPtr | copy () const |
Make a copy of this as a sibling group (owned by parent). Attempting to copying minsky.model is a null operation. More... | |
GroupPtr | copyUnowned () const |
make a copy of this, that is not owned by any group More... | |
Group * | clone () const override |
ItemPtr | addItem (const std::shared_ptr< Item > &it, bool inSchema=false) override |
void | makeSubroutine () |
Make all variables not present in outerscope local to this group. More... | |
void | draw (cairo_t *) const override |
draw this item into a cairo context More... | |
void | drawEdgeVariables (cairo_t *) const |
draw representations of edge variables around group icon More... | |
void | draw1edge (const std::vector< VariablePtr > &vars, cairo_t *cairo, float x) const |
draw the variables of one of the edges More... | |
void | drawIORegion (cairo_t *) const |
draw notches in the I/O region to indicate dockability of variables there More... | |
void | moveContents (Group &source) |
move all items from source to this More... | |
IORegion::type | inIORegion (float x, float y) const |
void | checkAddIORegion (const ItemPtr &x) |
check if item is a variable and located in an I/O region, and add it if it is More... | |
void | addInputVar () |
void | addOutputVar () |
void | deleteItem (const Item &) |
remove item from group, and also all attached wires. More... | |
void | deleteAttachedWires () override |
delete all attached wires More... | |
void | resizeOnContents () |
adjust position and size of icon to just cover contents More... | |
void | resize (const LassoBox &x) override |
resize this item on the canvas More... | |
ClickType::Type | clickType (float x, float y) const override |
returns the clicktype given a mouse click at x, y. More... | |
bool | higher (const Group &) const |
returns true if this is higher in the heirarchy than the argument this->higher(*this) is false More... | |
unsigned | level () const |
return level in the heirarchy More... | |
const Group & | globalGroup () const |
top level group More... | |
Group & | globalGroup () |
bool | uniqueItems (std::set< void *> &idset) const |
returns true if items appear uniquely within the heirarchy. Note the map structure does not guarantee that an item doesn't appear within another group More... | |
bool | uniqueItems () const |
bool | displayContents () const |
returns whether contents should be displayed. Top level group always displayed More... | |
bool | displayContentsChanged () const |
true if displayContents status changed on this or any contained group last zoom More... | |
void | margins (float &left, float &right) const |
margin sizes to allow space for edge variables. More... | |
std::vector< float > | marginsV () const |
for debugging purposes More... | |
float | computeDisplayZoom () |
void | computeRelZoom () |
float | localZoom () const |
void | setZoom (float factor) |
sets the zoom factor to factor. Recursively set the zoomfactor on contained objects to the computed localzoom More... | |
void | zoom (float xOrigin, float yOrigin, float factor) |
float | edgeScale () const |
scale used to render io variables. Smoothly interpolates between the scale at which internal items are displayed, and the outside zoom factor More... | |
ecolab::array< double > | cBounds () const |
for TCL debugging More... | |
float | rotFactor () const |
scaling factor to allow a rotated icon to fit on the bitmap More... | |
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. More... | |
void | splitBoundaryCrossingWires () |
splits any wires that cross group boundaries More... | |
void | normaliseGroupRefs (const std::shared_ptr< Group > &self) |
fix up subgroup pointers self is a shared pointer ref to this More... | |
void | flipContents () |
rotate all conatined items by 180 degrees More... | |
std::vector< std::string > | accessibleVars () const |
return a list of existing variables a variable in this group could be connected to More... | |
std::vector< std::string > | bookmarkList () |
returns list of bookmark names for populating menu More... | |
void | addBookmarkXY (float dx, float dy, const std::string &name) |
void | addBookmark (const std::string &name) |
void | deleteBookmark (std::size_t i) |
void | gotoBookmark_b (const Bookmark &b) |
void | gotoBookmark (std::size_t i) |
std::string | defaultExtension () const |
return default extension for this group - .mky if no ravels in group, .rvl otherwise More... | |
void | autoLayout () |
automatically lay out items in this group using a graph layout algorithm More... | |
void | randomLayout () |
randomly lay out items in this group More... | |
std::vector< Summary > | summariseGodleys () const |
produce a summary of godley table variables More... | |
void | renameAllInstances (const std::string &valueId, const std::string &newName) |
rename all instances of a variable matching valueId to newName More... | |
ItemPtr | addItem (Item *it, bool inSchema=false) |
add item, ownership is passed More... | |
virtual ItemPtr | addItem (const std::shared_ptr< Item > &, bool inSchema=false) |
![]() | |
std::string | classType () const override |
ItemT * | clone () const override |
void | TCL_obj (classdesc::TCL_obj_t &t, const std::string &d) override |
void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) override |
dummy template definition for use with gui executable More... | |
void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) const override |
void | json_pack (classdesc::json_pack_t &j) const override |
ItemT ()=default | |
ItemT (const ItemT &)=default | |
ItemT (ItemT &&)=delete | |
ItemT & | operator= (const ItemT &)=default |
ItemT & | operator= (ItemT &&)=delete |
![]() | |
Item () | |
virtual std::weak_ptr< Port > | ports (std::size_t i) const |
callback to be run when item deleted from group More... | |
std::size_t | portsSize () const |
number of ports More... | |
float | portX (std::size_t i) |
float | portY (std::size_t i) |
virtual bool | contains (float xx, float yy) const |
bool | contains (const Point &p) const |
void | updateBoundingBox () override |
void | throw_error (const std::string &) const |
mark item on canvas, then throw More... | |
virtual bool | ioVar () const |
indicates this is a group I/O variable More... | |
virtual double | value () const |
current value of output port More... | |
double | rotation () const |
double | rotation (const double &r) |
std::pair< double, bool > | rotationAsRadians () const |
return the rotation as radians, and whether rotation should have additional straight angle added for text that stays upright. More... | |
float | iWidth () const |
float | iWidth (const float &w) |
float | iHeight () const |
float | iHeight (const float &h) |
virtual void | flip () |
rotate icon though 180∘ More... | |
std::string | id () const |
return an id uniquely identifying this item More... | |
virtual float | x () const |
virtual float | y () const |
virtual float | zoomFactor () const |
void | ensureBBValid () const |
float | width () const |
float | height () const |
virtual std::vector< Point > | corners () const |
float | left () const |
float | right () const |
float | top () const |
float | bottom () const |
std::string | bookmarkId () const |
Id of bookmark associated with this. More... | |
void | adjustBookmark () const override |
adjust bookmark list to reflect current configuration More... | |
float | resizeHandleSize () const |
resize handles should be at least a percentage if the icon size (#1025) More... | |
virtual bool | onResizeHandle (float x, float y) const |
virtual bool | inItem (float x, float y) const |
virtual bool | onItem (float x, float y) const |
returns true if (x,y) is on the icon More... | |
virtual void | onMouseDown (float x, float y) |
respond to mouse down events More... | |
virtual void | onMouseUp (float x, float y) |
respond to mouse up events More... | |
virtual bool | onMouseMotion (float x, float y) |
respond to mouse motion events with button pressed More... | |
virtual bool | onMouseOver (float x, float y) |
respond to mouse motion events (hover) without button pressed More... | |
virtual void | onMouseLeave () |
respond to mouse leave events (when mouse leaves item) More... | |
virtual bool | onKeyPress (int keySym, const std::string &utf8, int state) |
respond to key press events More... | |
virtual bool | visible () const |
whether this item is visible on the canvas. More... | |
void | moveTo (float x, float y) |
virtual float | scaleFactor () const |
factor by which item has been resized More... | |
virtual float | scaleFactor (const float &sf) |
void | dummyDraw () const |
draw into a dummy cairo context, for purposes of calculating port positions More... | |
virtual void | displayTooltip (cairo_t *, const std::string &) const |
display tooltip text, eg on mouseover More... | |
virtual void | updateIcon (double t) |
update display after a step() More... | |
Item (const Item &)=default | |
Item & | operator= (const Item &)=default |
virtual | ~Item () |
void | drawPorts (cairo_t *cairo) const |
virtual void | drawResizeHandles (cairo_t *cairo) const |
virtual std::shared_ptr< Port > | closestOutPort (float x, float y) const |
returns closest output port to x,y More... | |
virtual std::shared_ptr< Port > | closestInPort (float x, float y) const |
void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) override |
runs the RESTProcess descriptor suitable for this type More... | |
void | RESTProcess (classdesc::RESTProcess_t &rp, const std::string &d) const override |
virtual void | displayDelayedTooltip (float x, float y) |
enable extended tooltip help message appropriate for mouse at (x,y) More... | |
virtual void | disableDelayedTooltip () |
virtual bool | editorMode () const |
some items have an editor mode attribute More... | |
virtual void | toggleEditorMode () |
virtual Units | units (bool check=false) const |
compute the dimensional units More... | |
Units | checkUnits () const |
perform units consistency checks More... | |
ItemPtr | itemPtrFromThis () const |
return a shared_ptr to this More... | |
virtual void | destroyFrame () |
destroy any popup windows associated with this More... | |
![]() | |
virtual std::string const & | detailedText () const |
virtual std::string const & | detailedText (const std::string &x) |
virtual std::string const & | tooltip () const |
virtual std::string const & | tooltip (const std::string &x) |
virtual | ~NoteBase ()=default |
![]() | |
GroupItems () | |
virtual | ~GroupItems () |
GroupItems (const GroupItems &x) | |
GroupItems & | operator= (const GroupItems &) |
void | clear () |
bool | empty () const |
template<class M , class C > | |
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 a boolean environment to false if not valid C is of signature bool(M::value_type) More... | |
template<class R , class M , class C , class X > | |
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 More... | |
WirePtr | removeWire (const Wire &) |
GroupPtr | removeGroup (const Group &) |
ItemPtr | findItem (const Item &it) const |
finds item within this group or subgroups. Returns null if not found More... | |
GroupPtr | findGroup (const Group &it) const |
finds group within this group or subgroups. Returns null if not found More... | |
WirePtr | findWire (const Wire &it) const |
finds wire within this group or subgroups. Returns null if not found More... | |
template<class C > | |
std::vector< ItemPtr > | findItems (C c) const |
returns list of items matching criterion c More... | |
template<class C > | |
std::vector< WirePtr > | findWires (C c) const |
returns list of wires matching criterion c More... | |
template<class C > | |
std::vector< GroupPtr > | findGroups (C c) const |
returns list of groups matching criterion c More... | |
ItemPtr | addItem (Item *it, bool inSchema=false) |
add item, ownership is passed More... | |
ItemPtr | removeItem (const Item &) |
GroupPtr | addGroup (const std::shared_ptr< Group > &) |
GroupPtr | addGroup (Group *g) |
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 More... | |
WirePtr | addWire (const std::shared_ptr< Wire > &) |
WirePtr | addWire (Wire *w) |
WirePtr | addWire (const std::weak_ptr< Port > &from, const std::weak_ptr< Port > &to) |
std::size_t | numItems () const |
total number of items in this and child groups More... | |
std::size_t | numWires () const |
total number of wires in this and child groups More... | |
std::size_t | numGroups () const |
total number of groups in this and child groups More... | |
void | removeDisplayPlot () |
remove the display plot More... | |
template<class M , class O > | |
bool | recursiveDo (M GroupItems::*map, O op) const |
Perform action heirarchically on elements of map map. If op returns true, the operation terminates. returns true if operation terminates early, false if every element processed. O has signature bool(M, M::const_iterator) More... | |
template<class M , class O > | |
bool | recursiveDo (M GroupItems::*map, O op) |
O has signature bool(M&, M::iterator) More... | |
Public Attributes | |
std::string | title |
float | displayZoom {1} |
computes the zoom at which to show contents, given current contentBounds and width More... | |
float | relZoom {1} |
relative zoom contents of this group are displayed at More... | |
![]() | |
float | m_x =0 |
float | m_y =0 |
position in canvas, or within group More... | |
float | m_sf =1 |
scale factor of item on canvas, or within group More... | |
bool | onResizeHandles =false |
set to true to indicate mouse is ovcaler resize handles More... | |
bool | onBorder =false |
true to indicate mouse hovering over border More... | |
std::string | deleteCallback |
BoundingBox | bb |
canvas bounding box. More... | |
![]() | |
bool | mouseFocus =false |
true if target of a mouseover More... | |
bool | selected =false |
true if selected for cut, copy or group operation More... | |
bool | bookmark =false |
Is this item also a bookmark? More... | |
![]() | |
Items | items |
Groups | groups |
Wires | wires |
std::set< Bookmark > | bookmarks |
std::vector< VariablePtr > | inVariables |
std::vector< VariablePtr > | outVariables |
std::vector< VariablePtr > | createdIOvariables |
classdesc::Exclude< std::weak_ptr< Group > > | self |
weak ref to this More... | |
classdesc::Exclude< std::shared_ptr< PlotWidget > > | displayPlot |
plot widget used for group icon More... | |
Static Public Attributes | |
static SVGRenderer | svgRenderer |
Protected Member Functions | |
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. If no candidate group found, returns nullptr. Weak reference returned, no ownership. More... | |
Group * | minimalEnclosingGroup (float x0, float y0, float x1, float y1, const Item *ignore=nullptr) |
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 scale (aka local zoom) of the contained items, or 1 if the group is empty. More... | |
![]() | |
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 More... | |
WirePtr | addWire (const std::weak_ptr< Port > &from, const std::weak_ptr< Port > &to, const std::vector< float > &coords) |
void | renameVar (const GroupPtr &origGroup, VariableBase &v) |
rename variable so that it maintains most general scope possible More... | |
CLASSDESC_ACCESS (GroupItems) | |
Private Member Functions | |
VariablePtr | addIOVar (const char *) |
Private Attributes | |
bool | m_displayContentsChanged =true |
Friends | |
class | Canvas |
Additional Inherited Members | |
![]() | |
static void | drawSelected (cairo_t *cairo) |
![]() | |
static void | adjustWiresGroup (Wire &w) |
adjust wire's group to be the least common ancestor of its ports More... | |
![]() | |
static void | drawResizeHandle (cairo_t *cairo, double x, double y, double sf, double angle) |
![]() | |
double | m_width =10 |
double | m_height =10 |
ItemPortVector | m_ports |
minsky::Item::MemoisedRotator | memoisedRotator |
|
inline |
Definition at line 249 of file group.h.
References minsky::Item::iHeight(), and minsky::Item::iWidth().
vector< string > minsky::Group::accessibleVars | ( | ) | const |
|
inline |
Definition at line 407 of file group.h.
References addBookmarkXY(), and name().
|
inline |
Definition at line 403 of file group.h.
References minsky::GroupItems::bookmarks, name(), relZoom, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
Referenced by addBookmark(), and addItem().
|
inline |
Definition at line 294 of file group.h.
References addIOVar(), and minsky::GroupItems::inVariables.
|
private |
Definition at line 519 of file group.cc.
References minsky::cminsky(), minsky::to_string(), and minsky::uqName().
Referenced by addInputVar(), and addOutputVar().
ItemPtr minsky::GroupItems::addItem |
add item.
inSchema | - if building a group from schema processing, rather than generally. Does not adjust item position within group if true. |
Definition at line 331 of file group.cc.
|
inline |
add item, ownership is passed
Definition at line 165 of file group.h.
|
inlineoverridevirtual |
add item.
inSchema | - if building a group from schema processing, rather than generally. Does not adjust item position within group if true. |
Reimplemented from minsky::GroupItems.
Definition at line 262 of file group.h.
References addBookmarkXY(), and minsky::GroupItems::addItem().
Referenced by schema3::Minsky::populateGroup().
|
inline |
Definition at line 295 of file group.h.
References addIOVar(), and minsky::GroupItems::outVariables.
string minsky::Group::arguments | ( | ) | const |
argument declaration, to be appended to name() for function declaration
Definition at line 88 of file group.cc.
References MathDAG::SystemOfEquations::getNodeFromVar(), and pyminsky::minsky.
void minsky::Group::autoLayout | ( | ) |
automatically lay out items in this group using a graph layout algorithm
Definition at line 1259 of file group.cc.
References minsky::layoutGroup(), and pyminsky::minsky.
|
inline |
returns list of bookmark names for populating menu
Definition at line 398 of file group.h.
References minsky::GroupItems::bookmarks.
|
inline |
for TCL debugging
Definition at line 369 of file group.h.
References contentBounds().
void minsky::Group::checkAddIORegion | ( | const ItemPtr & | x | ) |
check if item is a variable and located in an I/O region, and add it if it is
Definition at line 550 of file group.cc.
|
overridevirtual |
returns the clicktype given a mouse click at x, y.
Reimplemented from minsky::Item.
Definition at line 910 of file group.cc.
References topMargin.
|
inlineoverridevirtual |
Reimplemented from minsky::Item.
float minsky::Group::computeDisplayZoom | ( | ) |
Definition at line 824 of file group.cc.
References f.
void minsky::Group::computeRelZoom | ( | ) |
Definition at line 851 of file group.cc.
|
protected |
GroupPtr minsky::Group::copy | ( | ) | const |
Make a copy of this as a sibling group (owned by parent). Attempting to copying minsky.model is a null operation.
Definition at line 121 of file group.cc.
GroupPtr minsky::Group::copyUnowned | ( | ) | const |
make a copy of this, that is not owned by any group
Definition at line 129 of file group.cc.
References minsky::asgClonedPort(), and f.
std::string minsky::Group::defaultExtension | ( | ) | const |
return default extension for this group - .mky if no ravels in group, .rvl otherwise
Definition at line 1252 of file group.cc.
|
inlineoverridevirtual |
delete all attached wires
Reimplemented from minsky::Item.
Definition at line 300 of file group.h.
References minsky::GroupItems::inVariables, and minsky::GroupItems::outVariables.
|
inline |
void minsky::Group::deleteItem | ( | const Item & | i | ) |
remove item from group, and also all attached wires.
Definition at line 247 of file group.cc.
References minsky::Minsky::bookmarkRefresh(), pyminsky::minsky, and minsky::Minsky::runItemDeletedCallback().
|
inline |
returns whether contents should be displayed. Top level group always displayed
Definition at line 332 of file group.h.
References relZoom, and minsky::Item::zoomFactor().
Referenced by localZoom().
|
inline |
true if displayContents status changed on this or any contained group last zoom
Definition at line 335 of file group.h.
References m_displayContentsChanged.
|
overridevirtual |
draw this item into a cairo context
Reimplemented from minsky::Item.
Definition at line 924 of file group.cc.
References minsky::flipped(), M_PI, and topMargin.
void minsky::Group::draw1edge | ( | const std::vector< VariablePtr > & | vars, |
cairo_t * | cairo, | ||
float | x | ||
) | const |
draw the variables of one of the edges
Definition at line 1044 of file group.cc.
References M_PI, minsky::Rotate::x(), and minsky::Rotate::y().
void minsky::Group::drawEdgeVariables | ( | cairo_t * | cairo | ) | const |
draw representations of edge variables around group icon
Definition at line 1076 of file group.cc.
void minsky::Group::drawIORegion | ( | cairo_t * | cairo | ) | const |
draw notches in the I/O region to indicate dockability of variables there
Definition at line 1105 of file group.cc.
References minsky::anonymous_namespace{group.cc}::notchY(), and topMargin.
|
inline |
scale used to render io variables. Smoothly interpolates between the scale at which internal items are displayed, and the outside zoom factor
Definition at line 363 of file group.h.
References relZoom, and minsky::Item::zoomFactor().
void minsky::Group::flipContents | ( | ) |
std::string minsky::Group::formula | ( | ) | const |
algebraic formula representing value of first output argument of this group
Definition at line 74 of file group.cc.
References MathDAG::SystemOfEquations::getNodeFromVar(), and pyminsky::minsky.
const Group & minsky::Group::globalGroup | ( | ) | const |
top level group
Definition at line 739 of file group.cc.
References minsky::anonymous_namespace{group.cc}::globalGroup().
Referenced by minsky::Wire::moveIntoGroup().
Group & minsky::Group::globalGroup | ( | ) |
Definition at line 741 of file group.cc.
References minsky::anonymous_namespace{group.cc}::globalGroup().
|
inline |
Definition at line 417 of file group.h.
References minsky::GroupItems::bookmarks, and gotoBookmark_b().
void minsky::Group::gotoBookmark_b | ( | const Bookmark & | b | ) |
Definition at line 1244 of file group.cc.
References minsky::Minsky::canvas, minsky::cminsky(), pyminsky::minsky, minsky::Minsky::model, minsky::Canvas::requestRedraw(), minsky::Bookmark::x, minsky::Bookmark::y, minsky::Bookmark::zoom, and zoom().
Referenced by gotoBookmark(), and minsky::VariableInstanceList::gotoInstance().
bool minsky::Group::higher | ( | const Group & | x | ) | const |
returns true if this is higher in the heirarchy than the argument this->higher(*this) is false
Definition at line 712 of file group.cc.
Referenced by moveContents().
Group::IORegion::type minsky::Group::inIORegion | ( | float | x, |
float | y | ||
) | const |
Definition at line 531 of file group.cc.
References MathDAG::cos(), M_PI, MathDAG::sin(), and topMargin.
unsigned minsky::Group::level | ( | ) | const |
return level in the heirarchy
Definition at line 719 of file group.cc.
|
inline |
Definition at line 351 of file group.h.
References displayContents(), displayZoom, and minsky::Item::zoomFactor().
void minsky::Group::makeSubroutine | ( | ) |
Make all variables not present in outerscope local to this group.
Definition at line 191 of file group.cc.
void minsky::Group::margins | ( | float & | left, |
float & | right | ||
) | const |
margin sizes to allow space for edge variables.
Definition at line 1152 of file group.cc.
Referenced by marginsV().
|
inline |
for debugging purposes
Definition at line 341 of file group.h.
References margins().
|
protected |
returns the smallest group whose icon completely encloses the rectangle given by the argument. If no candidate group found, returns nullptr. Weak reference returned, no ownership.
ignore | - do not return group ignore, even if it encloses the rectangle |
Definition at line 864 of file group.cc.
Referenced by minimalEnclosingGroup().
|
inlineprotected |
Definition at line 230 of file group.h.
References minimalEnclosingGroup().
void minsky::Group::moveContents | ( | Group & | source | ) |
move all items from source to this
no need to move wires, as these are handled above
Definition at line 499 of file group.cc.
References minsky::GroupItems::clear(), minsky::GroupItems::groups, higher(), and minsky::GroupItems::items.
|
inlineoverridevirtual |
Implements minsky::CallableFunction.
Definition at line 241 of file group.h.
References title.
Referenced by addBookmark(), and addBookmarkXY().
|
overridevirtual |
tests that groups are arranged heirarchically without any recurrence
Implements minsky::GroupItems.
Definition at line 649 of file group.cc.
void minsky::Group::normaliseGroupRefs | ( | const std::shared_ptr< Group > & | self | ) |
|
overridevirtual |
evaluate function on arbitrary number of arguments (exprtk support)
Implements minsky::CallableFunction.
Definition at line 50 of file group.cc.
References pyminsky::minsky, and MathDAG::SystemOfEquations::populateEvalOpVector().
void minsky::Group::randomLayout | ( | ) |
randomly lay out items in this group
Definition at line 1265 of file group.cc.
References pyminsky::minsky, and minsky::randomizeLayout().
void minsky::Group::renameAllInstances | ( | const std::string & | valueId, |
const std::string & | newName | ||
) |
rename all instances of a variable matching valueId to newName
Definition at line 1285 of file group.cc.
References minsky::cminsky(), minsky::anonymous_namespace{group.cc}::isGlobal(), pyminsky::minsky, minsky::Minsky::model, minsky::Minsky::requestReset(), minsky::scope(), and minsky::valueId().
|
overridevirtual |
resize this item on the canvas
Reimplemented from minsky::Item.
Definition at line 624 of file group.cc.
References minsky::anonymous_namespace{group.cc}::recentreItems(), minsky::anonymous_namespace{group.cc}::resizeItems(), topMargin, minsky::LassoBox::x0, minsky::LassoBox::x1, minsky::LassoBox::y0, and minsky::LassoBox::y1.
void minsky::Group::resizeOnContents | ( | ) |
adjust position and size of icon to just cover contents
Definition at line 574 of file group.cc.
float minsky::Group::rotFactor | ( | ) | const |
scaling factor to allow a rotated icon to fit on the bitmap
Definition at line 1172 of file group.cc.
References MathDAG::cos(), M_PI, and MathDAG::sqrt().
|
overridevirtual |
returns the variable if point (x,y) is within a I/O variable icon, null otherwise, indicating that the Group has been selected.
Reimplemented from minsky::Item.
Definition at line 1184 of file group.cc.
References minsky::RenderVariable::inImage().
void minsky::Group::setZoom | ( | float | factor | ) |
sets the zoom factor to factor. Recursively set the zoomfactor on contained objects to the computed localzoom
Definition at line 878 of file group.cc.
void minsky::Group::splitBoundaryCrossingWires | ( | ) |
splits any wires that cross group boundaries
Definition at line 424 of file group.cc.
References minsky::anonymous_namespace{group.cc}::globalGroup().
vector< Summary > minsky::Group::summariseGodleys | ( | ) | const |
produce a summary of godley table variables
Definition at line 1271 of file group.cc.
bool minsky::Group::uniqueItems | ( | std::set< void *> & | idset | ) | const |
void minsky::Group::zoom | ( | float | xOrigin, |
float | yOrigin, | ||
float | factor | ||
) |
Definition at line 894 of file group.cc.
References minsky::zoom().
float minsky::Group::displayZoom {1} |
computes the zoom at which to show contents, given current contentBounds and width
extra zoom at which contents are displayed
Definition at line 347 of file group.h.
Referenced by localZoom().
|
private |
Definition at line 222 of file group.h.
Referenced by displayContentsChanged().
float minsky::Group::relZoom {1} |
relative zoom contents of this group are displayed at
Definition at line 348 of file group.h.
Referenced by addBookmarkXY(), displayContents(), and edgeScale().
|
static |
Definition at line 259 of file group.h.
Referenced by minsky::Minsky::setGroupIconResource().
std::string minsky::Group::title |
Definition at line 240 of file group.h.
Referenced by schema3::Item::Item(), and name().