FINAL CUT
fradiobutton.h
1 /***********************************************************************
2 * fradiobutton.h - Widget FRadioButton *
3 * *
4 * This file is part of the FINAL CUT widget toolkit *
5 * *
6 * Copyright 2014-2022 Markus Gans *
7 * *
8 * FINAL CUT is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as *
10 * published by the Free Software Foundation; either version 3 of *
11 * the License, or (at your option) any later version. *
12 * *
13 * FINAL CUT is distributed in the hope that it will be useful, but *
14 * WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this program. If not, see *
20 * <http://www.gnu.org/licenses/>. *
21 ***********************************************************************/
22 
23 /* Inheritance diagram
24  * ═══════════════════
25  *
26  * ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏
27  * ▕ FVTerm ▏ ▕ FObject ▏
28  * ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏
29  * ▲ ▲
30  * │ │
31  * └─────┬─────┘
32  * │
33  * ▕▔▔▔▔▔▔▔▔▔▏
34  * ▕ FWidget ▏
35  * ▕▁▁▁▁▁▁▁▁▁▏
36  * ▲
37  * │
38  * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
39  * ▕ FToggleButton ▏
40  * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
41  * ▲
42  * │
43  * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
44  * ▕ FRadioButton ▏
45  * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
46  */
47 
48 #ifndef FRADIOBUTTON_H
49 #define FRADIOBUTTON_H
50 
51 #if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
52  #error "Only <final/final.h> can be included directly."
53 #endif
54 
55 #include "final/widget/ftogglebutton.h"
56 
57 namespace finalcut
58 {
59 
60 //----------------------------------------------------------------------
61 // class FRadioButton
62 //----------------------------------------------------------------------
63 
65 {
66  public:
67  // Constructors
68  explicit FRadioButton (FWidget* = nullptr);
69  explicit FRadioButton (const FString&, FWidget* = nullptr);
70 
71  // Destructor
72  ~FRadioButton() noexcept override;
73 
74  // Accessor
75  auto getClassName() const -> FString override;
76 
77  private:
78  // Methods
79  void init();
80  void draw() override;
81  void drawRadioButton();
82  void drawChecked();
83  void drawUnchecked();
84 };
85 
86 
87 // FRadioButton inline functions
88 //----------------------------------------------------------------------
89 inline auto FRadioButton::getClassName() const -> FString
90 { return "FRadioButton"; }
91 
92 } // namespace finalcut
93 
94 #endif // FRADIOBUTTON_H
Definition: fradiobutton.h:64
Definition: class_template.cpp:25
Definition: fstring.h:79
Definition: fwidget.h:129
Definition: ftogglebutton.h:62