#include "core/gooey_backend_internal.h"
#include "gooey_event_internal.h"
Go to the source code of this file.
|
| GooeySlider * | GooeySlider_Add (GooeyWindow *win, int x, int y, int width, long min_value, long max_value, bool show_hints, void(*callback)(long value)) |
| | Adds a slider to the window.
|
| |
| bool | GooeySlider_HandleDrag (GooeyWindow *win, GooeyEvent *event) |
| | Handles slider drag events.
|
| |
| long | GooeySlider_GetValue (GooeySlider *slider) |
| | Gets the current value of the slider.
|
| |
| void | GooeySlider_SetValue (GooeySlider *slider, long value) |
| | Sets the value of the slider.
|
| |
| void | GooeySlider_Draw (GooeyWindow *window) |
| |
◆ GooeySlider_Add()
| GooeySlider * GooeySlider_Add |
( |
GooeyWindow * |
win, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
long |
min_value, |
|
|
long |
max_value, |
|
|
bool |
show_hints, |
|
|
void(*)(long value) |
callback |
|
) |
| |
Adds a slider to the window.
- Parameters
-
| win | The window to add the slider to. |
| x | The x-coordinate of the slider's position. |
| y | The y-coordinate of the slider's position. |
| width | The width of the slider. |
| min_value | The minimum value of the slider. |
| max_value | The maximum value of the slider. |
| show_hints | Whether to show hints for the slider. |
| callback | The callback function to call when the slider value changes. |
- Returns
- A new GooeySlider object.
◆ GooeySlider_Draw()
| void GooeySlider_Draw |
( |
GooeyWindow * |
window | ) |
|
◆ GooeySlider_GetValue()
| long GooeySlider_GetValue |
( |
GooeySlider * |
slider | ) |
|
Gets the current value of the slider.
- Parameters
-
| slider | The slider to get the value from. |
- Returns
- The current value of the slider.
◆ GooeySlider_HandleDrag()
| bool GooeySlider_HandleDrag |
( |
GooeyWindow * |
win, |
|
|
GooeyEvent * |
event |
|
) |
| |
Handles slider drag events.
- Parameters
-
| win | The window containing the slider. |
| event | The current event. |
- Returns
- True if the slider was dragged, false otherwise.
◆ GooeySlider_SetValue()
| void GooeySlider_SetValue |
( |
GooeySlider * |
slider, |
|
|
long |
value |
|
) |
| |
Sets the value of the slider.
- Parameters
-
| slider | The slider to set the value for. |
| value | The new value for the slider. |