FLTK 1.3.2
Fl_Plugin.H
00001 //
00002 // "$Id: Fl_Plugin.H 6995 2010-01-12 08:48:55Z matt $"
00003 //
00004 // A Plugin system for FLTK, implemented in Fl_Preferences.cxx.
00005 //
00006 // Copyright 2002-2010 by Matthias Melcher.
00007 //
00008 // This library is free software. Distribution and use rights are outlined in
00009 // the file "COPYING" which should have been included with this file.  If this
00010 // file is missing or damaged, see the license at:
00011 //
00012 //     http://www.fltk.org/COPYING.php
00013 //
00014 // Please report all bugs and problems on the following page:
00015 //
00016 //     http://www.fltk.org/str.php
00017 //
00018 
00019 /* \file
00020    Fl_Plugin class . */
00021 
00022 #ifndef Fl_Plugin_H
00023 #  define Fl_Plugin_H
00024 
00025 #  include "Fl_Preferences.H"
00026 
00027 
00061 class FL_EXPORT Fl_Plugin  {
00062   Fl_Preferences::ID id;
00063 public:
00064   Fl_Plugin(const char *klass, const char *name);
00065   virtual ~Fl_Plugin();
00066 };
00067 
00068 
00073 class FL_EXPORT Fl_Plugin_Manager : public Fl_Preferences {
00074 public:
00075   Fl_Plugin_Manager(const char *klass);
00076   ~Fl_Plugin_Manager();
00077   
00080   int plugins() { return groups(); }
00081   Fl_Plugin *plugin(int index);
00082   Fl_Plugin *plugin(const char *name);
00083   Fl_Preferences::ID addPlugin(const char *name, Fl_Plugin *plugin);
00084   
00085   static void removePlugin(Fl_Preferences::ID id);
00086   static int load(const char *filename);
00087   static int loadAll(const char *filepath, const char *pattern=0);
00088 };
00089 
00090 
00091 #endif // !Fl_Preferences_H
00092 
00093 //
00094 // End of "$Id: Fl_Preferences.H 6995 2010-01-12 08:48:55Z matt $".
00095 //