FLTK
Fl_Plugin.H
1 //
2 // A Plugin system for FLTK, implemented in Fl_Preferences.cxx.
3 //
4 // Copyright 2002-2010 by Matthias Melcher.
5 //
6 // This library is free software. Distribution and use rights are outlined in
7 // the file "COPYING" which should have been included with this file. If this
8 // file is missing or damaged, see the license at:
9 //
10 // https://www.fltk.org/COPYING.php
11 //
12 // Please see the following page on how to report bugs and issues:
13 //
14 // https://www.fltk.org/bugs.php
15 //
16 
17 /* \file
18  Fl_Plugin class . */
19 
20 #ifndef Fl_Plugin_H
21 # define Fl_Plugin_H
22 
23 # include "Fl_Preferences.H"
24 
25 
59 class FL_EXPORT Fl_Plugin {
61 public:
62  Fl_Plugin(const char *klass, const char *name);
63  virtual ~Fl_Plugin();
64 };
65 
66 
71 class FL_EXPORT Fl_Plugin_Manager : public Fl_Preferences {
72 public:
73  Fl_Plugin_Manager(const char *klass);
75 
78  int plugins() { return groups(); }
79  Fl_Plugin *plugin(int index);
80  Fl_Plugin *plugin(const char *name);
81  Fl_Preferences::ID addPlugin(const char *name, Fl_Plugin *plugin);
82 
83  static void removePlugin(Fl_Preferences::ID id);
84  static int load(const char *filename);
85  static int loadAll(const char *filepath, const char *pattern=0);
86 };
87 
88 
89 #endif // !Fl_Preferences_H
int groups()
Returns the number of groups that are contained within a group.
Definition: Fl_Preferences.cxx:321
int plugins()
Return the number of plugins in the klass.
Definition: Fl_Plugin.H:78
Fl_Preferences provides methods to store user settings between application starts.
Definition: Fl_Preferences.H:63
Fl_Plugin allows link-time and run-time integration of binary modules.
Definition: Fl_Plugin.H:59
void * ID
Every Fl_Preferences-Group has a uniqe ID.
Definition: Fl_Preferences.H:85
Fl_Plugin_Manager manages link-time and run-time plugin binaries.
Definition: Fl_Plugin.H:71