OpenASIP
2.0
|
#include <BusFigure.hh>
Public Member Functions | |
BusFigure (unsigned int slot) | |
virtual | ~BusFigure () |
virtual wxRect | virtualBounds () const |
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 |
void | setBounds (wxSize bounds) |
void | setWidth (int width) |
void | setHeight (int height) |
virtual void | addChild (Figure *child) |
int | childCount () const |
Figure * | child (int index) const |
virtual void | layout (wxDC *dc) |
virtual void | draw (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 | drawSelf (wxDC *) |
Protected Member Functions inherited from Figure | |
void | drawChildren (wxDC *dc) |
Private Member Functions | |
BusFigure & | operator= (BusFigure &old) |
Assignment not allowed. More... | |
BusFigure (BusFigure &old) | |
Copying not allowed. More... | |
Private Attributes | |
unsigned int | slot_ |
Slot of the bus. More... | |
Static Private Attributes | |
static const wxColour | DEFAULT_COLOUR = wxColour(150, 150, 150) |
Default colour for the figure. 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 bus.
Definition at line 48 of file BusFigure.hh.
BusFigure::BusFigure | ( | unsigned int | slot | ) |
The Constructor.
Definition at line 48 of file BusFigure.cc.
References MachineCanvasLayoutConstraints::BUS_MIN_HEIGHT, MachineCanvasLayoutConstraints::BUS_MIN_WIDTH, Figure::minSize_, and Figure::size_.
|
virtual |
|
private |
Copying not allowed.
|
protectedvirtual |
Draws the Figure of the bus on the given device context if it has no segments, otherwise only the segments are drawn.
dc | The device context. |
Reimplemented from Figure.
Definition at line 128 of file BusFigure.cc.
References Figure::children_, DEFAULT_COLOUR, Figure::location_, Figure::size_, slot_, and WxConversion::toWxString().
|
protectedvirtual |
Lays ouf the segments in a column, spaced evenly.
dc | Device context. |
Reimplemented from Figure.
Definition at line 84 of file BusFigure.cc.
References Figure::children_, Figure::location_, MachineCanvasLayoutConstraints::SEGMENT_SPACE, and Figure::size_.
|
protectedvirtual |
Calculates and sets bus size according to the size of segments.
Reimplemented from Figure.
Definition at line 102 of file BusFigure.cc.
References Figure::children_, MachineCanvasLayoutConstraints::SEGMENT_SPACE, and Figure::size_.
|
virtual |
Returns the virtual bounds of a bus, which are a bit higher than the visible bounds to make selection easier.
Reimplemented from Figure.
Definition at line 67 of file BusFigure.cc.
References Figure::childCount(), Figure::location_, and Figure::size_.
|
staticprivate |
Default colour for the figure.
Definition at line 69 of file BusFigure.hh.
Referenced by drawSelf().
|
private |