2
// --------------------------------------------------------------------
3
// Overlay for creating IpeText objects
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2004 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.
32
#ifndef IPECREATETEXT_H
33
#define IPECREATETEXT_H
37
#include "ipeoverlay.h"
38
#include "ipedlgtext.h"
40
// --------------------------------------------------------------------
42
class IpeDialogCreateText : public IpeDlgCreateText {
45
IpeDialogCreateText(QWidget* parent, QString caption,
46
QString label, QString &data);
48
virtual void UpdateData();
49
virtual void FlushLeft();
54
// --------------------------------------------------------------------
56
class IpeCreateText : public IpeOverlay {
58
enum TMode { ELabel, EMath, EMinipage };
60
static void New(QMouseEvent *ev, IpeCanvas *canvas,
61
IpeOverlayServices *services,
62
TMode mode, IpeRect *rect = 0, const char *init = 0);
63
static bool Edit(IpeText *obj, const IpeStyleSheet *sheet);
65
IpeCreateText(QMouseEvent *ev, IpeCanvas *canvas, IpeOverlayServices *services);
67
virtual void Draw(QPaintEvent *ev, QPainter *painter) const;
68
virtual void MousePress(QMouseEvent *ev);
69
virtual void MouseMove(QMouseEvent *ev);
72
IpeOverlayServices *iServices;
76
// --------------------------------------------------------------------
78
class IpeTextWidthChanger : public IpeOverlay {
80
IpeTextWidthChanger(IpeCanvas *canvas, IpeText *text);
82
virtual void Draw(QPaintEvent *ev, QPainter *painter) const;
83
virtual void MousePress(QMouseEvent *ev);
84
virtual void MouseRelease(QMouseEvent *ev);
85
virtual void MouseMove(QMouseEvent *ev);
94
// --------------------------------------------------------------------