FTXUI/include/ftxui/component
Kefu Chai 63e8dadad9
allow passing move-only parameter to Make() (#338)
ftxui::Ref<> is used for passing Options, for instance, MenuOption,
to the corresponding component which is supposed to hold a strong
reference of it. and we can observe the events sent to the component
by setting callback(s) in the option instance passed to the owner
component.

but the callback function is not always copyable, despite that it
might be moveable.

in this change,

* Make<>() is updated to use the perfect forwarding to avoid
  enforcing its parameters to be copyable.
* Ref<> is also updated to take a rvalue reference, so we can
  move away from the contructor parameter when creating an
  instance of Ref<>() from it.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-02-16 14:09:08 +01:00
..
captured_mouse.hpp Remove explicit default destructors (#157) 2021-07-17 12:02:08 +02:00
component_base.hpp Add non focusable components. (#172) 2021-08-05 22:40:40 +02:00
component_options.hpp Run IWYU. (#208) 2021-09-16 20:45:26 +02:00
component.hpp allow passing move-only parameter to Make() (#338) 2022-02-16 14:09:08 +01:00
deprecated.hpp Prefer std::string over std::wstring. (#179) 2021-08-08 23:25:20 +02:00
event.hpp Support SIGTSTP and task posting. (#331) 2022-02-13 11:11:34 +01:00
mouse.hpp Use IWYU. 2021-05-01 23:19:07 +02:00
receiver.hpp Execute IWYU and format. 2021-06-21 23:10:51 +02:00
screen_interactive.hpp Support SIGTSTP and task posting. (#331) 2022-02-13 11:11:34 +01:00
task.hpp Support SIGTSTP and task posting. (#331) 2022-02-13 11:11:34 +01:00