summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-02-27 22:38:25 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-02-27 22:38:25 +0000
commitc35463fdbee1563f7216757ba039cfb89b188897 (patch)
tree19f30bcf09879b180a8348d7750025713eadad15 /src
parent5f1ca6a2b05da2905c7c92916acab165db3164b4 (diff)
Starting to add a GUI to manage the IDE database.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7169 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Preferences.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index 14b254312..15da95ff7 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1858,6 +1858,23 @@ Fl_Plugin *Fl_Plugin_Manager::plugin(int index)
}
/**
+ * \brief Return the address of a plugin by name.
+ */
+Fl_Plugin *Fl_Plugin_Manager::plugin(const char *name)
+{
+ char buf[32];
+ Fl_Plugin *ret = 0;
+ if (groupExists(name)) {
+ Fl_Preferences pin(this, name);
+ pin.get("address", buf, "@0", 32);
+ sscanf(buf, "@%p", &ret);
+ return ret;
+ } else {
+ return 0L;
+ }
+}
+
+/**
* \brief This function adds a new plugin to the databse.
*
* There is no need to call this function explicitly. Every Fl_Plugin constructor