Slider widget constructor and methods.
More...
Go to the source code of this file.
|
| ui_slider_t * | CreateSlider (unsigned short tag, short x0, short y0, short x1, short y1, unsigned short minimum, unsigned short maximum, unsigned short step, unsigned short *position, unsigned short slider_flags) |
| | Create a slider widget.
|
| void | PSLIDER_SetPos (ui_slider_t *self, unsigned short *position) |
| | Replace the position number variable used by the slider.
|
| unsigned short | PSLIDER_SetRange (ui_slider_t *self, unsigned short maximum) |
| | Set the maximum value of the slider.
|
| void | PSLIDER_handleEvent (ui_slider_t *self, ui_event_t *event) |
| | Slider event handler callback.
|
Slider widget constructor and methods.
◆ CreateSlider()
| ui_slider_t * CreateSlider |
( |
unsigned short | tag, |
|
|
short | x0, |
|
|
short | y0, |
|
|
short | x1, |
|
|
short | y1, |
|
|
unsigned short | minimum, |
|
|
unsigned short | maximum, |
|
|
unsigned short | step, |
|
|
unsigned short * | position, |
|
|
unsigned short | slider_flags ) |
|
extern |
Create a slider widget.
- Syscall Number
- 0x10157
- Parameters
-
| tag | Component tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component, or looking up an item with GetDeskItem()). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated. |
| x0 | X coordinate of the top-left corner, in pixels (inclusive). |
| y0 | Y coordinate of the top-left corner, in pixels (inclusive). |
| x1 | X coordinate of the bottom-right corner, in pixels (inclusive). |
| y1 | Y coordinate of the bottom-right corner, in pixels (inclusive). |
| minimum | Minimum position number of the slider. |
| maximum | Maximum position number of the slider. |
| step | Number of positions to advance on key presses. |
| [in,out] | position | Current position number (borrowed reference). |
| slider_flags | Style flags of the slider. |
- Returns
- The created slider widget object.
- See also
- ui_slider_flag_e
◆ PSLIDER_handleEvent()
Slider event handler callback.
- Syscall Number
- 0x1015e
- Parameters
-
| self | The slider widget object. |
| event | The incoming event. |
- Returns
- None.
◆ PSLIDER_SetPos()
| void PSLIDER_SetPos |
( |
ui_slider_t * | self, |
|
|
unsigned short * | position ) |
|
extern |
Replace the position number variable used by the slider.
- Syscall Number
- 0x1015c
- Parameters
-
| self | The slider widget object. |
| [in,out] | position | Pointer to the new position number variable. |
- Returns
- None.
◆ PSLIDER_SetRange()
| unsigned short PSLIDER_SetRange |
( |
ui_slider_t * | self, |
|
|
unsigned short | maximum ) |
Set the maximum value of the slider.
- Syscall Number
- 0x1015d
- Parameters
-
| self | The slider widget object. |
| maximum | The new maximum value. |
- Returns
- The old maximum value.