差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| fltk:widget-basic-buttons [2025/05/29 18:19] – [Fl_Light_Buttonクラス] Fix wrong class name Fl_Round_Radio_Button → Fl_Radio_Round_Button freemikan | fltk:widget-basic-buttons [2025/05/30 17:36] (現在) – Apply imagebox plugin freemikan | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== ボタン ====== | ====== ボタン ====== | ||
| - | {{: | + | [[fltk:|{{: |
| ===== Fl_Buttonクラス ===== | ===== Fl_Buttonクラス ===== | ||
| + | [{{ https:// | ||
| - | Fl_Buttonクラスから派生するクラス全体の階層図 | + | {{ : |
| - | {{ https://www.fltk.org/doc-1.4/classFl__Button.png | Fl_Buttonクラス前後のクラス階層図 }} | + | <code cpp> |
| + | #include <FL/Fl.H> | ||
| + | #include <FL/Fl_Button.H> | ||
| + | #include <FL/Fl_Window.H> | ||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Button(100, | ||
| + | auto button2 = new Fl_Button(100, | ||
| + | auto button3 = new Fl_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| ==== Fl_Radio_Buttonクラス ==== | ==== Fl_Radio_Buttonクラス ==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Radio_Button(100, | ||
| + | auto button2 = new Fl_Radio_Button(100, | ||
| + | auto button3 = new Fl_Radio_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| ==== Fl_Repeat_Buttonクラス ==== | ==== Fl_Repeat_Buttonクラス ==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Repeat_Button(100, | ||
| + | auto button2 = new Fl_Repeat_Button(100, | ||
| + | auto button3 = new Fl_Repeat_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| ==== Fl_Return_Buttonクラス ==== | ==== Fl_Return_Buttonクラス ==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Return_Button(100, | ||
| + | auto button2 = new Fl_Return_Button(100, | ||
| + | auto button3 = new Fl_Return_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| ==== Fl_Toggle_Buttonクラス ==== | ==== Fl_Toggle_Buttonクラス ==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Toggle_Button(100, | ||
| + | auto button2 = new Fl_Toggle_Button(100, | ||
| + | auto button3 = new Fl_Toggle_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| ==== Fl_Shortcut_Buttonクラス ==== | ==== Fl_Shortcut_Buttonクラス ==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Shortcut_Button(100, | ||
| + | auto button2 = new Fl_Shortcut_Button(100, | ||
| + | auto button3 = new Fl_Shortcut_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| ==== Fl_Light_Buttonクラス ==== | ==== Fl_Light_Buttonクラス ==== | ||
| + | [{{ https:// | ||
| - | Fl_Light_Buttonクラス前後のクラス階層図 | + | {{ :fltk: |
| - | {{ https://www.fltk.org/doc-1.4/ | + | |
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Light_Button(100, | ||
| + | auto button2 = new Fl_Light_Button(100, | ||
| + | auto button3 = new Fl_Light_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| === Fl_Check_Button === | === Fl_Check_Button === | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Check_Button(100, | ||
| + | auto button2 = new Fl_Check_Button(100, | ||
| + | auto button3 = new Fl_Check_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| + | |||
| === Fl_Radio_Light_Button === | === Fl_Radio_Light_Button === | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Radio_Light_Button(100, | ||
| + | auto button2 = new Fl_Radio_Light_Button(100, | ||
| + | auto button3 = new Fl_Radio_Light_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| + | |||
| === Fl_Round_Button === | === Fl_Round_Button === | ||
| - | == Fl_Radio_Round_Button == | + | {{ : |
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Round_Button(100, | ||
| + | auto button2 = new Fl_Round_Button(100, | ||
| + | auto button3 = new Fl_Round_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| + | == Fl_Radio_Round_Button == | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | <code cpp> | ||
| + | #include < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | int main(int argc, char **argv) { | ||
| + | auto window = new Fl_Window(400, | ||
| + | auto button1 = new Fl_Radio_Round_Button(100, | ||
| + | auto button2 = new Fl_Radio_Round_Button(100, | ||
| + | auto button3 = new Fl_Radio_Round_Button(100, | ||
| + | window-> | ||
| + | window-> | ||
| + | return Fl::run(); | ||
| + | } | ||
| + | </ | ||
| 行 49: | 行 239: | ||
| * [[https:// | * [[https:// | ||
| - | |||
