77 #include <nuttx/config.h> 113 nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width,
114 nxgl_coord_t thickness,
IBitmap *gripBitmap,
116 :
CNxWidget(control, x, y, width, thickness, WIDGET_DRAGGABLE)
136 nxgl_coord_t gripHeight = gripBitmap->
getHeight() + 4;
137 if (gripHeight > thickness)
160 gripHeight, gripBitmap);
196 int32_t newValue = value;
201 if (newValue > maxValue)
213 newGripX += newGripX & 0x8000;
215 newGripX += rect.
getX();
269 gutterRatio += gutterRatio & 0x8000;
354 getY() + halfHeight - halfBar + 1,
364 getY() + halfHeight - halfBar + 1, width,
380 getWidth(), halfHeight - (m_barThickness - halfBar),
406 int halfGripWidth = gripWidth >> 1;
419 width = gripX - x - halfGripWidth;
442 width =
getWidth() - (gripX - x + gripWidth) - 1 - halfGripWidth;
447 getWidth() - (gripX - x + gripWidth) - 1 -
450 getWidth() - (gripX - x + gripWidth) - 1 -
456 if (gripX > x + halfGripWidth)
464 if (gripX + gripWidth < x +
getWidth() - 1 - halfGripWidth)
CGlyphSliderHorizontalGrip * m_grip
const int32_t getGripValue(void) const
const T & getSource(void) const
bool isBorderless(void) const
nxgl_mxpixel_t getShadowEdgeColor(void) const
void drawVertLine(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t height, nxgl_mxpixel_t color)
nxgl_coord_t getHeight(void) const
bool moveTo(nxgl_coord_t x, nxgl_coord_t y)
void setRaisesEvents(bool raises)
nxgl_coord_t getWidth(void) const
nxgl_coord_t getX(void) const
CGlyphSliderHorizontal(CWidgetControl *control, nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t thickness, IBitmap *gripBitmap, nxwidget_pixel_t fillColor, bool fill=true)
void setValue(const int value)
bool raisesEvents(void) const
nxgl_mxpixel_t getBackgroundColor(void) const
virtual void drawBorder(CGraphicsPort *port)
void drawHorizLine(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_mxpixel_t color)
virtual const nxgl_coord_t getHeight(void) const =0
virtual void onClick(nxgl_coord_t x, nxgl_coord_t y)
nxgl_coord_t getHeight(void) const
void setHeight(nxgl_coord_t height)
void getClientRect(CRect &rect) const
virtual void handleDragEvent(const CWidgetEventArgs &e)
void addWidgetEventHandler(CWidgetEventHandler *eventHandler)
void drawFilledRect(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, nxgl_mxpixel_t color)
nxgl_mxpixel_t getShineEdgeColor(void) const
int32_t getPhysicalMaximumValueWithBitshift(void) const
CWidgetEventHandlerList * m_widgetEventHandlers
nxgl_coord_t m_minimumGripWidth
void addWidget(CNxWidget *widget)
virtual const nxgl_coord_t getWidth(void) const =0
virtual void onResize(nxgl_coord_t width, nxgl_coord_t height)
nxgl_coord_t getY(void) const
nxgl_coord_t getWidth(void) const
void setValueWithBitshift(const int32_t value)
nxgl_coord_t getX(void) const
void raiseValueChangeEvent(void)
nxwidget_pixel_t m_fillColor
void setBorderless(bool isBorderless)
nxgl_coord_t getMinimumStep(void) const
virtual void drawContents(CGraphicsPort *port)