kivio

kivio_stencil_spawner.h
1/*
2 * Kivio - Visual Modelling and Flowcharting
3 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef KIVIO_STENCIL_SPAWNER_H
20#define KIVIO_STENCIL_SPAWNER_H
21
22#include <tqstring.h>
23#include <tqpixmap.h>
24#include <tqdom.h>
25#include <tqobject.h>
26
27class TQPainter;
28class TQRect;
29class KivioStencilSpawnerInfo;
30class KivioStencilSpawnerSet;
31class KivioStencil;
32
33class KivioStencilSpawner
34{
35protected:
36 TQString m_fileName;
37 TQPixmap m_icon;
38 KivioStencilSpawnerSet *m_pSet;
39 KivioStencilSpawnerInfo *m_pInfo;
40
41 // Default width and height
42 float m_defWidth, m_defHeight;
43
44public:
45 KivioStencilSpawner( KivioStencilSpawnerSet * );
46 virtual ~KivioStencilSpawner();
47
48 virtual bool load( const TQString & );
49 virtual bool loadXML( const TQString &, TQDomDocument & );
50 virtual TQDomElement saveXML( TQDomDocument & );
51
52 virtual KivioStencil *newStencil();
53 virtual KivioStencil *newStencil(const TQString& args);
54
55 virtual TQString fileName() { return m_fileName; }
56 virtual KivioStencilSpawnerSet *set() { return m_pSet; }
57 virtual KivioStencilSpawnerInfo *info() { return m_pInfo; }
58
59 virtual float defWidth() { return m_defWidth; }
60 virtual float defHeight() { return m_defHeight; }
61
62 virtual TQPixmap *icon() { return &m_icon; }
63
64
65// virtual void drawIcon( TQPainter *, TQRect *, bool );
66};
67
68#endif
69
70