From c35463fdbee1563f7216757ba039cfb89b188897 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 27 Feb 2010 22:38:25 +0000 Subject: 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 --- src/Fl_Preferences.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') 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 @@ -1857,6 +1857,23 @@ Fl_Plugin *Fl_Plugin_Manager::plugin(int index) return ret; } +/** + * \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. * -- cgit v1.2.3