FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_Scheme.H
1//
2// Scheme header for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 2022-2023 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17#ifndef FL_Fl_Scheme_H_
18#define FL_Fl_Scheme_H_
19
20#include <FL/Fl.H>
21
22class Fl_Scheme {
23
24private:
25
26 static const char **names_; // registered scheme names
27 static int num_schemes_; // number of registered schemes
28 static int alloc_size_; // number of allocated scheme name entries
29
30protected:
31
32 // const char *name_; // the scheme's name
33
34 // protected constructor - not yet implemented
35 // Fl_Scheme(const char *name);
36
37public:
38
39 // Static methods.
40
41 // Some of these methods will replace the scheme related methods of class Fl,
42 // for instance Fl::scheme() and Fl::is_scheme().
43 // Backwards compatibility must be kept though.
44
45 static const char **names();
46
52 static int num_schemes() {
53 if (!names_) names(); // force initialization
54 return num_schemes_;
55 }
56
57 // Adding a scheme name must be a public static method in FLTK 1.4.0.
58 // This will later be protected or replaced by another method name.
59
60 static int add_scheme_name(const char *name);
61
62}; // class Fl_Scheme
63
64#endif // FL_Fl_Scheme_H_
Fl static class.
Definition Fl_Scheme.H:22
static int num_schemes()
Return the number of currently registered schemes.
Definition Fl_Scheme.H:52
static int add_scheme_name(const char *name)
Add a scheme name to the list of known schemes.
Definition Fl_Scheme.cxx:106
static const char ** names()
Return a list of all known scheme names.
Definition Fl_Scheme.cxx:50