FLTK 1.3.0
Fl_Plugin.H
1 //
2 // "$Id: Fl_Plugin.H 6995 2010-01-12 08:48:55Z matt $"
3 //
4 // A Plugin system for FLTK, implemented in Fl_Preferences.cxx.
5 //
6 // Copyright 2002-2010 by Matthias Melcher.
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
12 //
13 // This library 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 GNU
16 // Library General Public License for more details.
17 //
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 // USA.
22 //
23 // Please report all bugs and problems on the following page:
24 //
25 // http://www.fltk.org/str.php
26 //
27 
28 /* \file
29  Fl_Plugin class . */
30 
31 #ifndef Fl_Plugin_H
32 # define Fl_Plugin_H
33 
34 # include "Fl_Preferences.H"
35 
36 
70 class FL_EXPORT Fl_Plugin {
72 public:
73  Fl_Plugin(const char *klass, const char *name);
74  virtual ~Fl_Plugin();
75 };
76 
77 
82 class FL_EXPORT Fl_Plugin_Manager : public Fl_Preferences {
83 public:
84  Fl_Plugin_Manager(const char *klass);
86 
89  int plugins() { return groups(); }
90  Fl_Plugin *plugin(int index);
91  Fl_Plugin *plugin(const char *name);
92  Fl_Preferences::ID addPlugin(const char *name, Fl_Plugin *plugin);
93 
94  static void removePlugin(Fl_Preferences::ID id);
95  static int load(const char *filename);
96  static int loadAll(const char *filepath, const char *pattern=0);
97 };
98 
99 
100 #endif // !Fl_Preferences_H
101 
102 //
103 // End of "$Id: Fl_Preferences.H 6995 2010-01-12 08:48:55Z matt $".
104 //