mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-10-01 17:29:07 +08:00
Add modules support (#1015)
Add experimental C++20 module suppport. Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
66
src/ftxui/component/animation.cppm
Normal file
66
src/ftxui/component/animation.cppm
Normal file
@@ -0,0 +1,66 @@
|
||||
/// @module ftxui.component.animation
|
||||
/// @brief Module file for the Animation namespace of the Component module.
|
||||
///
|
||||
/// @file animation.cppm
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/animation.hpp>
|
||||
|
||||
export module ftxui.component.animation;
|
||||
|
||||
/**
|
||||
* @namespace ftxui::animation
|
||||
* @brief The FTXUI ftxui::animation:: namespace
|
||||
*/
|
||||
export namespace ftxui::animation {
|
||||
using ftxui::animation::RequestAnimationFrame;
|
||||
|
||||
using ftxui::animation::Clock;
|
||||
using ftxui::animation::TimePoint;
|
||||
using ftxui::animation::Duration;
|
||||
|
||||
using ftxui::animation::Params;
|
||||
|
||||
/**
|
||||
* @namespace easing
|
||||
* @brief The FTXUI sf::animation::easing:: namespace
|
||||
*/
|
||||
namespace easing {
|
||||
using ftxui::animation::easing::Function;
|
||||
|
||||
using ftxui::animation::easing::Linear;
|
||||
using ftxui::animation::easing::QuadraticIn;
|
||||
using ftxui::animation::easing::QuadraticOut;
|
||||
using ftxui::animation::easing::QuadraticInOut;
|
||||
using ftxui::animation::easing::CubicIn;
|
||||
using ftxui::animation::easing::CubicOut;
|
||||
using ftxui::animation::easing::CubicInOut;
|
||||
using ftxui::animation::easing::QuarticIn;
|
||||
using ftxui::animation::easing::QuarticOut;
|
||||
using ftxui::animation::easing::QuarticInOut;
|
||||
using ftxui::animation::easing::QuinticIn;
|
||||
using ftxui::animation::easing::QuinticOut;
|
||||
using ftxui::animation::easing::QuinticInOut;
|
||||
using ftxui::animation::easing::SineIn;
|
||||
using ftxui::animation::easing::SineOut;
|
||||
using ftxui::animation::easing::SineInOut;
|
||||
using ftxui::animation::easing::CircularIn;
|
||||
using ftxui::animation::easing::CircularOut;
|
||||
using ftxui::animation::easing::CircularInOut;
|
||||
using ftxui::animation::easing::ExponentialIn;
|
||||
using ftxui::animation::easing::ExponentialOut;
|
||||
using ftxui::animation::easing::ExponentialInOut;
|
||||
using ftxui::animation::easing::ElasticIn;
|
||||
using ftxui::animation::easing::ElasticOut;
|
||||
using ftxui::animation::easing::ElasticInOut;
|
||||
using ftxui::animation::easing::BackIn;
|
||||
using ftxui::animation::easing::BackOut;
|
||||
using ftxui::animation::easing::BackInOut;
|
||||
using ftxui::animation::easing::BounceIn;
|
||||
using ftxui::animation::easing::BounceOut;
|
||||
using ftxui::animation::easing::BounceInOut;
|
||||
}
|
||||
|
||||
using ftxui::animation::Animator;
|
||||
}
|
18
src/ftxui/component/captured_mouse.cppm
Normal file
18
src/ftxui/component/captured_mouse.cppm
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @file captured_mouse.cppm
|
||||
* @brief Module file for the CapturedMouseInterface class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/captured_mouse.hpp>
|
||||
|
||||
export module ftxui.component.captured_mouse;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::CapturedMouseInterface;
|
||||
}
|
61
src/ftxui/component/component.cppm
Normal file
61
src/ftxui/component/component.cppm
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @file component.cppm
|
||||
* @brief Module file for the Component classes of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/component.hpp>
|
||||
|
||||
export module ftxui.component.component;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::ButtonOption;
|
||||
using ftxui::CheckboxOption;
|
||||
using ftxui::Event;
|
||||
using ftxui::InputOption;
|
||||
using ftxui::MenuOption;
|
||||
using ftxui::RadioboxOption;
|
||||
using ftxui::MenuEntryOption;
|
||||
|
||||
using ftxui::Make;
|
||||
|
||||
using ftxui::ComponentDecorator;
|
||||
using ftxui::ElementDecorator;
|
||||
|
||||
using ftxui::operator|;
|
||||
using ftxui::operator|=;
|
||||
|
||||
namespace Container {
|
||||
using ftxui::Container::Vertical;
|
||||
using ftxui::Container::Horizontal;
|
||||
using ftxui::Container::Tab;
|
||||
using ftxui::Container::Stacked;
|
||||
}
|
||||
|
||||
using ftxui::Button;
|
||||
using ftxui::Checkbox;
|
||||
using ftxui::Input;
|
||||
using ftxui::Menu;
|
||||
using ftxui::MenuEntry;
|
||||
using ftxui::Radiobox;
|
||||
using ftxui::Dropdown;
|
||||
using ftxui::Toggle;
|
||||
using ftxui::Slider;
|
||||
using ftxui::ResizableSplit;
|
||||
using ftxui::ResizableSplitLeft;
|
||||
using ftxui::ResizableSplitRight;
|
||||
using ftxui::ResizableSplitTop;
|
||||
using ftxui::ResizableSplitBottom;
|
||||
using ftxui::Renderer;
|
||||
using ftxui::CatchEvent;
|
||||
using ftxui::Maybe;
|
||||
using ftxui::Modal;
|
||||
using ftxui::Collapsible;
|
||||
using ftxui::Hoverable;
|
||||
using ftxui::Window;
|
||||
}
|
28
src/ftxui/component/component_base.cppm
Normal file
28
src/ftxui/component/component_base.cppm
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @file component_base.cppm
|
||||
* @brief Module file for the ComponentBase class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/component_base.hpp>
|
||||
|
||||
export module ftxui.component.component_base;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::Delegate;
|
||||
using ftxui::Focus;
|
||||
using ftxui::Event;
|
||||
|
||||
namespace animation {
|
||||
using ftxui::animation::Params;
|
||||
}
|
||||
|
||||
using ftxui::ComponentBase;
|
||||
using ftxui::Component;
|
||||
using ftxui::Components;
|
||||
}
|
33
src/ftxui/component/component_options.cppm
Normal file
33
src/ftxui/component/component_options.cppm
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @file component_options.cppm
|
||||
* @brief Module file for options for the Component class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/component_options.hpp>
|
||||
|
||||
export module ftxui.component.component_options;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::EntryState;
|
||||
using ftxui::UnderlineOption;
|
||||
using ftxui::AnimatedColorOption;
|
||||
using ftxui::AnimatedColorsOption;
|
||||
using ftxui::MenuEntryOption;
|
||||
using ftxui::MenuOption;
|
||||
using ftxui::ButtonOption;
|
||||
using ftxui::CheckboxOption;
|
||||
using ftxui::InputState;
|
||||
using ftxui::InputOption;
|
||||
using ftxui::RadioboxOption;
|
||||
using ftxui::ResizableSplitOption;
|
||||
using ftxui::SliderOption;
|
||||
using ftxui::WindowRenderState;
|
||||
using ftxui::WindowOptions;
|
||||
using ftxui::DropdownOption;
|
||||
}
|
21
src/ftxui/component/event.cppm
Normal file
21
src/ftxui/component/event.cppm
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @file event.cppm
|
||||
* @brief Module file for the Event struct of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/event.hpp>
|
||||
|
||||
export module ftxui.component.event;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::ScreenInteractive;
|
||||
using ftxui::ComponentBase;
|
||||
|
||||
using ftxui::Event;
|
||||
}
|
22
src/ftxui/component/loop.cppm
Normal file
22
src/ftxui/component/loop.cppm
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @file loop.cppm
|
||||
* @brief Module file for the Loop class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/loop.hpp>
|
||||
|
||||
export module ftxui.component.loop;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::ComponentBase;
|
||||
using ftxui::Component;
|
||||
using ftxui::ScreenInteractive;
|
||||
|
||||
using ftxui::Loop;
|
||||
}
|
18
src/ftxui/component/mouse.cppm
Normal file
18
src/ftxui/component/mouse.cppm
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @file mouse.cppm
|
||||
* @brief Module file for the Mouse struct of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/mouse.hpp>
|
||||
|
||||
export module ftxui.component.mouse;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::Mouse;
|
||||
}
|
22
src/ftxui/component/receiver.cppm
Normal file
22
src/ftxui/component/receiver.cppm
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @file receiver.cppm
|
||||
* @brief Module file for the Receiver class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/receiver.hpp>
|
||||
|
||||
export module ftxui.component.receiver;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::SenderImpl;
|
||||
using ftxui::ReceiverImpl;
|
||||
using ftxui::Sender;
|
||||
using ftxui::Receiver;
|
||||
using ftxui::MakeReceiver;
|
||||
}
|
25
src/ftxui/component/screen_interactive.cppm
Normal file
25
src/ftxui/component/screen_interactive.cppm
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @file screen_interactive.cppm
|
||||
* @brief Module file for the ScreenInteractive class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/screen_interactive.hpp>
|
||||
|
||||
export module ftxui.component.screen_interactive;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::ComponentBase;
|
||||
using ftxui::Loop;
|
||||
using ftxui::Event;
|
||||
using ftxui::Component;
|
||||
|
||||
using ftxui::Screen;
|
||||
using ftxui::ScreenInteractivePrivate;
|
||||
using ftxui::ScreenInteractive;
|
||||
}
|
20
src/ftxui/component/task.cppm
Normal file
20
src/ftxui/component/task.cppm
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @file task.cppm
|
||||
* @brief Module file for the Task class of the Component module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/component/task.hpp>
|
||||
|
||||
export module ftxui.component.task;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::AnimationTask;
|
||||
using ftxui::Closure;
|
||||
using ftxui::Task;
|
||||
}
|
Reference in New Issue
Block a user