From dc39575fb3ef90e5a2689babe7fb335cd88f6727 Mon Sep 17 00:00:00 2001 From: maxim nikonov Date: Thu, 5 Feb 2026 21:32:25 +0500 Subject: wip --- src/Fl_Preferences.cxx | 67 -------------------------------------------------- 1 file changed, 67 deletions(-) (limited to 'src/Fl_Preferences.cxx') diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index aa77a4e61..ca0b17916 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -28,8 +28,6 @@ #include #include -#include - /* The format of preferences files is not part of the FLTK specification and intentionally undocumented in Doxygen. The following documentation is FOR @@ -964,35 +962,6 @@ char Fl_Preferences::get( const char *key, char *&text, const char *defaultValue return ( v != defaultValue ); } -/** - Reads an entry from the group. - - A default value must be supplied. The return value indicates if the value was - available (non-zero) or the default was used (0). NUL characters in std::string - are treated as the end of the text. - - \param[in] key name of entry - \param[out] value returned from preferences or default value if none was set - \param[in] defaultValue default value to be used if no preference was set - \return 0 if the default value was used - */ -char Fl_Preferences::get( const char *key, std::string &value, const std::string &defaultValue ) { - const char *v = node->get( key ); - if (v) { - if ( strchr( v, '\\' ) ) { - char *text = decodeText( v ); - value = text; - ::free(text); - } else { - value = v; - } - return 1; - } else { - value = defaultValue; - return 0; - } -} - /** Sets an entry (name/value pair). The return value indicates if there was a problem storing the data in memory. However it does not @@ -1163,21 +1132,6 @@ char Fl_Preferences::set( const char *key, const void *data, int dsize ) { return 1; } -/** - Sets an entry (name/value pair). - - The return value indicates if there was a problem storing the data in memory. - However it does not reflect if the value was actually stored in the preference - file. NUL characters in std::string are treated as the end of the text. - - \param[in] entry name of entry - \param[in] value set this entry to value (stops at the first nul character). - \return 0 if setting the value failed - */ -char Fl_Preferences::set( const char *entry, const std::string &value ) { - return set(entry, value.c_str()); -} - /** Returns the size of the value part of an entry. @@ -2119,24 +2073,3 @@ int Fl_Plugin_Manager::loadAll(const char *dirpath, const char *pattern) { return 0; } -/** - Return a list of all plugin klasses that have been registered so far. - The returned strings can be used to crate a manager for the klass of - plugins, which in turn can be used to list plugins for that klass. - ``` - auto kl = Fl_Plugin_Manager::klass_list(); - for (auto &k: kl) { - Fl_Plugin_Manager m { k.c_str() }; - std::cout << m.plugins() << "plugins have registered for klass" << k << std::endl; - } - ``` - \return a copy of a vector of strings - */ -std::vector Fl_Plugin_Manager::klass_list() { - Fl_Preferences p(0, "plugins"); - std::vector pm; - for (int i = 0; i < p.groups(); i++) { - pm.push_back(p.group(i)); - } - return pm; -} -- cgit v1.2.3