summaryrefslogtreecommitdiff
path: root/test/menubar.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-01-01 21:53:07 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-01-12 19:21:09 +0100
commitbafd3fd3d792b530d39d3af06e087dc63d2a25a2 (patch)
tree42f4d533490191a92a13863d07378820b04a7b9c /test/menubar.cxx
parent79832b679f2d195eb3b0f30ca920a857cc133b2b (diff)
Add Fl_Scheme_Choice widget and use it in test programs
This widget offers the selection of all known FLTK schemes as a simple widget based on Fl_Choice. Some test and demo programs use Fl_Scheme_Choice to enable the developer or user to switch schemes quickly for comparison. Todo: - add features to add new schemes during runtime (partially done) - update status when the scheme is changed by Fl::scheme("...")
Diffstat (limited to 'test/menubar.cxx')
-rw-r--r--test/menubar.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/menubar.cxx b/test/menubar.cxx
index 1f7750007..f8b1aaffc 100644
--- a/test/menubar.cxx
+++ b/test/menubar.cxx
@@ -23,7 +23,7 @@
#include <FL/Fl_Sys_Menu_Bar.H>
#include <FL/Fl_Toggle_Button.H>
#include <FL/Fl_Menu_Button.H>
-#include <FL/Fl_Choice.H>
+#include <FL/Fl_Scheme_Choice.H>
#include <FL/Fl_Value_Slider.H>
#include <stdio.h>
#include <stdlib.h>
@@ -229,6 +229,9 @@ int main(int argc, char **argv) {
hugemenu[i].text = fl_strdup(buf);
}
Fl_Double_Window window(WIDTH,400+TERMINAL_HEIGHT);
+
+ Fl_Scheme_Choice scheme_choice(300, 50, 100, 25, "&scheme");
+
G_tty = new Fl_Simple_Terminal(0,400,WIDTH,TERMINAL_HEIGHT);
window.callback(window_cb);