Minsky
|
#include <phillipsDiagram.h>
Public Member Functions | |
void | requestRedraw () |
void | init () override |
populate phillips diagram from Godley tables in model More... | |
void | clear () |
void | mouseDown (float x, float y) override |
void | mouseUp (float x, float y) override |
void | mouseMove (float x, float y) override |
void | moveTo (float x, float y) override |
move this so that (x,y) is centred More... | |
std::vector< float > | position () const override |
current centre coordinates More... | |
void | startRotatingItem (float x, float y) |
bool | hasScrollBars () const override |
return whether this window has scrollbars (needed for MacOSX). More... | |
![]() | |
const RenderFrameArgs & | frameArgs () const |
~RenderNativeWindow () override | |
void | renderFrame (const RenderFrameArgs &args) |
void | destroyFrame () |
void | draw () |
void | requestRedraw () |
void | macOSXRedraw () |
RenderNativeWindow & | operator= (const RenderNativeWindow &x) |
RenderNativeWindow ()=default | |
RenderNativeWindow (const RenderNativeWindow &)=default | |
![]() | |
virtual void | controlMouseDown (float x, float y) |
virtual void | zoom (double x, double y, double z) |
virtual double | zoomFactor () const |
virtual bool | keyPress (const KeyPressArgs &) |
handle key press over current itemFocus, More... | |
virtual bool | getItemAt (float x, float y) |
item or wire obtained by get*At() calls More... | |
virtual bool | getWireAt (float x, float y) |
item or wire obtained by get*At() calls More... | |
Public Attributes | |
std::map< std::string, PhillipsStock > | stocks |
std::map< std::pair< std::string, std::string >, PhillipsFlow > | flows |
![]() | |
ItemPtr | item |
item or wire obtained by get*At() calls More... | |
WirePtr | wire |
item or wire obtained by get*At() calls More... | |
Private Member Functions | |
bool | redraw (int, int, int width, int height) override |
CLASSDESC_ACCESS (PhillipsDiagram) | |
Private Attributes | |
PhillipsStock * | stockBeingMoved =nullptr |
PhillipsStock * | stockBeingRotated =nullptr |
Exclude< Point > | rotateOrigin |
PhillipsFlow * | flowBeingEdited =nullptr |
int | handleSelected =0 |
float | x =0 |
float | y =0 |
position for panning More... | |
Additional Inherited Members | |
![]() | |
static double | scaleFactor () |
![]() | |
static ecolab::cairo::Colour | backgroundColour {0.8,0.8,0.8,1} |
Definition at line 75 of file phillipsDiagram.h.
|
private |
|
inline |
Definition at line 91 of file phillipsDiagram.h.
|
inlineoverridevirtual |
return whether this window has scrollbars (needed for MacOSX).
Reimplemented from minsky::RenderNativeWindow.
Definition at line 102 of file phillipsDiagram.h.
|
overridevirtual |
populate phillips diagram from Godley tables in model
Reimplemented from minsky::RenderNativeWindow.
Definition at line 97 of file phillipsDiagram.cc.
References minsky::cminsky(), MathDAG::cos(), flows, minsky::GroupItems::items, M_PI, minsky::minsky(), minsky::Minsky::model, minsky::Minsky::pushHistory(), MathDAG::sin(), and stocks.
|
overridevirtual |
Reimplemented from minsky::EventInterface.
Definition at line 182 of file phillipsDiagram.cc.
References flowBeingEdited, flows, handleSelected, minsky::NoteBase::mouseFocus, stockBeingMoved, stockBeingRotated, stocks, x, and y.
|
overridevirtual |
Reimplemented from minsky::EventInterface.
Definition at line 212 of file phillipsDiagram.cc.
References minsky::Wire::editHandle(), flowBeingEdited, flows, handleSelected, minsky::Item::moveTo(), requestRedraw(), rotateOrigin, stockBeingMoved, stockBeingRotated, x, and y.
Referenced by mouseUp().
|
overridevirtual |
Reimplemented from minsky::EventInterface.
Definition at line 203 of file phillipsDiagram.cc.
References flowBeingEdited, minsky::minsky(), mouseMove(), minsky::Minsky::pushHistory(), stockBeingMoved, stockBeingRotated, x, and y.
|
inlineoverridevirtual |
move this so that (x,y) is centred
Reimplemented from minsky::EventInterface.
Definition at line 99 of file phillipsDiagram.h.
References requestRedraw(), x, and y.
|
inlineoverridevirtual |
current centre coordinates
Reimplemented from minsky::EventInterface.
Definition at line 100 of file phillipsDiagram.h.
|
overrideprivate |
Definition at line 79 of file phillipsDiagram.cc.
References flows, stocks, x, and y.
|
inline |
Definition at line 88 of file phillipsDiagram.h.
Referenced by mouseMove(), moveTo(), and startRotatingItem().
void minsky::PhillipsDiagram::startRotatingItem | ( | float | x, |
float | y | ||
) |
Definition at line 244 of file phillipsDiagram.cc.
References requestRedraw(), rotateOrigin, stockBeingRotated, stocks, x, and y.
|
private |
Definition at line 82 of file phillipsDiagram.h.
Referenced by mouseDown(), mouseMove(), and mouseUp().
std::map<std::pair<std::string,std::string>, PhillipsFlow> minsky::PhillipsDiagram::flows |
Definition at line 87 of file phillipsDiagram.h.
Referenced by clear(), init(), mouseDown(), mouseMove(), schema3::PhillipsDiagram::PhillipsDiagram(), schema3::PhillipsDiagram::populatePhillipsDiagram(), and redraw().
|
private |
Definition at line 83 of file phillipsDiagram.h.
Referenced by mouseDown(), and mouseMove().
|
private |
Definition at line 81 of file phillipsDiagram.h.
Referenced by mouseMove(), and startRotatingItem().
|
private |
Definition at line 79 of file phillipsDiagram.h.
Referenced by mouseDown(), mouseMove(), and mouseUp().
|
private |
Definition at line 80 of file phillipsDiagram.h.
Referenced by mouseDown(), mouseMove(), mouseUp(), and startRotatingItem().
std::map<std::string, PhillipsStock> minsky::PhillipsDiagram::stocks |
Definition at line 86 of file phillipsDiagram.h.
Referenced by clear(), init(), mouseDown(), schema3::PhillipsDiagram::PhillipsDiagram(), schema3::PhillipsDiagram::populatePhillipsDiagram(), redraw(), and startRotatingItem().
|
private |
Definition at line 84 of file phillipsDiagram.h.
Referenced by mouseDown(), mouseMove(), mouseUp(), moveTo(), position(), redraw(), and startRotatingItem().
|
private |
position for panning
Definition at line 84 of file phillipsDiagram.h.
Referenced by mouseDown(), mouseMove(), mouseUp(), moveTo(), position(), redraw(), and startRotatingItem().