mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 10:40:00 +08:00
Add all the Slider implementations. (#532)
This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/524
This commit is contained in:
parent
6cea410eaa
commit
60b9e491db
@ -67,6 +67,12 @@ Component Radiobox(ConstStringListRef entries,
|
|||||||
Ref<RadioboxOption> option = {});
|
Ref<RadioboxOption> option = {});
|
||||||
Component Toggle(ConstStringListRef entries, int* selected);
|
Component Toggle(ConstStringListRef entries, int* selected);
|
||||||
|
|
||||||
|
|
||||||
|
// General slider constructor:
|
||||||
|
template <typename T>
|
||||||
|
Component Slider(SliderOption<T> options = {});
|
||||||
|
|
||||||
|
// Shorthand without the `SliderOption` constructor:
|
||||||
Component Slider(ConstStringRef label,
|
Component Slider(ConstStringRef label,
|
||||||
Ref<int> value,
|
Ref<int> value,
|
||||||
ConstRef<int> min = 0,
|
ConstRef<int> min = 0,
|
||||||
@ -82,9 +88,6 @@ Component Slider(ConstStringRef label,
|
|||||||
ConstRef<long> min = 0l,
|
ConstRef<long> min = 0l,
|
||||||
ConstRef<long> max = 100l,
|
ConstRef<long> max = 100l,
|
||||||
ConstRef<long> increment = 5l);
|
ConstRef<long> increment = 5l);
|
||||||
// General slider type without support for a `label`.
|
|
||||||
template <typename T> // T = {int, float, long}
|
|
||||||
Component Slider(SliderOption<T> options = {});
|
|
||||||
|
|
||||||
Component ResizableSplitLeft(Component main, Component back, int* main_size);
|
Component ResizableSplitLeft(Component main, Component back, int* main_size);
|
||||||
Component ResizableSplitRight(Component main, Component back, int* main_size);
|
Component ResizableSplitRight(Component main, Component back, int* main_size);
|
||||||
|
@ -325,9 +325,18 @@ template <typename T>
|
|||||||
Component Slider(SliderOption<T> options) {
|
Component Slider(SliderOption<T> options) {
|
||||||
return Make<SliderBase<T>>(options);
|
return Make<SliderBase<T>>(options);
|
||||||
}
|
}
|
||||||
template Component Slider(SliderOption<int> options);
|
template Component Slider(SliderOption<int8_t>);
|
||||||
template Component Slider(SliderOption<float> options);
|
template Component Slider(SliderOption<int16_t>);
|
||||||
template Component Slider(SliderOption<long> options);
|
template Component Slider(SliderOption<int32_t>);
|
||||||
|
template Component Slider(SliderOption<int64_t>);
|
||||||
|
|
||||||
|
template Component Slider(SliderOption<uint8_t>);
|
||||||
|
template Component Slider(SliderOption<uint16_t>);
|
||||||
|
template Component Slider(SliderOption<uint32_t>);
|
||||||
|
template Component Slider(SliderOption<uint64_t>);
|
||||||
|
|
||||||
|
template Component Slider(SliderOption<float>);
|
||||||
|
template Component Slider(SliderOption<double>);
|
||||||
|
|
||||||
} // namespace ftxui
|
} // namespace ftxui
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user