OpenASIP
2.0
|
#include <ContentsFigure.hh>
Public Member Functions | |
ContentsFigure () | |
virtual | ~ContentsFigure () |
virtual void | addChild (Figure *child) |
Public Member Functions inherited from Figure | |
Figure () | |
virtual | ~Figure () |
wxPoint | location () const |
void | setLocation (wxPoint point) |
void | setX (int x) |
void | setY (int y) |
void | setPreferredX (int x) |
bool | xSet () const |
void | clearXSetFlag () |
virtual wxRect | bounds () const |
virtual wxRect | virtualBounds () const |
void | setBounds (wxSize bounds) |
void | setWidth (int width) |
void | setHeight (int height) |
int | childCount () const |
Figure * | child (int index) const |
virtual void | layout (wxDC *dc) |
void | highlight (const wxColour &colour) |
void | clearHighlight () |
void | setOptions (MachineCanvasOptions *options) |
MachineCanvasOptions * | options () |
Protected Member Functions | |
virtual void | layoutSelf (wxDC *) |
virtual void | layoutChildren (wxDC *) |
virtual void | draw (wxDC *dc) |
Protected Member Functions inherited from Figure | |
virtual void | drawSelf (wxDC *dc) |
void | drawChildren (wxDC *dc) |
Private Member Functions | |
ContentsFigure & | operator= (ContentsFigure &old) |
Assignment not allowed. More... | |
ContentsFigure (ContentsFigure &old) | |
Copying not allowed. More... | |
Private Attributes | |
UnitContainerFigure * | units_ |
Contains all the units. More... | |
BusContainerFigure * | buses_ |
Contains all the buses. More... | |
SocketContainerFigure * | sockets_ |
Contains all the sockets. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Figure | |
wxPoint | location_ |
Top-left location of the Figure's bounding rectangle. More... | |
wxSize | size_ |
wxSize of the Figure's bounding rectangle. More... | |
wxSize | minSize_ |
Figure's minimum size. More... | |
std::vector< Figure * > | children_ |
Figure's children. More... | |
bool | xSet_ |
Tells if x-coordinate has been fixed. More... | |
bool | laidOut_ |
Tells whether the Figure and its children have been laid out or not. More... | |
bool | drawn_ |
Tells whether the Figure and its children have been drawn or not. More... | |
wxColour | highlight_ |
Highlight colour. More... | |
bool | highlighted_ |
Tells if the figure is highlighted. More... | |
MachineCanvasOptions * | options_ |
Options which are used for customizing figures. More... | |
Figure of a container EditPart for the whole machine.
Definition at line 49 of file ContentsFigure.hh.
ContentsFigure::ContentsFigure | ( | ) |
|
virtual |
|
private |
Copying not allowed.
|
virtual |
Overloaded implementation allows only addition of certain types of Figures for layout purposes.
These are UnitContainerFigure, BusContainerFigure and SocketContainerFigure.
figure | Child figure to add. |
Reimplemented from Figure.
Definition at line 68 of file ContentsFigure.cc.
References Figure::addChild(), assert, buses_, sockets_, and units_.
|
protectedvirtual |
Draws figure on a given device context.
Figure::draw() is overridden to enseure that the containers are drawn in the correct order. (sockets over busses)
dc | Device context to draw figures on. |
Reimplemented from Figure.
Definition at line 104 of file ContentsFigure.cc.
References buses_, Figure::draw(), sockets_, and units_.
|
protectedvirtual |
Lays out the subcontainers.
dc | Device context. |
Reimplemented from Figure.
Definition at line 122 of file ContentsFigure.cc.
References Figure::bounds(), MachineCanvasLayoutConstraints::BUS_MIN_WIDTH, MachineCanvasLayoutConstraints::BUS_SPACE, buses_, MachineCanvasLayoutConstraints::CONNECTIONS_SPACE, Figure::layout(), Figure::location_, Figure::setHeight(), Figure::setLocation(), Figure::setWidth(), sockets_, units_, MachineCanvasLayoutConstraints::VIEW_LEFT_MARGIN, and MachineCanvasLayoutConstraints::VIEW_MARGIN.
|
protectedvirtual |
Calculates and sets the size of the container.
Depends on the sizes of the child containers: height will be equal to the size of the unit container plus the height of the socket or the bus container, whichever is higher. Width will be equal to the width of the unit container, or the socket container if it is wider.
Reimplemented from Figure.
Definition at line 191 of file ContentsFigure.cc.
References Figure::bounds(), buses_, MachineCanvasLayoutConstraints::CONNECTIONS_SPACE, Figure::size_, sockets_, units_, and MachineCanvasLayoutConstraints::VIEW_MARGIN.
|
private |
Assignment not allowed.
|
private |
Contains all the buses.
Definition at line 69 of file ContentsFigure.hh.
Referenced by addChild(), draw(), layoutChildren(), and layoutSelf().
|
private |
Contains all the sockets.
Definition at line 71 of file ContentsFigure.hh.
Referenced by addChild(), draw(), layoutChildren(), and layoutSelf().
|
private |
Contains all the units.
Definition at line 67 of file ContentsFigure.hh.
Referenced by addChild(), draw(), layoutChildren(), and layoutSelf().