summaryrefslogtreecommitdiff
path: root/src/Fl_Preferences.cxx
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-05 21:32:25 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-05 21:32:25 +0500
commitdc39575fb3ef90e5a2689babe7fb335cd88f6727 (patch)
tree24f6cef8f2b558ae6f1f812c75be0c09a53fe417 /src/Fl_Preferences.cxx
parent7d3793ce1d8cb26e7608bf859beca21359cec6e9 (diff)
wip
Diffstat (limited to 'src/Fl_Preferences.cxx')
-rw-r--r--src/Fl_Preferences.cxx67
1 files changed, 0 insertions, 67 deletions
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 <stdlib.h>
#include <stdarg.h>
-#include <string>
-
/*
The format of preferences files is not part of the FLTK specification
and intentionally undocumented in Doxygen. The following documentation is FOR
@@ -965,35 +963,6 @@ char Fl_Preferences::get( const char *key, char *&text, const char *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
reflect if the value was actually stored in the preference file.
@@ -1164,21 +1133,6 @@ char Fl_Preferences::set( const char *key, const void *data, int dsize ) {
}
/**
- 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.
\param[in] key name of 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<std::string> Fl_Plugin_Manager::klass_list() {
- Fl_Preferences p(0, "plugins");
- std::vector<std::string> pm;
- for (int i = 0; i < p.groups(); i++) {
- pm.push_back(p.group(i));
- }
- return pm;
-}