mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	 b78b97056b
			
		
	
	b78b97056b
	
	
		
			
	
		
	
	
		
			Some checks failed
		
		
	
	Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (cl, cl, windows-latest) (push) Has been cancelled
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (clang, clang++, macos-latest) (push) Has been cancelled
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (clang, clang++, ubuntu-latest) (push) Has been cancelled
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (gcc, g++, macos-latest) (push) Has been cancelled
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (gcc, g++, ubuntu-latest) (push) Has been cancelled
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, Windows MSVC, windows-latest) (push) Has been cancelled
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, Linux GCC, ubuntu-latest) (push) Has been cancelled
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Has been cancelled
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, MacOS clang, macos-latest) (push) Has been cancelled
				
			Build / Test modules (llvm, ubuntu-latest) (push) Has been cancelled
				
			Documentation / documentation (push) Has been cancelled
				
			Stop using Sender/Receiver in TerminalInputParser. This will help removing usage of thread. At some point, my goal is to have an initialization step when installing the ScreenInteractive so that we can provide the terminal ID synchronously without losing some events. This will help with: https://github.com/ArthurSonzogni/FTXUI/pull/1069
		
			
				
	
	
		
			34 lines
		
	
	
		
			945 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			945 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // 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.
 | |
| #ifndef FTXUI_SCREEN_BOX_HPP
 | |
| #define FTXUI_SCREEN_BOX_HPP
 | |
| 
 | |
| namespace ftxui {
 | |
| 
 | |
| /// @brief Box is a structure that represents a rectangular area in a 2D space.
 | |
| ///
 | |
| /// It is defined by its minimum and maximum coordinates along the x and y axes.
 | |
| /// Note that the coordinates are inclusive, meaning that the box includes both
 | |
| /// the minimum and maximum values.
 | |
| ///
 | |
| /// @ingroup screen
 | |
| struct Box {
 | |
|   int x_min = 0;
 | |
|   int x_max = 0;
 | |
|   int y_min = 0;
 | |
|   int y_max = 0;
 | |
| 
 | |
|   static auto Intersection(Box a, Box b) -> Box;
 | |
|   static auto Union(Box a, Box b) -> Box;
 | |
|   void Shift(int x, int y);
 | |
|   bool Contain(int x, int y) const;
 | |
|   bool IsEmpty() const;
 | |
|   bool operator==(const Box& other) const;
 | |
|   bool operator!=(const Box& other) const;
 | |
| };
 | |
| 
 | |
| }  // namespace ftxui
 | |
| 
 | |
| #endif  // FTXUI_SCREEN_BOX_HPP
 |