FINAL CUT
fstartoptions.h
1 /***********************************************************************
2 * fstartoptions.h - Contains the start options for initialization *
3 * *
4 * This file is part of the FINAL CUT widget toolkit *
5 * *
6 * Copyright 2019-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 /* Standalone class
24  * ════════════════
25  *
26  * ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
27  * ▕ FStartOptions ▏
28  * ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
29  */
30 
31 #ifndef FSTARTOPTIONS_H
32 #define FSTARTOPTIONS_H
33 
34 #if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
35  #error "Only <final/final.h> can be included directly."
36 #endif
37 
38 #include <fstream>
39 #include <iostream>
40 
41 #include "final/fc.h"
42 #include "final/ftypes.h"
43 #include "final/util/fstring.h"
44 
45 namespace finalcut
46 {
47 
48 //----------------------------------------------------------------------
49 // class FStartOptions
50 //----------------------------------------------------------------------
51 
52 class FStartOptions final
53 {
54  public:
55  // Constructors
56  FStartOptions();
57 
58  // Accessors
59  static auto getClassName() -> FString;
60  static auto getInstance() -> FStartOptions&;
61 
62  // Mutator
63  void setDefault();
64 
65  // Data members
66  uInt8 cursor_optimisation : 1;
67  uInt8 mouse_support : 1;
68  uInt8 terminal_detection : 1;
69  uInt8 terminal_data_request : 1;
70  uInt8 terminal_focus_events : 1;
71  uInt8 sgr_optimizer : 1;
72  uInt8 vgafont : 1;
73  uInt8 newfont : 1;
74 
75 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
76  uInt8 meta_sends_escape : 1;
77  uInt8 change_cursorstyle : 1;
78  uInt8 : 6; // padding bits
79 #elif defined(__NetBSD__) || defined(__OpenBSD__)
80  uInt8 meta_sends_escape : 1;
81  uInt8 : 7; // padding bits
82 #endif
83 
84  uInt16 dark_theme : 1;
85  uInt16 color_change : 1;
86  uInt16 : 14; // padding bits
87 
88  Encoding encoding{Encoding::Unknown};
89  std::ofstream logfile_stream{};
90 };
91 
92 //----------------------------------------------------------------------
93 inline auto FStartOptions::getClassName() -> FString
94 { return "FStartOptions"; }
95 
96 } // namespace finalcut
97 
98 #endif // FSTARTOPTIONS_H
Definition: class_template.cpp:25
Definition: fstartoptions.h:52
Definition: fstring.h:79