2
// --------------------------------------------------------------------
3
// Popup menu with object attributes
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2007 Otfried Cheong
10
Ipe is free software; you can redistribute it and/or modify it
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
As a special exception, you have permission to link Ipe with the
16
CGAL library and distribute executables, as long as you follow the
17
requirements of the Gnu General Public License in regard to all of
18
the software in the executable aside from CGAL.
20
Ipe is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23
License for more details.
25
You should have received a copy of the GNU General Public License
26
along with Ipe; if not, you can find it at
27
"http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35
#include "ipevisitor.h"
43
// --------------------------------------------------------------------
47
class IpeOverlayServices;
50
class AttributePopup : public QObject, public IpeVisitor {
53
AttributePopup(IpePage::iterator it, IpePage *page,
54
IpeCanvas *canvas, int layer,
55
const IpeStyleSheet *sheet,
56
const IpeAttributeSeq *syms,
57
IpeOverlayServices *services);
59
virtual void VisitGroup(const IpeGroup *obj);
60
virtual void VisitPath(const IpePath *obj);
61
virtual void VisitMark(const IpeMark *obj);
62
virtual void VisitText(const IpeText *obj);
63
virtual void VisitImage(const IpeImage *obj);
64
virtual void VisitReference(const IpeReference *obj);
69
void SetStroke(int id);
71
void SetLineWidth(int id);
72
void SetDashStyle(int id);
73
void SetTextSize(int id);
74
void SetTextStyle(int id);
75
void SetMarkShape(int id);
76
void SetMarkSize(int id);
77
void SetForwardArrow(int id);
78
void SetBackwardArrow(int id);
79
void SetLayer(int id);
80
void setPinned(int id);
83
void SetWindRule(int id);
84
void SetTransformable(int id);
85
void SetVAlign(int id);
86
void SetHAlign(int id);
87
void SetParagraph(int id);
96
QString String(IpeAttribute attr) const;
97
void connect(IpeAction *a, const char *receiver);
99
void SetTitle(QString str);
100
void AddComment(QString str);
101
void InsertLayer(int layer);
102
void InsertColor(QString str, IpeAttribute color, bool fill = false);
103
void InsertAttribute(QString str, IpeKind kind, IpeAttribute attr);
104
void InsertArrow(QString str, IpeAttribute arr, bool backw);
105
void InsertStrokeStyle(IpeStrokeStyle attr);
106
void insertPinned(IpeObject::TPinned pin);
112
IpeOverlayServices *iServices;
113
const IpeStyleSheet *iStyleSheet;
114
const IpeAttributeSeq *iSyms;
116
IpePage::iterator iIt;
118
IpePgObject iOriginal;
124
// --------------------------------------------------------------------