Minsky
|
#include <ravelWrap.h>
Public Member Functions | |
CLASSDESC_ACCESS (Ravel) | |
Ravel () | |
void | operator= (const Ravel &) |
Ravel (const Ravel &x) | |
const Ravel * | ravelCast () const override |
Ravel * | ravelCast () override |
double | radius () const |
void | leaveLockGroup () |
void | broadcastStateToLockGroup () const |
void | draw (cairo_t *cairo) const override |
draw this item into a cairo context More... | |
void | resize (const LassoBox &) override |
resize this item on the canvas More... | |
bool | inItem (float x, float y) const override |
void | onMouseDown (float x, float y) override |
respond to mouse down events More... | |
void | onMouseUp (float x, float y) override |
respond to mouse up events More... | |
bool | onMouseMotion (float x, float y) override |
respond to mouse motion events with button pressed More... | |
bool | onMouseOver (float x, float y) override |
respond to mouse motion events (hover) without button pressed More... | |
void | onMouseLeave () override |
respond to mouse leave events (when mouse leaves item) More... | |
Hypercube | hypercube () const |
return hypercube corresponding to the current Ravel state More... | |
void | populateHypercube (const Hypercube &) |
unsigned | maxRank () const |
unsigned | numHandles () const |
size_t | numSliceLabels (size_t axis) const |
number of slice labels along axis axis More... | |
void | setRank (unsigned r) |
adjust output dimensions to first r handles More... | |
void | adjustSlicer (int) |
adjust currently selected handle's slicer More... | |
bool | onKeyPress (int, const std::string &, int) override |
respond to key press events More... | |
void | redistributeHandles () |
redistribute handles according to current state More... | |
void | nextReduction (ravel::Op::ReductionOp op) |
sets the type of the next reduction operation More... | |
void | handleSetReduction (int handle, ravel::Op::ReductionOp op) |
set the reduction type for handle More... | |
int | selectedHandle () const |
current handle mouse is over, or -1 if none More... | |
void | collapseAllHandles (bool collapse=true) |
collapse all handles (applying nextReduction op where appropriate) More... | |
bool | displayFilterCaliper () const |
enable/disable calipers on currently selected handle More... | |
bool | setDisplayFilterCaliper (bool x) |
bool | toggleDisplayFilterCaliper () |
std::vector< std::string > | allSliceLabels () const |
returns all slice labels along the selected handle, in specified order More... | |
std::vector< std::string > | allSliceLabelsAxis (int axis) const |
returns all slice labels along an axis(dimension) identified by its number More... | |
std::vector< std::string > | pickedSliceLabels () const |
returns just the picked slice labels along the handle More... | |
std::vector< std::string > | pickedSliceLabels (int axis) const |
void | pickSliceLabels (int axis, const std::vector< std::string > &pick) |
pick (selected) pick labels More... | |
std::vector< std::string > | handleNames () const |
return all handle names More... | |
Dimension | dimension (int handle) const |
dimension details associated with handle More... | |
void | resortHandleIfDynamic () |
ravel::HandleSort::Order | setHandleSortOrder (ravel::HandleSort::Order, int handle) |
set a given handle sort order More... | |
bool | handleSortableByValue () const |
void | sortByValue (ravel::HandleSort::Order dir) |
Sort handle by value. Only applicable for rank 1 ravels. More... | |
std::string | description () const |
void | setDescription (const std::string &) |
std::string | handleDescription (int handle) const |
return the description field for handle handle. More... | |
void | setHandleDescription (int handle, const std::string &description) |
set the description field for handle More... | |
ravel::RavelState | getState () const |
get the current state of the Ravel More... | |
void | applyState (const ravel::RavelState &state) |
apply the state to the Ravel, leaving data, slicelabels etc unchanged More... | |
void | displayDelayedTooltip (float x, float y) override |
enable extended tooltip help message appropriate for mouse at (x,y) More... | |
void | exportAsCSV (const std::string &filename, bool tabular) const |
export the plotted data as a CSV file More... | |
Units | units (bool) const override |
compute the dimensional units More... | |
bool | editorMode () const override |
indicate whether icon is in editor mode or icon mode More... | |
void | toggleEditorMode () override |
void | joinLockGroup (unsigned) |
ravel::HandleSort::Order | sortOrder () const |
the handle sorting order for currently selected handle More... | |
ravel::HandleSort::Order | setSortOrder (ravel::HandleSort::Order) |
the handle sorting order for currently selected handle More... | |
Dimension::Type | dimensionType () const |
get/set dimension attributes of selected handle, or handle at given index More... | |
Dimension::Type | dimensionType (int) const |
get/set dimension attributes of selected handle, or handle at given index More... | |
std::string | dimensionUnitsFormat () const |
get/set dimension attributes of selected handle, or handle at given index More... | |
std::string | dimensionUnitsFormat (int) const |
get/set dimension attributes of selected handle, or handle at given index More... | |
void | setDimension (Dimension::Type type, const std::string &units) |
void | setDimension (int handleIndex, Dimension::Type type, const std::string &units) |
![]() | |
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 |
![]() | |
Type | type () const override |
void | iconDraw (cairo_t *) const override |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *cairo) const |
visual representation of operation on the canvas More... | |
void | iconDraw (cairo_t *) const |
visual representation of operation on the canvas More... | |
std::size_t | numPorts () const override |
Operation () | |
Operation (const Operation &x) | |
Operation (Operation &&x) | |
Operation & | operator= (const Operation &x) |
Operation & | operator= (Operation &&x) |
std::string | classType () const 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 |
ItemT ()=default | |
ItemT (const ItemT &)=default | |
ItemT (ItemT &&)=delete | |
ItemT & | operator= (const ItemT &)=default |
ItemT & | operator= (ItemT &&)=delete |
![]() | |
const OperationBase * | operationCast () const override |
OperationBase * | operationCast () override |
std::string | portValues () const |
returns a list of values the ports currently have More... | |
bool | multiWire () const |
virtual void | addPorts () |
void | drawUserFunction (cairo_t *cairo) const |
float | scaleFactor () const override |
factor by which item has been resized More... | |
double | value () const override |
current value of output port More... | |
std::vector< std::string > | dimensions () const |
return dimension names of tensor object attached to input if binary op, then the union of dimension names is returned More... | |
![]() | |
bool | onResizeHandle (float x, float y) const override |
void | drawResizeHandles (cairo_t *cairo) const override |
virtual Point | resizeHandleCoords () const |
returns coordinates of the resizer handle More... | |
![]() | |
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... | |
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 | onItem (float x, float y) const |
returns true if (x,y) is on the icon More... | |
virtual void | deleteAttachedWires () |
delete all attached wires More... | |
virtual bool | visible () const |
whether this item is visible on the canvas. More... | |
void | moveTo (float x, float y) |
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 ClickType::Type | clickType (float x, float y) const |
returns the clicktype given a mouse click at x, y. More... | |
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 |
virtual std::shared_ptr< Item > | select (float x, float y) const |
returns the variable if point (x,y) is within a visible variable icon, null otherwise. More... | |
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 | disableDelayedTooltip () |
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 |
Static Public Member Functions | |
static std::vector< unsigned > | lockGroupColours () |
![]() | |
static OperationBase * | create (Type type) |
factory method. More... | |
![]() | |
static void | drawSelected (cairo_t *cairo) |
![]() | |
static std::string | typeName (int type) |
return the symbolic name of type More... | |
static Group | classify (Type t) |
Public Attributes | |
RavelPopup | popup |
popup Ravel control window More... | |
bool | flipped =false |
Dimensions | axisDimensions |
local override of axis dimensionality More... | |
std::shared_ptr< RavelLockGroup > | lockGroup |
group of ravels that move syncronously More... | |
![]() | |
double | arg =1 |
operation argument. For example, the offset used in a difference operator, or binsize in a binning op More... | |
std::string | axis |
axis selector in tensor operations 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... | |
Static Public Attributes | |
static SVGRenderer | svgRenderer |
SVG icon to display when not in editor mode. More... | |
![]() | |
static constexpr float | l =-8 |
static constexpr float | h =12 |
static constexpr float | r =12 |
Private Types | |
using | HandleState = ravel::HandleState |
Private Member Functions | |
std::vector< std::string > | allSliceLabelsImpl (int axis, ravel::HandleSort::Order) const |
Private Attributes | |
const double | moveX =0.5 |
position of the "move" handle, as a proportion of radius More... | |
const double | moveY =0.5 |
const double | moveSz =0.1 |
bool | m_editorMode =false |
indicate whether icon is in editor mode or icon mode More... | |
std::string | explanation |
ravel::HandleSort::Order | previousOrder =ravel::HandleSort::forward |
ravel::RavelState | initState |
used entirely to defer persisted state data until after first load from a variable More... | |
friend | RavelPopup |
ravel::Ravel | wrappedRavel |
ravel::Op::ReductionOp | m_nextReduction =ravel::Op::sum |
Friends | |
struct | SchemaHelper |
Definition at line 55 of file ravelWrap.h.
|
private |
Definition at line 61 of file ravelWrap.h.
minsky::Ravel::Ravel | ( | ) |
Definition at line 63 of file ravelWrap.cc.
References minsky::NoteBase::detailedText(), minsky::GroupItems::items, m_editorMode, minsky::minsky(), minsky::Minsky::model, minsky::NoteBase::tooltip(), and wrappedRavel.
|
inline |
Definition at line 90 of file ravelWrap.h.
References getState().
void minsky::Ravel::adjustSlicer | ( | int | n | ) |
adjust currently selected handle's slicer
Definition at line 240 of file ravelWrap.cc.
References broadcastStateToLockGroup(), resortHandleIfDynamic(), and wrappedRavel.
Referenced by onKeyPress().
vector< string > minsky::Ravel::allSliceLabels | ( | ) | const |
returns all slice labels along the selected handle, in specified order
Definition at line 299 of file ravelWrap.cc.
References wrappedRavel.
vector< string > minsky::Ravel::allSliceLabelsAxis | ( | int | axis | ) | const |
returns all slice labels along an axis(dimension) identified by its number
Definition at line 304 of file ravelWrap.cc.
References minsky::OperationBase::axis, and wrappedRavel.
|
private |
void minsky::Ravel::applyState | ( | const ravel::RavelState & | state | ) |
apply the state to the Ravel, leaving data, slicelabels etc unchanged
preservePositions | if true, do not rotate handles |
Definition at line 535 of file ravelWrap.cc.
References initState, minsky::OperationBase::r, minsky::Item::updateBoundingBox(), and wrappedRavel.
Referenced by collapseAllHandles(), and populateHypercube().
void minsky::Ravel::broadcastStateToLockGroup | ( | ) | const |
Definition at line 570 of file ravelWrap.cc.
References lockGroup.
Referenced by adjustSlicer(), minsky::RavelPopup::mouseOver(), onMouseUp(), and pickSliceLabels().
minsky::Ravel::CLASSDESC_ACCESS | ( | Ravel | ) |
void minsky::Ravel::collapseAllHandles | ( | bool | collapse = true | ) |
collapse all handles (applying nextReduction op where appropriate)
collapse | if true, uncollapse if false |
Definition at line 264 of file ravelWrap.cc.
References applyState(), getState(), minsky::OperationBase::h, m_nextReduction, minsky::minsky(), and minsky::Minsky::requestReset().
string minsky::Ravel::description | ( | ) | const |
Definition at line 425 of file ravelWrap.cc.
References handleDescription(), and wrappedRavel.
Referenced by setDescription().
Dimension minsky::Ravel::dimension | ( | int | handle | ) | const |
dimension details associated with handle
Definition at line 346 of file ravelWrap.cc.
References minsky::cminsky(), minsky::OperationBase::dimensions(), minsky::Minsky::dimensions, and handleDescription().
Referenced by setHandleSortOrder().
Dimension::Type minsky::Ravel::dimensionType | ( | ) | const |
get/set dimension attributes of selected handle, or handle at given index
Definition at line 435 of file ravelWrap.cc.
References selectedHandle().
Dimension::Type minsky::Ravel::dimensionType | ( | int | handleIndex | ) | const |
get/set dimension attributes of selected handle, or handle at given index
Definition at line 440 of file ravelWrap.cc.
References axisDimensions, minsky::cminsky(), minsky::Minsky::dimensions, and handleDescription().
std::string minsky::Ravel::dimensionUnitsFormat | ( | ) | const |
get/set dimension attributes of selected handle, or handle at given index
Definition at line 453 of file ravelWrap.cc.
References selectedHandle().
std::string minsky::Ravel::dimensionUnitsFormat | ( | int | handleIndex | ) | const |
get/set dimension attributes of selected handle, or handle at given index
Definition at line 458 of file ravelWrap.cc.
References axisDimensions, minsky::cminsky(), minsky::OperationBase::dimensions(), minsky::Minsky::dimensions, and handleDescription().
|
overridevirtual |
enable extended tooltip help message appropriate for mouse at (x,y)
Reimplemented from minsky::Item.
Definition at line 548 of file ravelWrap.cc.
References explanation, wrappedRavel, minsky::Item::x(), and minsky::Item::y().
bool minsky::Ravel::displayFilterCaliper | ( | ) | const |
enable/disable calipers on currently selected handle
Definition at line 280 of file ravelWrap.cc.
References minsky::OperationBase::h, and wrappedRavel.
|
overridevirtual |
draw this item into a cairo context
Reimplemented from minsky::OperationBase.
Definition at line 80 of file ravelWrap.cc.
References minsky::Item::displayTooltip(), minsky::Item::drawPorts(), minsky::BottomRightResizerItem::drawResizeHandles(), minsky::Item::drawSelected(), minsky::drawTriangle(), explanation, flipped, minsky::SVGRenderer::height(), lockGroup, m_editorMode, M_PI, minsky::Item::m_ports, minsky::NoteBase::mouseFocus, minsky::Item::onBorder, minsky::OperationBase::r, minsky::SVGRenderer::render(), minsky::NoteBase::selected, svgRenderer, minsky::NoteBase::tooltip(), minsky::SVGRenderer::width(), wrappedRavel, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
|
inlineoverridevirtual |
indicate whether icon is in editor mode or icon mode
Reimplemented from minsky::Item.
Definition at line 218 of file ravelWrap.h.
void minsky::Ravel::exportAsCSV | ( | const std::string & | filename, |
bool | tabular | ||
) | const |
export the plotted data as a CSV file
tabular | - if true, the longest dimension is split across columns as a horizontal dimension |
Definition at line 498 of file ravelWrap.cc.
References minsky::TensorOpFactory::create(), minsky::OperationType::data, minsky::TensorsFromPort::ev, minsky::VariableValue::exportAsCSV(), minsky::VariableType::flow, minsky::ValueVector::flowVars, minsky::Item::itemPtrFromThis(), minsky::Item::m_ports, minsky::OperationType::size, minsky::ValueVector::stockVars, minsky::tensorOpFactory, and wrappedRavel.
|
inline |
get the current state of the Ravel
Definition at line 206 of file ravelWrap.h.
Referenced by minsky::RavelLockGroup::broadcast(), collapseAllHandles(), minsky::RavelTensor::operator[](), populateHypercube(), Ravel(), and minsky::RavelTensor::setArgument().
|
inline |
return the description field for handle handle.
Definition at line 189 of file ravelWrap.h.
Referenced by description(), dimension(), dimensionType(), dimensionUnitsFormat(), hypercube(), and setDimension().
|
inline |
|
inline |
set the reduction type for handle
Definition at line 132 of file ravelWrap.h.
References minsky::op.
bool minsky::Ravel::handleSortableByValue | ( | ) | const |
Definition at line 407 of file ravelWrap.cc.
References wrappedRavel.
Hypercube minsky::Ravel::hypercube | ( | ) | const |
return hypercube corresponding to the current Ravel state
Definition at line 182 of file ravelWrap.cc.
References axisDimensions, minsky::cminsky(), minsky::OperationBase::dimensions(), minsky::Minsky::dimensions, minsky::OperationBase::h, handleDescription(), and wrappedRavel.
|
overridevirtual |
Reimplemented from minsky::Item.
Definition at line 147 of file ravelWrap.cc.
References m_editorMode, minsky::OperationBase::r, wrappedRavel, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
void minsky::Ravel::joinLockGroup | ( | unsigned | colour | ) |
Definition at line 586 of file ravelWrap.cc.
References minsky::cminsky(), minsky::Item::itemPtrFromThis(), minsky::GroupItems::items, leaveLockGroup(), lockGroup, minsky::Minsky::model, and minsky::OperationType::ravel.
void minsky::Ravel::leaveLockGroup | ( | ) |
Definition at line 563 of file ravelWrap.cc.
References lockGroup.
Referenced by joinLockGroup().
|
static |
Definition at line 575 of file ravelWrap.cc.
References minsky::cminsky(), minsky::GroupItems::items, minsky::Minsky::model, minsky::OperationBase::r, and minsky::OperationType::ravel.
|
inline |
|
inline |
sets the type of the next reduction operation
Definition at line 130 of file ravelWrap.h.
References minsky::op.
|
inline |
Definition at line 120 of file ravelWrap.h.
Referenced by pickSliceLabels(), and units().
|
inline |
number of slice labels along axis axis
Definition at line 122 of file ravelWrap.h.
Referenced by populateHypercube(), and units().
|
overridevirtual |
respond to key press events
Reimplemented from minsky::Item.
Definition at line 247 of file ravelWrap.cc.
References adjustSlicer(), minsky::minsky(), and minsky::Minsky::requestReset().
Referenced by minsky::RavelPopup::keyPress().
|
overridevirtual |
respond to mouse down events
Reimplemented from minsky::Item.
Definition at line 157 of file ravelWrap.cc.
References wrappedRavel, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
|
inlineoverridevirtual |
respond to mouse leave events (when mouse leaves item)
Reimplemented from minsky::Item.
Definition at line 114 of file ravelWrap.h.
|
overridevirtual |
respond to mouse motion events with button pressed
Reimplemented from minsky::Item.
Definition at line 170 of file ravelWrap.cc.
References wrappedRavel, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
|
overridevirtual |
respond to mouse motion events (hover) without button pressed
Reimplemented from minsky::Item.
Definition at line 176 of file ravelWrap.cc.
References wrappedRavel, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
|
overridevirtual |
respond to mouse up events
Reimplemented from minsky::Item.
Definition at line 163 of file ravelWrap.cc.
References broadcastStateToLockGroup(), resortHandleIfDynamic(), wrappedRavel, minsky::Item::x(), minsky::Item::y(), and minsky::Item::zoomFactor().
|
inline |
Definition at line 89 of file ravelWrap.h.
vector< string > minsky::Ravel::pickedSliceLabels | ( | ) | const |
returns just the picked slice labels along the handle
Definition at line 312 of file ravelWrap.cc.
References wrappedRavel.
vector< string > minsky::Ravel::pickedSliceLabels | ( | int | axis | ) | const |
Definition at line 309 of file ravelWrap.cc.
References minsky::OperationBase::axis, and wrappedRavel.
void minsky::Ravel::pickSliceLabels | ( | int | axis, |
const std::vector< std::string > & | pick | ||
) |
pick (selected) pick labels
Definition at line 315 of file ravelWrap.cc.
References minsky::OperationBase::axis, broadcastStateToLockGroup(), minsky::minsky(), numHandles(), minsky::Minsky::requestReset(), and wrappedRavel.
void minsky::Ravel::populateHypercube | ( | const Hypercube & | hc | ) |
Definition at line 204 of file ravelWrap.cc.
References applyState(), getState(), initState, numSliceLabels(), setRank(), and wrappedRavel.
|
inline |
Definition at line 97 of file ravelWrap.h.
|
inlineoverride |
Definition at line 94 of file ravelWrap.h.
|
inlineoverride |
Definition at line 95 of file ravelWrap.h.
|
inline |
|
overridevirtual |
resize this item on the canvas
Reimplemented from minsky::OperationBase.
Definition at line 140 of file ravelWrap.cc.
References minsky::Item::bb, minsky::Item::moveTo(), minsky::BoundingBox::update(), wrappedRavel, minsky::LassoBox::x0, minsky::LassoBox::x1, minsky::LassoBox::y0, minsky::LassoBox::y1, and minsky::Item::zoomFactor().
void minsky::Ravel::resortHandleIfDynamic | ( | ) |
Definition at line 372 of file ravelWrap.cc.
References sortByValue(), and wrappedRavel.
Referenced by adjustSlicer(), and onMouseUp().
|
inline |
current handle mouse is over, or -1 if none
Definition at line 134 of file ravelWrap.h.
Referenced by dimensionType(), dimensionUnitsFormat(), and setDimension().
void minsky::Ravel::setDescription | ( | const std::string & | description | ) |
Definition at line 430 of file ravelWrap.cc.
References description(), and wrappedRavel.
void minsky::Ravel::setDimension | ( | Dimension::Type | type, |
const std::string & | units | ||
) |
if | type does not match global dimension type |
Definition at line 472 of file ravelWrap.cc.
References selectedHandle(), minsky::Operation< OperationType::ravel >::type(), and units().
void minsky::Ravel::setDimension | ( | int | handleIndex, |
Dimension::Type | type, | ||
const std::string & | units | ||
) |
if | type does not match global dimension type |
Definition at line 478 of file ravelWrap.cc.
References axisDimensions, minsky::cminsky(), minsky::OperationBase::dimensions(), minsky::Minsky::dimensions, handleDescription(), minsky::Minsky::imposeDimensions(), minsky::minsky(), minsky::Operation< OperationType::ravel >::type(), and units().
bool minsky::Ravel::setDisplayFilterCaliper | ( | bool | x | ) |
Definition at line 291 of file ravelWrap.cc.
References minsky::OperationBase::h, wrappedRavel, and minsky::Item::x().
|
inline |
ravel::HandleSort::Order minsky::Ravel::setHandleSortOrder | ( | ravel::HandleSort::Order | order, |
int | handle | ||
) |
set a given handle sort order
Definition at line 397 of file ravelWrap.cc.
References dimension(), and wrappedRavel.
Referenced by setSortOrder().
void minsky::Ravel::setRank | ( | unsigned | r | ) |
adjust output dimensions to first r handles
Definition at line 233 of file ravelWrap.cc.
References wrappedRavel.
Referenced by populateHypercube().
ravel::HandleSort::Order minsky::Ravel::setSortOrder | ( | ravel::HandleSort::Order | x | ) |
the handle sorting order for currently selected handle
Definition at line 366 of file ravelWrap.cc.
References setHandleSortOrder(), wrappedRavel, and minsky::Item::x().
void minsky::Ravel::sortByValue | ( | ravel::HandleSort::Order | dir | ) |
Sort handle by value. Only applicable for rank 1 ravels.
dir | direction to sort (forward/reverse, all other cases ignored) |
Definition at line 414 of file ravelWrap.cc.
References minsky::Item::m_ports, minsky::minsky(), minsky::Minsky::requestReset(), and wrappedRavel.
Referenced by resortHandleIfDynamic().
ravel::HandleSort::Order minsky::Ravel::sortOrder | ( | ) | const |
the handle sorting order for currently selected handle
Definition at line 355 of file ravelWrap.cc.
References minsky::OperationBase::h, and wrappedRavel.
|
inline |
Definition at line 142 of file ravelWrap.h.
|
inlineoverridevirtual |
Reimplemented from minsky::Item.
Definition at line 219 of file ravelWrap.h.
|
overridevirtual |
compute the dimensional units
check | - if true, then perform consistency checks |
if | check=true and dimensions inconsistent |
Reimplemented from minsky::OperationBase.
Definition at line 516 of file ravelWrap.cc.
References minsky::OperationBase::h, minsky::Item::m_ports, numHandles(), numSliceLabels(), and wrappedRavel.
Referenced by setDimension().
|
friend |
Definition at line 75 of file ravelWrap.h.
Dimensions minsky::Ravel::axisDimensions |
local override of axis dimensionality
Definition at line 100 of file ravelWrap.h.
Referenced by dimensionType(), dimensionUnitsFormat(), hypercube(), and setDimension().
|
private |
Definition at line 68 of file ravelWrap.h.
Referenced by displayDelayedTooltip(), and draw().
bool minsky::Ravel::flipped =false |
Definition at line 85 of file ravelWrap.h.
Referenced by draw().
|
private |
used entirely to defer persisted state data until after first load from a variable
Definition at line 73 of file ravelWrap.h.
Referenced by applyState(), minsky::SchemaHelper::initHandleState(), and populateHypercube().
std::shared_ptr<RavelLockGroup> minsky::Ravel::lockGroup |
group of ravels that move syncronously
Definition at line 103 of file ravelWrap.h.
Referenced by broadcastStateToLockGroup(), draw(), joinLockGroup(), and leaveLockGroup().
|
private |
indicate whether icon is in editor mode or icon mode
Definition at line 66 of file ravelWrap.h.
|
private |
Definition at line 81 of file ravelWrap.h.
Referenced by collapseAllHandles().
|
private |
Definition at line 63 of file ravelWrap.h.
|
private |
position of the "move" handle, as a proportion of radius
Definition at line 63 of file ravelWrap.h.
|
private |
Definition at line 63 of file ravelWrap.h.
RavelPopup minsky::Ravel::popup |
popup Ravel control window
Definition at line 84 of file ravelWrap.h.
|
private |
Definition at line 69 of file ravelWrap.h.
|
private |
Definition at line 76 of file ravelWrap.h.
|
static |
SVG icon to display when not in editor mode.
Definition at line 83 of file ravelWrap.h.
Referenced by draw(), and minsky::Minsky::setRavelIconResource().
|
private |
Definition at line 80 of file ravelWrap.h.
Referenced by adjustSlicer(), allSliceLabels(), allSliceLabelsAxis(), applyState(), description(), displayDelayedTooltip(), displayFilterCaliper(), draw(), exportAsCSV(), handleSortableByValue(), hypercube(), inItem(), minsky::RavelPopup::mouseDown(), minsky::RavelPopup::mouseLeave(), minsky::RavelPopup::mouseMove(), minsky::RavelPopup::mouseOver(), minsky::RavelPopup::mouseUp(), onMouseDown(), onMouseMotion(), onMouseOver(), onMouseUp(), pickedSliceLabels(), pickSliceLabels(), populateHypercube(), Ravel(), minsky::RavelPopup::redraw(), resize(), resortHandleIfDynamic(), setDescription(), setDisplayFilterCaliper(), setHandleSortOrder(), setRank(), setSortOrder(), sortByValue(), sortOrder(), and units().