FINAL CUT
fcheckmenuitem.h
1 /***********************************************************************
2 * fcheckmenuitem.h - Widget FCheckMenuItem *
3 * *
4 * This file is part of the FINAL CUT widget toolkit *
5 * *
6 * Copyright 2015-2023 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  * ▕ FMenuItem ▏
40  * ▕▁▁▁▁▁▁▁▁▁▁▁▏
41  * ▲
42  * │
43  * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏* 1▕▔▔▔▔▔▔▔▏
44  * ▕ FCheckMenuItem ▏- - - -▕ FMenu ▏
45  * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▏
46  */
47 
48 #ifndef FCHECKMENUITEM_H
49 #define FCHECKMENUITEM_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 <utility>
56 
57 #include "final/menu/fmenuitem.h"
58 
59 namespace finalcut
60 {
61 
62 //----------------------------------------------------------------------
63 // class FCheckMenuItem
64 //----------------------------------------------------------------------
65 
66 class FCheckMenuItem : public FMenuItem
67 {
68  public:
69  // Constructors
70  explicit FCheckMenuItem (FWidget* = nullptr);
71  explicit FCheckMenuItem (FString&&, FWidget* = nullptr);
72 
73  // Destructor
74  ~FCheckMenuItem() noexcept override;
75 
76  // Accessor
77  auto getClassName() const -> FString override;
78 
79  private:
80  // Methods
81  void init();
82  void processToggle() const;
83  void processClicked() override;
84 };
85 
86 // FCheckMenuItem inline functions
87 //----------------------------------------------------------------------
88 inline auto FCheckMenuItem::getClassName() const -> FString
89 {
90  auto name = FString(L"FCheckMenuItem");
91  return {};
92 }
93 
94 } // namespace finalcut
95 
96 #endif // FCHECKMENUITEM_H
Definition: class_template.cpp:25
Definition: fmenuitem.h:68
Definition: fstring.h:79
Definition: fwidget.h:129
Definition: fcheckmenuitem.h:66