====== ボタン ====== [[fltk:|{{:fltk:fltk_shadow.png?200|}}]] ===== Fl_Buttonクラス ===== [{{ https://www.fltk.org/doc-1.4/classFl__Button.png | Fl_Buttonクラスから派生するクラス全体の階層図 }}] {{ :fltk:widget_demo-button1-fl_button.mp4 |Fl_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Button Demo"); auto button1 = new Fl_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ==== Fl_Radio_Buttonクラス ==== {{ :fltk:widget_demo-button2-fl_radio_button.mp4 |Fl_Radio_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Radio_Button Demo"); auto button1 = new Fl_Radio_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Radio_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Radio_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ==== Fl_Repeat_Buttonクラス ==== {{ :fltk:widget_demo-button3-fl_repeat_button.mp4 |Fl_Repeat_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Repeat_Button Demo"); auto button1 = new Fl_Repeat_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Repeat_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Repeat_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ==== Fl_Return_Buttonクラス ==== {{ :fltk:widget_demo-button4-fl_return_button.mp4 |Fl_Return_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Return_Button Demo"); auto button1 = new Fl_Return_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Return_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Return_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ==== Fl_Toggle_Buttonクラス ==== {{ :fltk:widget_demo-button5-fl_toggle_button.mp4 |Fl_Toggle_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Toggle_Button Demo"); auto button1 = new Fl_Toggle_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Toggle_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Toggle_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ==== Fl_Shortcut_Buttonクラス ==== {{ :fltk:widget_demo-button6-fl_shortcut_button.mp4 |Fl_Shortcut_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Shortcut_Button Demo"); auto button1 = new Fl_Shortcut_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Shortcut_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Shortcut_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ==== Fl_Light_Buttonクラス ==== [{{ https://www.fltk.org/doc-1.4/classFl__Light__Button.png | Fl_Light_Buttonクラス前後のクラス階層図 }}] {{ :fltk:widget_demo-button7-fl_light_button.mp4 |Fl_Light_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Light_Button Demo"); auto button1 = new Fl_Light_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Light_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Light_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } === Fl_Check_Button === {{ :fltk:widget_demo-button8-fl_check_button.mp4 |Fl_Check_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Check_Button Demo"); auto button1 = new Fl_Check_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Check_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Check_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } === Fl_Radio_Light_Button === {{ :fltk:widget_demo-button9-fl_radio_light_button.mp4 |Fl_Radio_Light_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Radio_Light_Button Demo"); auto button1 = new Fl_Radio_Light_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Radio_Light_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Radio_Light_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } === Fl_Round_Button === {{ :fltk:widget_demo-button10-fl_round_button.mp4 |Fl_Round_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Round_Button Demo"); auto button1 = new Fl_Round_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Round_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Round_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } == Fl_Radio_Round_Button == {{ :fltk:widget_demo-button11-fl_radio_round_button.mp4 |Fl_Radio_Round_Button demo}} #include #include #include int main(int argc, char **argv) { auto window = new Fl_Window(400, 300, "Fl_Radio_Round_Button Demo"); auto button1 = new Fl_Radio_Round_Button(100, 85, 200, 30, "Hello, SMALL world!"); auto button2 = new Fl_Radio_Round_Button(100, 135, 200, 30, "Hello, MEDIUM world!"); auto button3 = new Fl_Radio_Round_Button(100, 185, 200, 30, "Hello, LARGE world!"); window->end(); window->show(argc, argv); return Fl::run(); } ===== 参照 ===== * [[https://www.fltk.org/doc-1.4/classFl__Button.html|Fl_Buttonクラスのリファレンス]]