22 #ifndef __BLOCKSCHEMA__
23 #define __BLOCKSCHEMA__
63 const string&
name,
const string& color,
vector< point > fInputPoint
input connection points
friend schema * makeBlockSchema(unsigned int inputs, unsigned int outputs, const string &name, const string &color, const string &link)
Build a simple colored blockSchema with a certain number of inputs and outputs, a text to be displaye...
const string fLink
option URL link
void drawText(device &dev)
Draw the text centered on the box.
unsigned int outputs() const
void placeInputPoints()
Computes the input points according to the position and the orientation of the blockSchema.
const string fText
Text to be displayed.
vector< point > fOutputPoint
output connection points
void placeOutputPoints()
Computes the output points according to the position and the orientation of the blockSchema.
virtual void draw(device &dev)
Draw the blockSchema on the device.
virtual void collectTraits(collector &c)
Draw horizontal arrows from the input points to the blockSchema rectangle.
unsigned int inputs() const
A simple rectangular box with a text and inputs and outputs.
virtual point outputPoint(unsigned int i) const
Returns an output point.
blockSchema(unsigned int inputs, unsigned int outputs, double width, double height, const string &name, const string &color, const string &link)
Build a simple colored blockSchema with a certain number of inputs and outputs, a text to be displaye...
void drawInputArrows(device &dev)
Draw horizontal arrows from the input points to the blockSchema rectangle.
void drawOrientationMark(device &dev)
Draw the orientation mark, a small point that indicates the first input (like integrated circuits) ...
virtual point inputPoint(unsigned int i) const
Returns an input point.
const char * name(Symbol *sym)
Returns the name of a symbol.
An abstract block diagram schema.
void collectOutputWires(collector &c)
Draw horizontal line from the blockSchema rectangle to the output points.
void collectInputWires(collector &c)
Draw horizontal arrows from the input points to the blockSchema rectangle.
void drawRectangle(device &dev)
Draw the colored rectangle with the optional link.
virtual void place(double x, double y, int orientation)
Define the graphic position of the blockSchema.
const string fColor
color of the box