kivio

kivio_plugin_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_PLUGIN_STENCIL_H
20#define KIVIO_PLUGIN_STENCIL_H
21
22class KivioIntraStencilData;
23class KivioStencil;
24class KivioStencilFactory;
25class TQDomDocument;
26
27#include "kivio_stencil_spawner.h"
28#include "kivio_stencil_spawner_info.h"
29#include <tqpixmap.h>
30
31//typedef KivioStencil *(*NewStencilFunc)();
32//typedef TQPixmap *(*GetIconFunc)();
33//typedef KivioStencilSpawnerInfo *(*GetSpawnerInfoFunc)();
34
35
36class KivioPluginStencilSpawner : public KivioStencilSpawner
37{
38protected:
39 KivioStencilFactory *fac;
40 void *m_handle;
41 TQPixmap *m_pIcon;
42 TQString m_filename;
43 KivioStencilSpawnerInfo *m_pSInfo;
44
45 KivioStencil *(*pNewStencil)();
46 TQPixmap *(*pGetIcon)();
47 KivioStencilSpawnerInfo *(*pGetSpawnerInfo)();
48
49public:
50 KivioPluginStencilSpawner( KivioStencilSpawnerSet * );
51 virtual ~KivioPluginStencilSpawner();
52
53 virtual bool load( const TQString & );
54 virtual TQDomElement saveXML( TQDomDocument & );
55
56 virtual KivioStencil *newStencil();
57 virtual KivioStencil *newStencil(const TQString &arg);
58 virtual KivioStencilSpawnerInfo *info();
59
60 virtual TQPixmap *icon() { return m_pIcon; }
61};
62
63#endif