FLTK 1.5.0
|
Static Public Member Functions | |
static int | add_scheme_name (const char *name) |
Add a scheme name to the list of known schemes. More... | |
static const char ** | names () |
Return a list of all known scheme names. More... | |
static int | num_schemes () |
Return the number of currently registered schemes. More... | |
|
static |
Add a scheme name to the list of known schemes.
This method is public in FLTK 1.4.0 because derived classes of Fl_Scheme are not yet implemented. Thus, users implementing their own schemes can use this method to add the scheme name to the list of known schemes which is for instance used in Fl_Scheme::names().
protected
method or it will no longer do anything (kept only for ABI reasons).The new scheme name must consist of valid ASCII characters as described below:
'a'
- 'z'
'0'
- '9'
"$+_."
(w/o the quotes).The name must not be longer than 12 ASCII characters (bytes). The new scheme name is added to the end of the unordered list.
The given scheme name
is copied and may be freed directly after the call to add_scheme_name().
[in] | name | New scheme name |
0 | Scheme name already exists |
-1 | Invalid character(s) in name |
-2 | The name is too long |
|
static |
Return a list of all known scheme names.
This list is only valid until a new scheme is added or one is removed. It is possible that scheme names are appended to the list during the runtime of the program but schemes can't be removed.
Getting the list of known schemes can be useful to populate a menu of scheme choices to let the user select a scheme. You should process the names immediately and you should never store a pointer to the list or any individual name for later reference because the location of the list can be changed (reallocated) when schemes are added.
The list of scheme names is nul-terminated.
|
inlinestatic |
Return the number of currently registered schemes.