Fltk can manage "sets" of styles. This is useful for making a program that displays more than one "theme" at a time, such as a program that edits or creates themes. The "test" widgets can display the theme under development, while the main widgets stay unchanged. Fluid uses this to allow you to try your program under different themes.
Each widget "belongs" to a set, which is assigned to the current set when the widget is constructed.
The actual implementation is to change the pointers such as fltk::Widget::default_style for every widget class to point to a new copy, so when the constructors for each widget are run they assign the new copy. The previous copies are saved and restored if the older set name is used.
There are some problems. Many widgets are dynamically created (for instance pop-up menus) and may not inherit the expected theme unless you are careful. Also some global things such as the background color cannot be seperated into sets.
The destructor does nothing. It is not clear what it should do, as Widgets may still be using the styles.
Make this set be current. All widgets created after this use this set, and calling fltk::reload_theme() will change the styles belonging to this set.