Add all the Slider implementations. (#532)

This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/524
This commit is contained in:
Arthur Sonzogni
2022-12-22 21:15:54 +01:00
committed by GitHub
parent 6cea410eaa
commit 60b9e491db
2 changed files with 18 additions and 6 deletions

View File

@@ -67,6 +67,12 @@ Component Radiobox(ConstStringListRef entries,
Ref<RadioboxOption> option = {});
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,
Ref<int> value,
ConstRef<int> min = 0,
@@ -82,9 +88,6 @@ Component Slider(ConstStringRef label,
ConstRef<long> min = 0l,
ConstRef<long> max = 100l,
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 ResizableSplitRight(Component main, Component back, int* main_size);