#ifndef TEXT_WIDGET_H #define TEXT_WIDGET_H #include "widget.h" typedef struct { widget_vtable_t base; void (*set_text)( void *obj, const char *s ); } text_widget_vtable_t; typedef struct { widget_t base; text_widget_vtable_t *vtable; const char *s; } text_widget_t; void text_widget_init( text_widget_t *widget, widget_t *parent, const int x, const int y, const int w, const int h, const vga_color_t background_color, const char *s ); void text_widget_draw( void *obj, graphics_context_t *context ); void text_widget_set_text( void *obj, const char *s ); #endif // TEXT_WIDGET_H