36 #ifndef __INCLUDE_CWIDGETCONTROLT_HXX 37 #define __INCLUDE_CWIDGETCONTROLT_HXX 43 #include <nuttx/config.h> 48 #include <semaphore.h> 72 #if defined(__cplusplus) 105 #ifdef CONFIG_NX_XYINPUT 112 #if 0 // Center and right buttons are not used 184 #ifdef CONFIG_NXWIDGET_EVENTWAIT 195 #ifdef CONFIG_NX_XYINPUT 245 uint32_t
elapsedTime(FAR
const struct timespec *startTime);
305 #ifdef CONFIG_NXWIDGET_EVENTWAIT 346 sem_post(&m_boundsSem);
359 #ifdef CONFIG_NX_XYINPUT 399 #ifdef CONFIG_NXWIDGET_EVENTWAIT 409 #ifdef CONFIG_NXWIDGET_EVENTWAIT 484 return m_widgets.
size();
532 if (widget == m_focusedWidget)
599 const struct nxgl_size_s *size,
600 const struct nxgl_point_s *pos,
601 const struct nxgl_rect_s *bounds);
611 void redrawEvent(FAR
const struct nxgl_rect_s *nxRect,
bool more);
620 void newMouseEvent(FAR
const struct nxgl_point_s *pos, uint8_t buttons);
799 #endif // __cplusplus 801 #endif // __INCLUDE_CWIDGETCONTROLT_HXX void removeWindowEventHandler(CWindowEventHandler *eventHandler)
bool createGraphicsPort(INxWindow *window)
CWidgetControl(FAR const CWidgetStyle *style=(const CWidgetStyle *) NULL)
CGraphicsPort * getGraphicsPort(void)
const int getControlledWidgetCount(void) const
void windowBlocked(FAR void *arg)
void addControlledWidget(CNxWidget *widget)
bool pollKeyboardEvents(void)
TNxArray< CNxWidget * > m_deleteQueue
CNxWidget * m_clickedWidget
void addToDeleteQueue(CNxWidget *widget)
struct timespec leftReleaseTime
void copyWidgetStyle(CWidgetStyle *dest, const CWidgetStyle *src)
void waitForWindowEvent(void)
void setFocusedWidget(CNxWidget *widget)
const int getWidgetIndex(const CNxWidget *widget) const
const bool isWaiting(void) const
uint32_t elapsedTime(FAR const struct timespec *startTime)
void redrawEvent(FAR const struct nxgl_rect_s *nxRect, bool more)
bool getWindowPosition(FAR struct nxgl_point_s *pos)
struct nxgl_rect_s m_bounds
nxgl_coord_t getWindowWidth(void)
uint8_t m_kbdbuf[CONFIG_NXWIDGETS_KBDBUFFER_SIZE]
struct nxgl_point_s m_pos
bool pollEvents(CNxWidget *widget=(CNxWidget *) NULL)
bool swapWidgetDepth(CNxWidget *widget)
bool pollCursorControlEvents(void)
void processDeleteQueue(void)
void setWidgetStyle(const CWidgetStyle *style)
void handleLeftClick(nxgl_coord_t x, nxgl_coord_t y, CNxWidget *widget)
void newCursorControlEvent(ECursorControl cursorControl)
void addWindowEventHandler(CWindowEventHandler *eventHandler)
void waitBoundsData(void)
void getWindowBoundingBox(FAR struct nxgl_rect_s *bounds)
virtual ~CWidgetControl(void)
CNxWidget * getFocusedWidget(void)
CRect getWindowBoundingBox(void)
CNxWidget * getClickedWidget(void)
void push_back(const T &value)
void postWindowEvent(void)
void removeWindowEventHandler(CWindowEventHandler *eventHandler)
struct timespec leftPressTime
void geometryEvent(NXHANDLE hWindow, const struct nxgl_size_s *size, const struct nxgl_point_s *pos, const struct nxgl_rect_s *bounds)
nxgl_coord_t getWindowHeight(void)
CWindowEventHandlerList m_eventHandlers
struct SXYInput m_xyinput
void getWidgetStyle(CWidgetStyle *style)
TNxArray< CNxWidget * > m_widgets
void newKeyboardEvent(uint8_t nCh, FAR const uint8_t *pStr)
void setClickedWidget(CNxWidget *widget)
CNxWidget * m_focusedWidget
uint8_t m_controls[CONFIG_NXWIDGETS_CURSORCONTROL_SIZE]
struct nxgl_size_s m_size
const int size(void) const
bool getWindowSize(FAR struct nxgl_size_s *size)
void raiseBlockedEvent(FAR void *arg)
NXHANDLE getWindowHandle(void)
void clearMouseEvents(void)
bool pollMouseEvents(CNxWidget *widget)
void newMouseEvent(FAR const struct nxgl_point_s *pos, uint8_t buttons)
void clearFocusedWidget(CNxWidget *widget)
void addWindowEventHandler(CWindowEventHandler *eventHandler)
void removeControlledWidget(CNxWidget *widget)