mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	Automatically fix style.
This commit is contained in:
		 ArthurSonzogni
					ArthurSonzogni
				
			
				
					committed by
					
						 Arthur Sonzogni
						Arthur Sonzogni
					
				
			
			
				
	
			
			
			 Arthur Sonzogni
						Arthur Sonzogni
					
				
			
						parent
						
							d09996a6c7
						
					
				
				
					commit
					5291f660ca
				
			| @@ -7,7 +7,8 @@ | ||||
|  | ||||
| namespace ftxui { | ||||
|  | ||||
| /// @brief A Checkbox. It can be checked or unchecked.Display an element on a ftxui::Screen. | ||||
| /// @brief A Checkbox. It can be checked or unchecked.Display an element on a | ||||
| /// ftxui::Screen. | ||||
| /// @ingroup dom | ||||
| class CheckBox : public Component { | ||||
|  public: | ||||
| @@ -15,19 +16,19 @@ class CheckBox : public Component { | ||||
|   CheckBox() = default; | ||||
|   ~CheckBox() override = default; | ||||
|  | ||||
|   bool state = false; // The current state. true=checked, false:unchecked. | ||||
|   std::wstring label = L"label"; // The CheckBox label. | ||||
|   bool state = false;  // The current state. true=checked, false:unchecked. | ||||
|   std::wstring label = L"label";  // The CheckBox label. | ||||
|  | ||||
| #if defined(_WIN32) | ||||
|   std::wstring checked = L"[X] "; /// Prefix for  a "checked" state. | ||||
|   std::wstring unchecked = L"[ ] "; /// Prefix for  an "unchecked" state. | ||||
|   std::wstring checked = L"[X] ";    /// Prefix for  a "checked" state. | ||||
|   std::wstring unchecked = L"[ ] ";  /// Prefix for  an "unchecked" state. | ||||
| #else | ||||
|   std::wstring checked = L"▣ "; /// Prefix for  a "checked" state. | ||||
|   std::wstring unchecked = L"☐ "; /// Prefix for  a "unchecked" state. | ||||
|   std::wstring checked = L"▣ ";    /// Prefix for  a "checked" state. | ||||
|   std::wstring unchecked = L"☐ ";  /// Prefix for  a "unchecked" state. | ||||
| #endif | ||||
|  | ||||
|   Decorator focused_style = inverted; /// Decorator used when focused. | ||||
|   Decorator unfocused_style = nothing; /// Decorator used when unfocused. | ||||
|   Decorator focused_style = inverted;   /// Decorator used when focused. | ||||
|   Decorator unfocused_style = nothing;  /// Decorator used when unfocused. | ||||
|  | ||||
|   /// Called when the user change the state of the CheckBox. | ||||
|   std::function<void()> on_change = []() {}; | ||||
|   | ||||
| @@ -11,9 +11,9 @@ namespace ftxui { | ||||
| class Color { | ||||
|  public: | ||||
|   enum Palette16 : uint8_t; | ||||
|   enum Palette256: uint8_t; | ||||
|   enum Palette256 : uint8_t; | ||||
|  | ||||
|   Color(); // Transparent. | ||||
|   Color();                  // Transparent. | ||||
|   Color(Palette16 index);   // Implicit conversion from index to Color. | ||||
|   Color(Palette256 index);  // Implicit conversion from index to Color. | ||||
|   Color(uint8_t red, uint8_t green, uint8_t blue); | ||||
|   | ||||
| @@ -21,3 +21,7 @@ ColorInfo GetColorInfo(Color::Palette256 index); | ||||
| }  // namespace ftxui | ||||
|  | ||||
| #endif /* end of include guard: FTXUI_SCREEN_COLOR_INFO_HPP */ | ||||
|  | ||||
| // Copyright 2020 Arthur Sonzogni. All rights reserved. | ||||
| // Use of this source code is governed by the MIT license that can be found in | ||||
| // the LICENSE file. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user