|
Kanzi Graphics Engine
|
User interface slider. More...
#include <user/scene_graph/kzu_object_common.h>#include <system/kzs_types.h>#include <system/debug/kzs_error.h>#include <system/kzs_header.h>Enumerations | |
| enum | KzuUiSliderDirection { KZU_UI_SLIDER_DIRECTION_X, KZU_UI_SLIDER_DIRECTION_Y, KZU_UI_SLIDER_DIRECTION_Z } |
| Slider direction. More... | |
| enum | KzuUiSliderExpandDirection { KZU_UI_SLIDER_EXPAND_DIRECTION_X, KZU_UI_SLIDER_EXPAND_DIRECTION_Y, KZU_UI_SLIDER_EXPAND_DIRECTION_Z, KZU_UI_SLIDER_EXPAND_DIRECTION_ONLY_SLIDER_DIRECTION, KZU_UI_SLIDER_EXPAND_DIRECTION_NONE } |
| Slider expand direction. More... | |
Functions | |
| kzsError | kzuUiSliderCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuUiSlider **out_slider) |
| Creates a slider with default settings. More... | |
| kzsError | kzuUiSliderRegisterToFactory (const struct KzuFactory *factory) |
| Registers component type to factory. More... | |
| struct KzuUiComponentNode * | kzuUiSliderToUiComponentNode (const struct KzuUiSlider *slider) |
| Casts to UiComponentNode. More... | |
| struct KzuUiSlider * | kzuUiSliderFromUiComponentNode (const struct KzuUiComponentNode *component) |
| Casts to UiSlider. More... | |
| kzsError | kzuUiSliderSetValueExternal (const struct KzuUiSlider *slider, kzFloat value) |
| Sets the slider value. More... | |
| struct KzuObjectNode * | kzuUiSliderGetKnob (const struct KzuUiSlider *slider) |
| Gets the empty object node under which the slider knob must be placed. More... | |
| struct KzuObjectNode * | kzuUiSliderGetBar (const struct KzuUiSlider *slider) |
| Gets the empty object node under which the slider rail must be placed. More... | |
| kzFloat | kzuUiSliderGetValue (const struct KzuUiSlider *slider) |
| Gets slider value. More... | |
| kzsError | kzuUiSliderSetValue (const struct KzuUiSlider *slider, kzFloat value) |
| Sets the slider value. More... | |
| enum KzuUiSliderExpandDirection | kzuUiSliderGetExpandOnDragDirection (const struct KzuUiSlider *slider) |
| Gets slider expand direction on drag. More... | |
| kzsError | kzuUiSliderSetExpandOnDragDirection (const struct KzuUiSlider *slider, enum KzuUiSliderExpandDirection direction) |
| Sets slider expand direction on drag. More... | |
| enum KzuUiSliderDirection | kzuUiSliderGetDirection (const struct KzuUiSlider *slider) |
| Gets slider direction. More... | |
| kzsError | kzuUiSliderSetDirection (const struct KzuUiSlider *slider, enum KzuUiSliderDirection direction) |
| Sets slider direction. More... | |
Variables | |
| const KzuObjectType | KZU_OBJECT_TYPE_UI_SLIDER |
| Object type for Slider. More... | |
User interface slider.
KzuUiSlider is a layout that works with two children, a rail and a knob, which are the first and second child respectively. Normally the Kanzi Studio creates these children automatically as empty nodes, and other objects can then be set as children of these empty nodes. The knob moves along a user-specified axis, it is the KzuUiSlider user's job to make it look like it moves along the rail.
KZU_MESSAGE_SLIDER_VALUE_CHANGED message is sent whenever the slider's value changes. It has one float argument KZU_MESSAGE_ARGUMENT__SLIDER__VALUE telling the slider's current value.
KZU_MESSAGE_SLIDER_DRAG_STARTED message is sent when the user starts to drag the slider. It has one float argument KZU_MESSAGE_ARGUMENT__SLIDER__VALUE telling the slider's current value.
KZU_MESSAGE_SLIDER_DRAG_FINISHED message is sent when the user stops dragging the slider. It has one float argument KZU_MESSAGE_ARGUMENT__SLIDER__VALUE telling the slider's current value.
The slider handles KZU_MESSAGE_SLIDER_INCREASE_VALUE message with one float argument KZU_MESSAGE_ARGUMENT__SET_PROPERTY__FLOAT_VALUE that is added to the slider's current value.
The slider handles KZU_MESSAGE_SLIDER_DECREASE_VALUE message with one float argument KZU_MESSAGE_ARGUMENT__SET_PROPERTY__FLOAT_VALUE that is subtracted from the slider's current value.
The slider handles KZU_MESSAGE_SLIDER_SET_VALUE message with one float argument KZU_MESSAGE_ARGUMENT__SET_PROPERTY__FLOAT_VALUE that will be set as the slider's current value.
KZU_PROPERTY_TYPE_SLIDER_DIRECTION integer property can be set to change the movement axis of the slider. The value should be one of the values in KzuUiSliderDirection. The default value is KZU_UI_SLIDER_DIRECTION_X.
KZU_PROPERTY_TYPE_SLIDER_EXPAND_DIRECTION integer property can be set to expand the input sensitive area of the slider. The value should be one of the values in KzuUiSliderExpandDirection. If the value specifies an axis, that axis' coordinate is assumed to always hit the slider in input events.
KZU_PROPERTY_TYPE_SLIDER_MINIMUM_VALUE float property specifies the minimum slider value. The default value is 0.
KZU_PROPERTY_TYPE_SLIDER_MAXIMUM_VALUE float property specifies the minimum slider value. The default value is 1.
KZU_PROPERTY_TYPE_SLIDER_VALUE float property specifies the slider's value. It should be between the values of KZU_PROPERTY_TYPE_SLIDER_MINIMUM_VALUE and KZU_PROPERTY_TYPE_SLIDER_MAXIMUM_VALUE properties. The default value is 0.5. The property is changed by the slider itself when the knob is dragged but it can also be changed by the user.
KZU_PROPERTY_TYPE_SLIDER_INVERT_DIRECTION Boolean property can be set to swap the slider's minimum and maximum ends. The default value is KZ_FALSE.
Copyright 2008-2019 by Rightware. All rights reserved.
| enum KzuUiSliderDirection |
Slider expand direction.
| kzsError kzuUiSliderCreate | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | name, | ||
| struct KzuUIDomain * | uiDomain, | ||
| struct KzuUiSlider ** | out_slider | ||
| ) |
Creates a slider with default settings.
| kzsError kzuUiSliderRegisterToFactory | ( | const struct KzuFactory * | factory) |
Registers component type to factory.
| struct KzuUiComponentNode* kzuUiSliderToUiComponentNode | ( | const struct KzuUiSlider * | slider) |
Casts to UiComponentNode.
| struct KzuUiSlider* kzuUiSliderFromUiComponentNode | ( | const struct KzuUiComponentNode * | component) |
Casts to UiSlider.
| kzsError kzuUiSliderSetValueExternal | ( | const struct KzuUiSlider * | slider, |
| kzFloat | value | ||
| ) |
Sets the slider value.
The given value should be in range [0.0, 1.0], i.e. the the slider bounds and direction are ignored. Also sends a slider value changed message.
| struct KzuObjectNode* kzuUiSliderGetKnob | ( | const struct KzuUiSlider * | slider) |
Gets the empty object node under which the slider knob must be placed.
| struct KzuObjectNode* kzuUiSliderGetBar | ( | const struct KzuUiSlider * | slider) |
Gets the empty object node under which the slider rail must be placed.
| kzFloat kzuUiSliderGetValue | ( | const struct KzuUiSlider * | slider) |
Gets slider value.
| kzsError kzuUiSliderSetValue | ( | const struct KzuUiSlider * | slider, |
| kzFloat | value | ||
| ) |
Sets the slider value.
The given value should be in range [Slider Minimum Value, Slider Maximum Value].
| enum KzuUiSliderExpandDirection kzuUiSliderGetExpandOnDragDirection | ( | const struct KzuUiSlider * | slider) |
Gets slider expand direction on drag.
This is the hidden axis where the objects collision box is expanded when user drags slider.
| kzsError kzuUiSliderSetExpandOnDragDirection | ( | const struct KzuUiSlider * | slider, |
| enum KzuUiSliderExpandDirection | direction | ||
| ) |
Sets slider expand direction on drag.
This is the hidden axis where the objects collision box is expanded when user drags slider.
| enum KzuUiSliderDirection kzuUiSliderGetDirection | ( | const struct KzuUiSlider * | slider) |
Gets slider direction.
| kzsError kzuUiSliderSetDirection | ( | const struct KzuUiSlider * | slider, |
| enum KzuUiSliderDirection | direction | ||
| ) |
Sets slider direction.
| const KzuObjectType KZU_OBJECT_TYPE_UI_SLIDER |
Object type for Slider.