NXWidgets  1.19
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NXWidgets::CScrollbarVertical Class Reference

#include <cscrollbarvertical.hxx>

Inheritance diagram for NXWidgets::CScrollbarVertical:
Inheritance graph

Public Member Functions

 CScrollbarVertical (CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, CWidgetStyle *style=(CWidgetStyle *) NULL)
 
virtual ~CScrollbarVertical (void)
 
const int getMinimumValue (void) const
 
const int getMaximumValue (void) const
 
const int getValue (void) const
 
const nxgl_coord_t getPageSize (void) const
 
void setMinimumValue (const int value)
 
void setMaximumValue (const int value)
 
void setValue (const int value)
 
void setValueWithBitshift (const int32_t value)
 
void setPageSize (const nxgl_coord_t pageSize)
 
virtual void handleActionEvent (const CWidgetEventArgs &e)
 
virtual void handleClickEvent (const CWidgetEventArgs &e)
 
virtual void handleReleaseEvent (const CWidgetEventArgs &e)
 
virtual void handleReleaseOutsideEvent (const CWidgetEventArgs &e)
 
virtual void handleValueChangeEvent (const CWidgetEventArgs &e)
 
- Public Member Functions inherited from NXWidgets::ISlider
virtual ~ISlider (void)
 
- Public Member Functions inherited from NXWidgets::CNxWidget
 CNxWidget (CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, uint32_t flags, FAR const CWidgetStyle *style=(FAR const CWidgetStyle *) NULL)
 
virtual ~CNxWidget (void)
 
nxgl_coord_t getX (void) const
 
nxgl_coord_t getY (void) const
 
nxgl_coord_t getRelativeX (void) const
 
nxgl_coord_t getRelativeY (void) const
 
bool hasFocus (void) const
 
bool isDeleted (void) const
 
bool isDrawingEnabled (void) const
 
bool isHidden (void) const
 
bool isEnabled (void) const
 
bool isPermeable (void) const
 
bool isDoubleClickable (void) const
 
bool isBorderless (void) const
 
bool isClicked (void) const
 
bool isBeingDragged (void) const
 
nxgl_coord_t getWidth (void) const
 
nxgl_coord_t getHeight (void) const
 
void getSize (struct nxgl_size_s &size) const
 
void getPos (struct nxgl_point_s &pos) const
 
CRect getBoundingBox (void)
 
void getBorderSize (WidgetBorderSize &borderSize)
 
CNxWidgetgetParent (void) const
 
CNxWidgetgetFocusedWidget (void)
 
virtual void getPreferredDimensions (CRect &rect) const
 
void getClientRect (CRect &rect) const
 
void getRect (CRect &rect) const
 
CNxFontgetFont (void) const
 
nxgl_mxpixel_t getBackgroundColor (void) const
 
nxgl_mxpixel_t getSelectedBackgroundColor (void) const
 
nxgl_mxpixel_t getShineEdgeColor (void) const
 
nxgl_mxpixel_t getShadowEdgeColor (void) const
 
nxgl_mxpixel_t getHighlightColor (void) const
 
nxgl_mxpixel_t getDisabledTextColor (void) const
 
nxgl_mxpixel_t getEnabledTextColor (void) const
 
nxgl_mxpixel_t getSelectedTextColor (void) const
 
const CWidgetStylegetWidgetStyle () const
 
void setBorderless (bool isBorderless)
 
void setDraggable (bool isDraggable)
 
void setPermeable (bool permeable)
 
void setDoubleClickable (bool doubleClickable)
 
void addWidgetEventHandler (CWidgetEventHandler *eventHandler)
 
void removeWidgetEventHandler (CWidgetEventHandler *eventHandler)
 
int nWidgetEventHandlers (void) const
 
void setRaisesEvents (bool raises)
 
bool raisesEvents (void) const
 
void disableDrawing (void)
 
void enableDrawing (void)
 
void setBackgroundColor (nxgl_mxpixel_t color)
 
void setSelectedBackgroundColor (nxgl_mxpixel_t color)
 
void setShineEdgeColor (nxgl_mxpixel_t color)
 
void setShadowEdgeColor (nxgl_mxpixel_t color)
 
void setHighlightColor (nxgl_mxpixel_t color)
 
void setDisabledTextColor (nxgl_mxpixel_t color)
 
void setEnabledTextColor (nxgl_mxpixel_t color)
 
void setSelectedTextColor (nxgl_mxpixel_t color)
 
virtual void setFont (CNxFont *font)
 
void redraw (void)
 
bool enable (void)
 
bool disable (void)
 
void close (void)
 
bool show (void)
 
bool hide (void)
 
virtual bool click (nxgl_coord_t x, nxgl_coord_t y)
 
virtual bool isDoubleClick (nxgl_coord_t x, nxgl_coord_t y)
 
bool doubleClick (nxgl_coord_t x, nxgl_coord_t y)
 
bool release (nxgl_coord_t x, nxgl_coord_t y)
 
bool drag (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t vX, nxgl_coord_t vY)
 
bool keyPress (nxwidget_char_t key)
 
bool cursorControl (ECursorControl control)
 
bool focus (void)
 
bool blur (void)
 
bool moveTo (nxgl_coord_t x, nxgl_coord_t y)
 
bool resize (nxgl_coord_t width, nxgl_coord_t height)
 
bool changeDimensions (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height)
 
void moveChildToDeleteQueue (CNxWidget *widget)
 
void setFocusedWidget (CNxWidget *widget)
 
virtual bool checkCollision (nxgl_coord_t x, nxgl_coord_t y) const
 
virtual bool checkCollision (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height) const
 
bool checkCollision (CNxWidget *widget) const
 
void addWidget (CNxWidget *widget)
 
void insertWidget (CNxWidget *widget)
 
void setParent (CNxWidget *parent)
 
void destroy (void)
 
bool remove (void)
 
bool removeChild (CNxWidget *widget)
 
const CNxWidgetgetChild (int index) const
 
int getChildCount (void) const
 
void setBorderSize (const WidgetBorderSize &borderSize)
 
- Public Member Functions inherited from NXWidgets::CWidgetEventHandler
 CWidgetEventHandler ()
 
virtual ~CWidgetEventHandler ()
 
virtual void handleDragEvent (const CWidgetEventArgs &e)
 
virtual void handleDropEvent (const CWidgetEventArgs &e)
 
virtual void handleKeyPressEvent (const CWidgetEventArgs &e)
 
virtual void handleCursorControlEvent (const CWidgetEventArgs &e)
 
virtual void handleFocusEvent (const CWidgetEventArgs &e)
 
virtual void handleBlurEvent (const CWidgetEventArgs &e)
 
virtual void handleCloseEvent (const CWidgetEventArgs &e)
 
virtual void handleHideEvent (const CWidgetEventArgs &e)
 
virtual void handleShowEvent (const CWidgetEventArgs &e)
 
virtual void handleEnableEvent (const CWidgetEventArgs &e)
 
virtual void handleDisableEvent (const CWidgetEventArgs &e)
 
virtual void handleResizeEvent (const CWidgetEventArgs &e)
 
virtual void handleMoveEvent (const CWidgetEventArgs &e)
 
virtual void handleScrollEvent (const CWidgetEventArgs &e)
 
virtual void handleDoubleClickEvent (const CWidgetEventArgs &e)
 

Protected Member Functions

virtual void onResize (nxgl_coord_t width, nxgl_coord_t height)
 
 CScrollbarVertical (const CScrollbarVertical &scrollbarVertical)
 
- Protected Member Functions inherited from NXWidgets::CNxWidget
void useWidgetStyle (const CWidgetStyle *style)
 
virtual void drawContents (CGraphicsPort *port)
 
virtual void drawBorder (CGraphicsPort *port)
 
void drawChildren (void)
 
void closeChild (CNxWidget *widget)
 
void startDragging (nxgl_coord_t x, nxgl_coord_t y)
 
void stopDragging (nxgl_coord_t x, nxgl_coord_t y)
 
 CNxWidget (const CNxWidget &widget)
 
virtual void onClick (nxgl_coord_t x, nxgl_coord_t y)
 
virtual void onDoubleClick (nxgl_coord_t x, nxgl_coord_t y)
 
virtual void onPreRelease (nxgl_coord_t x, nxgl_coord_t y)
 
virtual void onRelease (nxgl_coord_t x, nxgl_coord_t y)
 
virtual void onReleaseOutside (nxgl_coord_t x, nxgl_coord_t y)
 
virtual void onDrag (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t vX, nxgl_coord_t vY)
 
virtual void onDragStart (void)
 
virtual void onDragStop (void)
 
virtual void onFocus (void)
 
virtual void onBlur (void)
 
virtual void onEnable (void)
 
virtual void onDisable (void)
 

Protected Attributes

CSliderVerticalm_slider
 
CGlyphButtonm_upButton
 
CGlyphButtonm_downButton
 
nxgl_coord_t m_buttonHeight
 
uint8_t m_scrollTimeout
 
CNxTimerm_timer
 
- Protected Attributes inherited from NXWidgets::CNxWidget
CWidgetControlm_widgetControl
 
CRect m_rect
 
nxgl_coord_t m_grabPointX
 
nxgl_coord_t m_grabPointY
 
nxgl_coord_t m_newX
 
nxgl_coord_t m_newY
 
CWidgetStyle m_style
 
Flags m_flags
 
CWidgetEventHandlerListm_widgetEventHandlers
 
struct timespec m_lastClickTime
 
nxgl_coord_t m_lastClickX
 
nxgl_coord_t m_lastClickY
 
int m_doubleClickBounds
 
CNxWidgetm_parent
 
CNxWidgetm_focusedChild
 
TNxArray< CNxWidget * > m_children
 
WidgetBorderSize m_borderSize
 

Additional Inherited Members

- Public Types inherited from NXWidgets::CNxWidget
enum  WidgetFlagType {
  WIDGET_BORDERLESS = 0x0001, WIDGET_DRAGGABLE = 0x0002, WIDGET_PERMEABLE = 0x0004, WIDGET_DOUBLE_CLICKABLE = 0x0008,
  WIDGET_NO_RAISE_EVENTS = 0x0010
}
 

Detailed Description

Container class that holds a slider widget and two arrow buttons. The interface is presents is virtually identical to the CSliderVertical widget, which means the two are easily interchangeable. All events raised by the internal slider widget are re-raised by this widget to this widget's event handler, meaning its events are also identical to the CSliderVertical's.

Definition at line 113 of file cscrollbarvertical.hxx.

Constructor & Destructor Documentation

◆ CScrollbarVertical() [1/2]

NXWidgets::CScrollbarVertical::CScrollbarVertical ( const CScrollbarVertical scrollbarVertical)
inlineprotected

Copy constructor is protected to prevent usage.

Definition at line 137 of file cscrollbarvertical.hxx.

◆ CScrollbarVertical() [2/2]

CScrollbarVertical::CScrollbarVertical ( CWidgetControl pWidgetControl,
nxgl_coord_t  x,
nxgl_coord_t  y,
nxgl_coord_t  width,
nxgl_coord_t  height,
CWidgetStyle style = (CWidgetStyle *)NULL 
)

Constructor.

Parameters
pWidgetControlThe widget control instance for the window.
xThe x coordinate of the slider, relative to its parent.
yThe y coordinate of the slider, relative to its parent.
widthThe width of the slider.
heightThe height of the slider.
styleThe style that the widget should use. If this is not specified, the widget will use the values stored in the global g_defaultWidgetStyle object. The widget will copy the properties of the style into its own internal style object.

Definition at line 112 of file cscrollbarvertical.cxx.

◆ ~CScrollbarVertical()

virtual NXWidgets::CScrollbarVertical::~CScrollbarVertical ( void  )
inlinevirtual

Destructor.

Definition at line 165 of file cscrollbarvertical.hxx.

Member Function Documentation

◆ getMaximumValue()

const int CScrollbarVertical::getMaximumValue ( void  ) const
virtual

Get the largest value that the slider can represent.

Returns
The largest value.

Implements NXWidgets::ISlider.

Definition at line 174 of file cscrollbarvertical.cxx.

◆ getMinimumValue()

const int CScrollbarVertical::getMinimumValue ( void  ) const
virtual

Get the smallest value that the slider can represent.

Returns
The smallest value.

Implements NXWidgets::ISlider.

Definition at line 163 of file cscrollbarvertical.cxx.

◆ getPageSize()

const nxgl_coord_t CScrollbarVertical::getPageSize ( void  ) const
virtual

Get the value represented by the height of the grip. For sliders, this would typically be 1 (so each new grip position is worth 1). For scrollbars, this would be the height of the scrolling widget.

Returns
The page size.

Implements NXWidgets::ISlider.

Definition at line 199 of file cscrollbarvertical.cxx.

◆ getValue()

const int CScrollbarVertical::getValue ( void  ) const
virtual

Get the current value of the slider.

Returns
The current slider value.

Implements NXWidgets::ISlider.

Definition at line 185 of file cscrollbarvertical.cxx.

◆ handleActionEvent()

void CScrollbarVertical::handleActionEvent ( const CWidgetEventArgs e)
virtual

Process events fired by the grip.

Parameters
eThe event details.

Reimplemented from NXWidgets::CWidgetEventHandler.

Definition at line 270 of file cscrollbarvertical.cxx.

◆ handleClickEvent()

void CScrollbarVertical::handleClickEvent ( const CWidgetEventArgs e)
virtual

Process events fired by the grip.

Parameters
eThe event details.

Reimplemented from NXWidgets::CWidgetEventHandler.

Definition at line 301 of file cscrollbarvertical.cxx.

◆ handleReleaseEvent()

void CScrollbarVertical::handleReleaseEvent ( const CWidgetEventArgs e)
virtual

Process events fired by the grip.

Parameters
eThe event details.

Reimplemented from NXWidgets::CWidgetEventHandler.

Definition at line 333 of file cscrollbarvertical.cxx.

◆ handleReleaseOutsideEvent()

void CScrollbarVertical::handleReleaseOutsideEvent ( const CWidgetEventArgs e)
virtual

Process events fired by the grip.

Parameters
eThe event details.

Reimplemented from NXWidgets::CWidgetEventHandler.

Definition at line 349 of file cscrollbarvertical.cxx.

◆ handleValueChangeEvent()

void CScrollbarVertical::handleValueChangeEvent ( const CWidgetEventArgs e)
virtual

Process events fired by the grip.

Parameters
eThe event details.

Reimplemented from NXWidgets::CWidgetEventHandler.

Definition at line 365 of file cscrollbarvertical.cxx.

◆ onResize()

void CScrollbarVertical::onResize ( nxgl_coord_t  width,
nxgl_coord_t  height 
)
protectedvirtual

Resize the scrollbar to the new dimensions.

Parameters
widthThe new width.
heightThe new height.

Reimplemented from NXWidgets::CNxWidget.

Definition at line 380 of file cscrollbarvertical.cxx.

◆ setMaximumValue()

void CScrollbarVertical::setMaximumValue ( const int  value)
virtual

Set the largest value that the slider can represent.

Parameters
valueThe largest value.

Implements NXWidgets::ISlider.

Definition at line 221 of file cscrollbarvertical.cxx.

◆ setMinimumValue()

void CScrollbarVertical::setMinimumValue ( const int  value)
virtual

Set the smallest value that the slider can represent.

Parameters
valueThe smallest value.

Implements NXWidgets::ISlider.

Definition at line 210 of file cscrollbarvertical.cxx.

◆ setPageSize()

void CScrollbarVertical::setPageSize ( const nxgl_coord_t  pageSize)
virtual

Set the page size represented by the grip.

Parameters
pageSizeThe page size.
See also
getPageSize().

Implements NXWidgets::ISlider.

Definition at line 259 of file cscrollbarvertical.cxx.

◆ setValue()

void CScrollbarVertical::setValue ( const int  value)
virtual

Set the value that of the slider. This will reposition and redraw the grip.

Parameters
valueThe new value.

Implements NXWidgets::ISlider.

Definition at line 233 of file cscrollbarvertical.cxx.

◆ setValueWithBitshift()

void CScrollbarVertical::setValueWithBitshift ( const int32_t  value)
virtual

Set the value that of the slider. This will reposition and redraw the grip. The supplied value should be bitshifted left 16 places. This ensures greater accuracy than the standard setValue() method if the slider is being used as a scrollbar.

Parameters
valueThe new value.

Implements NXWidgets::ISlider.

Definition at line 247 of file cscrollbarvertical.cxx.

Member Data Documentation

◆ m_buttonHeight

nxgl_coord_t NXWidgets::CScrollbarVertical::m_buttonHeight
protected

Height of the buttons

Definition at line 119 of file cscrollbarvertical.hxx.

◆ m_downButton

CGlyphButton* NXWidgets::CScrollbarVertical::m_downButton
protected

Pointer to the down button

Definition at line 118 of file cscrollbarvertical.hxx.

◆ m_scrollTimeout

uint8_t NXWidgets::CScrollbarVertical::m_scrollTimeout
protected

Time until a button triggers another grip movement

Definition at line 120 of file cscrollbarvertical.hxx.

◆ m_slider

CSliderVertical* NXWidgets::CScrollbarVertical::m_slider
protected

Pointer to the slider widget

Definition at line 116 of file cscrollbarvertical.hxx.

◆ m_timer

CNxTimer* NXWidgets::CScrollbarVertical::m_timer
protected

Controls slider button repeats

Definition at line 122 of file cscrollbarvertical.hxx.

◆ m_upButton

CGlyphButton* NXWidgets::CScrollbarVertical::m_upButton
protected

Pointer to the up button

Definition at line 117 of file cscrollbarvertical.hxx.


The documentation for this class was generated from the following files: