28 struct IntOpAccessor:
public ecolab::TCLAccessor<minsky::IntOp, std::string>
31 class IntOp:
public ItemT<IntOp, Operation<minsky::OperationType::integrate>>,
51 ~IntOp() {Item::removeControlledItems();}
60 std::weak_ptr<Port>
ports(std::size_t i)
const override {
67 {
return intVar->valueId();}
69 void draw(cairo_t*)
const override;
75 bool onKeyPress(
int keySym,
const std::string& utf8,
int state)
override {
76 if (
intVar)
return intVar->onKeyPress(keySym, utf8, state);
86 void pack(classdesc::pack_t&
x,
const std::string& d)
const override;
87 void unpack(classdesc::unpack_t&
x,
const std::string& d)
override;
89 using Item::removeControlledItems;
represents items that have been selected
CLASSDESC_ACCESS(IntOp)
integration variable associated with this op.
IntOp & operator=(const IntOp &x)
std::string valueId() const
std::string description() const
name of the associated integral variable
represents rectangular region of a lasso operation
void insertControlled(Selection &selection) override
void resize(const LassoBox &b) override
resize this item on the canvas
ItemT< IntOp, Operation< minsky::OperationType::integrate > > Super
void pack(classdesc::pack_t &x, const std::string &d) const override
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
represents the units (in sense of dimensional analysis) of a variable.
VariablePtr intVar
return reference to integration variable
void removeControlledItems(minsky::GroupItems &) override
void draw(cairo_t *) const override
draw this item into a cairo context
bool toggleCoupled()
toggles coupled state of integration variable. Only valid for integrate
void unpack(classdesc::unpack_t &x, const std::string &d) override
virtual std::weak_ptr< Port > ports(std::size_t i) const
callback to be run when item deleted from group
std::weak_ptr< Port > ports(std::size_t i) const override
callback to be run when item deleted from group
static constexpr float intVarOffset
bool onKeyPress(int keySym, const std::string &utf8, int state) override
respond to key press events
Units units(bool) const override
compute the dimensional units