// widgetScrollPane.h -- ScrollPane widget API #ifndef WIDGET_SCROLLPANE_H #define WIDGET_SCROLLPANE_H #include "../core/dvxWidget.h" typedef struct { WidgetT *(*create)(WidgetT *parent); void (*scrollToChild)(WidgetT *sp, const WidgetT *child); } ScrollPaneApiT; static inline const ScrollPaneApiT *dvxScrollPaneApi(void) { static const ScrollPaneApiT *sApi; if (!sApi) { sApi = (const ScrollPaneApiT *)wgtGetApi("scrollpane"); } return sApi; } #define wgtScrollPane(parent) dvxScrollPaneApi()->create(parent) #define wgtScrollPaneScrollToChild(sp, child) dvxScrollPaneApi()->scrollToChild((sp), (child)) #endif // WIDGET_SCROLLPANE_H