1
//------------------------------------------------------------------------------
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 2000, Vrije Universiteit Amsterdam and University of Twente.
5
// Author: Henk van de Zandschulp (henkz@cs.utwente.nl).
6
// Author: Frank Dehne (frank@cs.vu.nl).
8
// TCM is free software; you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation; either version 2 of the License, or
11
// (at your option) any later version.
13
// TCM is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
18
// You should have received a copy of the GNU General Public License
19
// along with TCM; if not, write to the Free Software
20
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22
//-----------------------------------------------------------------------------
23
#ifndef _T4TLISTLINE_H
24
#define _T4TLISTLINE_H
28
/// line having 4 text shapes at 4 positions.
29
class T4TListLine: public T4Line {
30
/*@Doc: {\large {\bf scope:} Diagram} */
33
T4TListLine(ShapeView *v, Grafport *g, GShape *n1, GShape *n2,
34
List<Point *> *line, bool Curved);
36
T4TListLine(ShapeView *v, Grafport *g, GShape *n1, GShape *n2,
39
T4TListLine(const T4TListLine &);
41
virtual ~T4TListLine();
43
int GetClassType() const {return Code::T4_TLIST_LINE;}
45
/// see T4Line. Holds all text shapes into account.
46
bool InTextArea(int x, int y);
49
TextShape *HitTextShape(int x, int y);
51
TextShape *ChooseTextShape(int x, int y);
53
bool HasTextShape(TextShape *t) const;
56
void SetSelect(bool s);
59
void UpdateTListTextShape(const string *s, unsigned n);
61
/// as line, but all text shapes are considered
62
int GetLeftMost() const;
64
int GetTopMost() const;
66
int GetRightMost() const;
68
int GetBottomMost() const;
71
void WriteMembers(OutputFile *f);
73
bool ReadMembers(InputFile *f, double format);
77
void SetFont(XFont *ft);
79
void SetTextColor(const string *color);
81
void SetAlignment(TextAlign::Type alignment);
84
void SetGrafport(Grafport *g);
86
void SetView(ShapeView *v);
88
bool HasString(const string *s, bool sens, bool sub) const;
90
bool HasString(const string*, bool, bool, List<TextShape *> *);
92
void MoveRaw(const Point *delta);
94
/// calculate position of all text shapes.
95
void CalcPositionTextShapes();
96
/// calculate position of text shapes list.
97
void CalcPositionTextShapeList();
100
List<TextShape *> *GetTList() const { return tlist;}
102
void DrawTextShapes();
103
/// draw line+ 4 other text shapes.
108
List <TextShape *> *tlist;
112
void InitTextShapes();