  | 
  
    MPLABĀ® Harmony Graphics Suite
    
   | 
 
 
 
 
Go to the documentation of this file.
   45 #ifndef LEGATO_SLIDER_H 
   46 #define LEGATO_SLIDER_H 
   50 #if LE_SLIDER_WIDGET_ENABLED 
   78 typedef enum leSliderState
 
   81     LE_SLIDER_STATE_HANDLE_DOWN,
 
   82     LE_SLIDER_STATE_AREA_DOWN
 
   85 typedef struct leSliderWidget leSliderWidget;
 
   99 typedef void (*leSliderWidget_ValueChangedEvent)(leSliderWidget*);
 
  101 typedef struct leSliderWidget leSliderWidget;
 
  107 #define LE_SLIDERWIDGET_VTABLE(THIS_TYPE) \ 
  108     LE_WIDGET_VTABLE(THIS_TYPE) \ 
  110     leOrientation (*getOrientation)(const THIS_TYPE* _this); \ 
  111     leResult  (*setOrientation)(THIS_TYPE* _this, leOrientation align, leBool swapDimensions); \ 
  112     uint32_t  (*getGripSize)(const THIS_TYPE* _this); \ 
  113     leResult  (*setGripSize)(THIS_TYPE* _this, uint32_t sz); \ 
  114     uint32_t  (*getMininumValue)(const THIS_TYPE* _this); \ 
  115     leResult  (*setMinimumValue)(THIS_TYPE* _this, uint32_t min); \ 
  116     uint32_t  (*getMaximumValue)(const THIS_TYPE* _this); \ 
  117     leResult  (*setMaximumValue)(THIS_TYPE* _this, uint32_t max); \ 
  118     uint32_t  (*getPercentage)(const THIS_TYPE* _this); \ 
  119     leResult  (*setPercentage)(THIS_TYPE* _this, uint32_t per); \ 
  120     int32_t   (*getValue)(const THIS_TYPE* _this); \ 
  121     leResult  (*setValue)(THIS_TYPE* _this, int32_t val); \ 
  122     leResult  (*step)(THIS_TYPE* _this, int32_t amt); \ 
  123     leSliderWidget_ValueChangedEvent (*getValueChangedEventCallback)(const THIS_TYPE* _this); \ 
  124     leResult  (*setValueChangedEventCallback)(THIS_TYPE* _this, leSliderWidget_ValueChangedEvent cb); 
  126 typedef struct leSliderWidgetVTable
 
  128     LE_SLIDERWIDGET_VTABLE(leSliderWidget)
 
  129 } leSliderWidgetVTable; 
 
  142 typedef struct leSliderWidget
 
  146     const leSliderWidgetVTable* fn;
 
  156     leSliderWidget_ValueChangedEvent valueChangedEvent; 
 
  198 LIB_EXPORT leSliderWidget* leSliderWidget_New();
 
  210 LIB_EXPORT 
void leSliderWidget_Constructor(leSliderWidget* sld);
 
  214 #define THIS_TYPE struct leWidget 
  287 virtual leResult setOrientation(leSliderWidget* _this,
 
  320 virtual uint32_t getMaximumValue(
const leSliderWidget* _this);
 
  356 leResult setMaximumValue(leSliderWidget* _this,
 
  389 virtual uint32_t getMaximumValue(
const leSliderWidget* _this);
 
  426 virtual leResult setMaximumValue(leSliderWidget* _this,
 
  459 virtual uint32_t getPercentage(
const leSliderWidget* _this);
 
  496 virtual leResult setPercentage(leSliderWidget* _this,
 
  529 virtual uint32_t getValue(
const leSliderWidget* _this);
 
  566 virtual leResult setPercentage(leSliderWidget* _this,
 
  604 virtual leResult step(leSliderWidget* _this,
 
  617 virtual leSliderWidget_ValueChangedEvent getValueChangedEventCallback
 
  618                                           (
const leSliderWidget* _this);
 
  633 virtual leResult setValueChangedEventCallback(leSliderWidget* _this,
 
  634                                               leSliderWidget_ValueChangedEvent cb);
 
  642 #endif // LE_SLIDER_WIDGET_ENABLED 
  
Defines common math functions for general use.
 
Error functions, macros and definitions.
 
leResult
This enum represents function call results.
Definition: legato_common.h:134
 
LIB_EXPORT uint32_t lePercentWholeRounded(uint32_t l, uint32_t r)
Calculate percent whole rounded.
Definition: legato_math.c:204
 
This struct represents a rectangle.
Definition: legato_common.h:405
 
Memory functions and definitions.
 
LIB_EXPORT uint32_t lePercentOf(uint32_t num, uint32_t percent)
Calculate percent of a number.
Definition: legato_math.c:218
 
leOrientation
This enum represents the orientation modes for objects.
Definition: legato_common.h:340
 
leBool
This enum represents booleans.
Definition: legato_common.h:157
 
LIB_EXPORT leBool leRectContainsPoint(const leRect *rect, const lePoint *point)
Determines if a point is inside a rectangle.
Definition: legato_rect.c:31
 
General internal utilities for the library.
 
Fixed string functions and definitions.
 
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
 
The header file joins all header files used in the graphics object library.
 
leColor leScheme_GetRenderColor(const leScheme *schm, leSchemeColor clr)
Gets a scheme render color for the current layer color mode.
Definition: legato_scheme.c:68
 
@ LE_TRUE
Definition: legato_common.h:159
 
Common macros and definitions used by Legato.
 
virtual void destructor(leString *_this)
Destruct string.
 
This structure represents a integer Cartesian point.
Definition: legato_common.h:357