class GShape : public Shape

(abstract) graphical shape class, superclass of box, ellipse, line etc.

Inheritance:


Public Methods

GShape (ShapeView *v, Grafport *g, int x, int y)
constructor, creates shape at position (x,y).
GShape (const GShape &)
virtual ~GShape ()
void Draw ()
void Undraw ()
virtual void DrawShape ()
draw the shape.
virtual void UndrawShape ()
virtual void DrawTextShapes ()
virtual void UndrawTextShapes ()
virtual void UpdateNameString (const string *s)
update string of name text shape and redraw.
void SetNameString (const string *s)
const string* GetNameString ()
TextShape* GetName () const
void SetTextShape ()
virtual void SetSelect (bool s)
select this shape and its text shapes are selected.
unsigned GetLineWidth () const
void SetLineWidth (unsigned n)
void UpdateLineWidth (unsigned n)
LineStyle::Type GetLineStyle () const
void SetLineStyle (LineStyle::Type x)
void UpdateLineStyle (LineStyle::Type x)
const string* GetTextColor () const
void UpdateTextColor (const string *c)
virtual TextShape* HitTextShape (int x, int y)
Returns if (x,y) is in name, and if so returns name.
bool HasTextShape (TextShape *t) const
return if it has t as one of the text shapes.
virtual int GetLeftMost () const
refinements of those shape members.
virtual int GetTopMost () const
virtual int GetRightMost () const
virtual int GetBottomMost () const
bool IsFixedName ()
void SetFixedName (bool b)
void SetGrafport (Grafport *g)
set grafport of itself and its text shapes.
void SetView (ShapeView *v)
set view of itself and its text shapes.
virtual void UpdateFont (XFont *ft)
update font and redraw.
virtual void UpdateAlignment (TextAlign::Type alignment)
update text alignments and redraw.
TextShape* ChooseTextShape (int, int)
return a text shape near (x,y).
virtual void NotifyTextMove (TextShape *)
react on movement of some text shape.
XFont* GetFont () const
return font of the textshapes (all textshapes have same font).
TextAlign::Type GetAlignment () const
bool HasNameString (const string *s, bool c1, bool c2) const
return if name text shape contains 's'.
bool HasString (const string *s, bool c1, bool c2) const
return if some text shape contains 's'.
bool HasString (const string *s, bool cI, bool aS, List<TextShape *> *l)
put all textshapes containing 's' in the list l.
bool CheckReferences ()
Check also that name reference is ok.

Protected Methods

virtual void SetFont (XFont *ft)
set fonts of text shapes.
virtual void SetTextColor (const string *c)
set color of text shapes.
void WriteGraphicsPart (OutputFile *ofile)
write line width and style to file.
bool ReadGraphicsPart (InputFile *ifile, double format)
read line width and style from file.
void WriteTextPart (OutputFile *ofile)
write font and alignment to file.
bool ReadTextPart (InputFile *ifile, double format)
read and parse font and alignment from file.
void SetDrawAttributes ()
virtual void SetAlignment (TextAlign::Type a)
set alignments of text shapes.
void SnapPosition ()
snap at position and text shapes are moved with.
void SnapTopleft ()
snap at topleft and text shapes are moved with.

Inherited from Shape:

Public Fields

static const int MIN_HEIGHT
static const int MIN_WIDTH
static const int HANDLE_WIDTH

Public Methods

bool IsShape() const
virtual bool IsTextShape() const
virtual Shape* Clone()
virtual void UpdatePosition(const Point *position, bool snap=True)
virtual void UpdateSize(int w, int h)
virtual void UpdateMove(const Point *delta)
virtual void UpdateSelect(bool s)
virtual void UpdateFirstSelect(bool s)
virtual void UpdateColor(string *color)
virtual void SetFirstSelect(bool s)
bool IsFirstSelected() const
void SetVisible(bool s)
void SetSubject(Subject *s)
Subject* GetSubject() const
ShapeView* GetView() const
void SetColor(const string *c)
const string* GetColor() const
virtual void Move(const Point *delta)
virtual void AdjustSize()
virtual void DrawOutLine(const Point *center)
virtual Point GiveSnp(Point) const
virtual Point GiveSnp(Point, int, int, int &)
virtual Point GiveOrthoSnp(Point to) const
void SetHandles(int n)
virtual int HitHandles(int x, int y)
virtual bool ContainsPt(int x, int y)
const Point* GetPosition() const
const Point* GetTopLeft() const
bool IsSelected() const
bool IsVisible() const
bool IsDuplicate() const
int GetWidth() const
int GetHeight() const
virtual void DrawDuplicate()
void UndrawDuplicate()
void SetDuplicate(bool b)
void UpdateDuplicate(bool b)
virtual bool IsLine() const
void WriteMembers(OutputFile *ofile)
bool ReadMembers(InputFile *f, double format)
virtual bool SetAssocSubject(AssocList *)
bool SetAssocView(AssocList *)
virtual bool InTextArea(int x, int y)
virtual void MoveRaw(const Point *delta)

Protected Fields

static const int MIN_HANDLES

Protected Methods

Grafport* GetGrafport() const
void SetOutlineAttributes()
virtual void SetSize(int w, int h)
virtual void SetPosition(const Point *position, bool snap=True)
void SetWidth(int w)
void SetHeight(int h)
void SetNrHandles(int n)
DiagramViewer* GetViewer() const
void PositiveCoord(const Point*)
virtual void DrawSelect()
virtual void DrawGraySelect()
virtual void UndrawSelect()
virtual void UndrawGraySelect()
void SetTopLeft(const Point *topLeft)
virtual void SetPositionHandles()
void ForcePosition(const Point *position)

Inherited from Thing:

Public Classes

enum AssocType

Public Methods

unsigned long GetId()
void SetId(unsigned long val)
virtual bool IsSubject() const
virtual bool IsView() const
virtual int GetClassType() const
void Write(OutputFile *ofile)
virtual bool SetReferences(AssocList *)

Documentation

(abstract) graphical shape class, superclass of box, ellipse, line etc.
GShape(ShapeView *v, Grafport *g, int x, int y)
constructor, creates shape at position (x,y).

GShape(const GShape &)

virtual ~GShape()

void Draw()

void Undraw()

virtual void DrawShape()
draw the shape.

virtual void UndrawShape()

virtual void DrawTextShapes()

virtual void UndrawTextShapes()

virtual void UpdateNameString(const string *s)
update string of name text shape and redraw.

void SetNameString(const string *s)

const string* GetNameString()

TextShape* GetName() const

void SetTextShape()

virtual void SetSelect(bool s)
select this shape and its text shapes are selected.

unsigned GetLineWidth() const

void SetLineWidth(unsigned n)

void UpdateLineWidth(unsigned n)

LineStyle::Type GetLineStyle() const

void SetLineStyle(LineStyle::Type x)

void UpdateLineStyle(LineStyle::Type x)

const string* GetTextColor() const

void UpdateTextColor(const string *c)

virtual TextShape* HitTextShape(int x, int y)
Returns if (x,y) is in name, and if so returns name.

bool HasTextShape(TextShape *t) const
return if it has t as one of the text shapes.

virtual int GetLeftMost() const
refinements of those shape members.

virtual int GetTopMost() const

virtual int GetRightMost() const

virtual int GetBottomMost() const

bool IsFixedName()

void SetFixedName(bool b)

void SetGrafport(Grafport *g)
set grafport of itself and its text shapes.

void SetView(ShapeView *v)
set view of itself and its text shapes.

virtual void UpdateFont(XFont *ft)
update font and redraw.

virtual void UpdateAlignment(TextAlign::Type alignment)
update text alignments and redraw.

TextShape* ChooseTextShape(int, int)
return a text shape near (x,y).

virtual void NotifyTextMove(TextShape *)
react on movement of some text shape.

XFont* GetFont() const
return font of the textshapes (all textshapes have same font).

TextAlign::Type GetAlignment() const

bool HasNameString(const string *s, bool c1, bool c2) const
return if name text shape contains 's'.

bool HasString(const string *s, bool c1, bool c2) const
return if some text shape contains 's'.

bool HasString(const string *s, bool cI, bool aS, List<TextShape *> *l)
put all textshapes containing 's' in the list l.

bool CheckReferences()
Check also that name reference is ok.

virtual void SetFont(XFont *ft)
set fonts of text shapes.

virtual void SetTextColor(const string *c)
set color of text shapes.

void WriteGraphicsPart(OutputFile *ofile)
write line width and style to file.

bool ReadGraphicsPart(InputFile *ifile, double format)
read line width and style from file.

void WriteTextPart(OutputFile *ofile)
write font and alignment to file.

bool ReadTextPart(InputFile *ifile, double format)
read and parse font and alignment from file.

void SetDrawAttributes()

virtual void SetAlignment(TextAlign::Type a)
set alignments of text shapes.

void SnapPosition()
snap at position and text shapes are moved with.

void SnapTopleft()
snap at topleft and text shapes are moved with.


Direct child classes:
NodeShape
Line

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de