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

#include <SocketBusConnToolFigure.hh>

Inheritance diagram for SocketBusConnToolFigure:
Inheritance graph
Collaboration diagram for SocketBusConnToolFigure:
Collaboration graph

Public Member Functions

 SocketBusConnToolFigure (bool creating)
 
virtual ~SocketBusConnToolFigure ()
 
- Public Member Functions inherited from SocketBusConnFigure
 SocketBusConnFigure ()
 
virtual ~SocketBusConnFigure ()
 
- Public Member Functions inherited from ConnectionFigure
virtual ~ConnectionFigure ()
 
void setSource (Figure *figure)
 
void setTarget (Figure *figure)
 
Figuresource () const
 
Figuretarget () 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
 
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 SocketBusConnFigure
virtual void drawConnection (wxDC *dc)
 
virtual void layoutSelf (wxDC *dc)
 
- Protected Member Functions inherited from ConnectionFigure
 ConnectionFigure ()
 
- Protected Member Functions inherited from Figure
void drawChildren (wxDC *dc)
 
virtual void layoutChildren (wxDC *)
 

Private Member Functions

SocketBusConnToolFigureoperator= (SocketBusConnToolFigure &old)
 Assignment not allowed. More...
 
 SocketBusConnToolFigure (SocketBusConnToolFigure &old)
 Copying not allowed. More...
 

Private Attributes

wxColor color_
 Current color of the connection figure. More...
 

Static Private Attributes

static const wxColor LINE_COLOR_RED = wxColor(255, 0, 0)
 Figure color for connections being removed. More...
 
static const wxColor LINE_COLOR_GREEN = wxColor(0, 200, 0)
 Figure color for connections being removed. More...
 

Additional Inherited Members

- Protected Attributes inherited from ConnectionFigure
Figuresource_
 Source of connection. More...
 
Figuretarget_
 Target of connection. More...
 
- 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-to-bus connection for the connection tool.

Definition at line 45 of file SocketBusConnToolFigure.hh.

Constructor & Destructor Documentation

◆ SocketBusConnToolFigure() [1/2]

SocketBusConnToolFigure::SocketBusConnToolFigure ( bool  creating)

The Constructor.

Definition at line 43 of file SocketBusConnToolFigure.cc.

43  :
45 
46  if (creating) {
48  } else {
50  }
51 }

References color_, LINE_COLOR_GREEN, and LINE_COLOR_RED.

◆ ~SocketBusConnToolFigure()

SocketBusConnToolFigure::~SocketBusConnToolFigure ( )
virtual

The Destructor.

Definition at line 56 of file SocketBusConnToolFigure.cc.

56  {
57 }

◆ SocketBusConnToolFigure() [2/2]

SocketBusConnToolFigure::SocketBusConnToolFigure ( SocketBusConnToolFigure old)
private

Copying not allowed.

Member Function Documentation

◆ drawSelf()

void SocketBusConnToolFigure::drawSelf ( wxDC *  dc)
protectedvirtual

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

Parameters
dcThe device context.

Reimplemented from SocketBusConnFigure.

Definition at line 65 of file SocketBusConnToolFigure.cc.

65  {
66  assert(source_ != NULL && target_ != NULL);
67  wxPen pen = wxPen(color_, 1, wxSOLID);
68  wxBrush brush = wxBrush(color_, wxSOLID);
69  dc->SetPen(pen);
70  dc->SetBrush(brush);
71  drawConnection(dc);
72 }

References assert, color_, SocketBusConnFigure::drawConnection(), ConnectionFigure::source_, and ConnectionFigure::target_.

Here is the call graph for this function:

◆ operator=()

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

Assignment not allowed.

Member Data Documentation

◆ color_

wxColor SocketBusConnToolFigure::color_
private

Current color of the connection figure.

Definition at line 65 of file SocketBusConnToolFigure.hh.

Referenced by drawSelf(), and SocketBusConnToolFigure().

◆ LINE_COLOR_GREEN

const wxColor SocketBusConnToolFigure::LINE_COLOR_GREEN = wxColor(0, 200, 0)
staticprivate

Figure color for connections being removed.

Definition at line 62 of file SocketBusConnToolFigure.hh.

Referenced by SocketBusConnToolFigure().

◆ LINE_COLOR_RED

const wxColor SocketBusConnToolFigure::LINE_COLOR_RED = wxColor(255, 0, 0)
staticprivate

Figure color for connections being removed.

Definition at line 60 of file SocketBusConnToolFigure.hh.

Referenced by SocketBusConnToolFigure().


The documentation for this class was generated from the following files:
SocketBusConnFigure::SocketBusConnFigure
SocketBusConnFigure()
Definition: SocketBusConnFigure.cc:45
SocketBusConnFigure::drawConnection
virtual void drawConnection(wxDC *dc)
Definition: SocketBusConnFigure.cc:74
ConnectionFigure::target_
Figure * target_
Target of connection.
Definition: ConnectionFigure.hh:58
SocketBusConnToolFigure::LINE_COLOR_RED
static const wxColor LINE_COLOR_RED
Figure color for connections being removed.
Definition: SocketBusConnToolFigure.hh:60
assert
#define assert(condition)
Definition: Application.hh:86
SocketBusConnToolFigure::LINE_COLOR_GREEN
static const wxColor LINE_COLOR_GREEN
Figure color for connections being removed.
Definition: SocketBusConnToolFigure.hh:62
SocketBusConnToolFigure::color_
wxColor color_
Current color of the connection figure.
Definition: SocketBusConnToolFigure.hh:65
ConnectionFigure::source_
Figure * source_
Source of connection.
Definition: ConnectionFigure.hh:56