OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
UnknownSocketFigure Class Reference

#include <UnknownSocketFigure.hh>

Inheritance diagram for UnknownSocketFigure:
Inheritance graph
Collaboration diagram for UnknownSocketFigure:
Collaboration graph

Public Member Functions

 UnknownSocketFigure ()
 
virtual ~UnknownSocketFigure ()
 
- 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)
 
virtual void addChild (Figure *child)
 
int childCount () const
 
Figurechild (int index) const
 
virtual void layout (wxDC *dc)
 
virtual void draw (wxDC *dc)
 
void highlight (const wxColour &colour)
 
void clearHighlight ()
 
void setOptions (MachineCanvasOptions *options)
 
MachineCanvasOptionsoptions ()
 

Protected Member Functions

virtual void drawSelf (wxDC *dc)
 
- Protected Member Functions inherited from Figure
void drawChildren (wxDC *dc)
 
virtual void layoutSelf (wxDC *)
 
virtual void layoutChildren (wxDC *)
 

Private Member Functions

UnknownSocketFigureoperator= (UnknownSocketFigure &old)
 Assignment not allowed. More...
 
 UnknownSocketFigure (UnknownSocketFigure &old)
 Copying not allowed. More...
 

Static Private Attributes

static const wxColour DEFAULT_COLOUR = wxColour(0, 0, 0)
 Default colour for the figure. More...
 
static const wxColour DEFAULT_BG_COLOUR
 Default background 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...
 
MachineCanvasOptionsoptions_
 Options which are used for customizing figures. More...
 

Detailed Description

Figure of a socket with unknown direction.

Definition at line 46 of file UnknownSocketFigure.hh.

Constructor & Destructor Documentation

◆ UnknownSocketFigure() [1/2]

UnknownSocketFigure::UnknownSocketFigure ( )

◆ ~UnknownSocketFigure()

UnknownSocketFigure::~UnknownSocketFigure ( )
virtual

The Destructor.

Definition at line 53 of file UnknownSocketFigure.cc.

53  {
54 }

◆ UnknownSocketFigure() [2/2]

UnknownSocketFigure::UnknownSocketFigure ( UnknownSocketFigure old)
private

Copying not allowed.

Member Function Documentation

◆ drawSelf()

void UnknownSocketFigure::drawSelf ( wxDC *  dc)
protectedvirtual

Draws the socket's Figure on the given device context.

Parameters
dcThe device context.

Reimplemented from Figure.

Definition at line 62 of file UnknownSocketFigure.cc.

62  {
63  wxPen pen = wxPen(DEFAULT_COLOUR, 1, wxSOLID);
64  dc->SetPen(pen);
65  wxBrush brush = wxBrush(DEFAULT_BG_COLOUR, wxSOLID);
66  dc->SetBrush(brush);
67  dc->DrawRectangle(
68  location_.x, location_.y, size_.GetWidth(), size_.GetHeight());
69 }

References DEFAULT_BG_COLOUR, DEFAULT_COLOUR, Figure::location_, and Figure::size_.

◆ operator=()

UnknownSocketFigure& UnknownSocketFigure::operator= ( UnknownSocketFigure old)
private

Assignment not allowed.

Member Data Documentation

◆ DEFAULT_BG_COLOUR

const wxColour UnknownSocketFigure::DEFAULT_BG_COLOUR
staticprivate
Initial value:
=
wxColour(255, 255, 255)

Default background colour for the figure.

Definition at line 63 of file UnknownSocketFigure.hh.

Referenced by drawSelf().

◆ DEFAULT_COLOUR

const wxColour UnknownSocketFigure::DEFAULT_COLOUR = wxColour(0, 0, 0)
staticprivate

Default colour for the figure.

Definition at line 61 of file UnknownSocketFigure.hh.

Referenced by drawSelf().


The documentation for this class was generated from the following files:
UnknownSocketFigure::DEFAULT_COLOUR
static const wxColour DEFAULT_COLOUR
Default colour for the figure.
Definition: UnknownSocketFigure.hh:61
MachineCanvasLayoutConstraints::SOCKET_WIDTH
static const int SOCKET_WIDTH
Width of a socket.
Definition: MachineCanvasLayoutConstraints.hh:59
UnknownSocketFigure::DEFAULT_BG_COLOUR
static const wxColour DEFAULT_BG_COLOUR
Default background colour for the figure.
Definition: UnknownSocketFigure.hh:63
Figure::size_
wxSize size_
wxSize of the Figure's bounding rectangle.
Definition: Figure.hh:86
Figure::location_
wxPoint location_
Top-left location of the Figure's bounding rectangle.
Definition: Figure.hh:84
Figure::Figure
Figure()
Definition: Figure.cc:44
MachineCanvasLayoutConstraints::SOCKET_HEIGHT
static const int SOCKET_HEIGHT
Height of a socket.
Definition: MachineCanvasLayoutConstraints.hh:61