|
|
|
@ -37,11 +37,13 @@ typedef enum HandlerResult_ { |
|
|
|
|
|
|
|
|
|
|
|
typedef HandlerResult (*Panel_EventHandler)(Panel*, int); |
|
|
|
typedef HandlerResult (*Panel_EventHandler)(Panel*, int); |
|
|
|
typedef void (*Panel_DrawFunctionBar)(Panel*); |
|
|
|
typedef void (*Panel_DrawFunctionBar)(Panel*); |
|
|
|
|
|
|
|
typedef void (*Panel_PrintHeader)(Panel*); |
|
|
|
|
|
|
|
|
|
|
|
typedef struct PanelClass_ { |
|
|
|
typedef struct PanelClass_ { |
|
|
|
const ObjectClass super; |
|
|
|
const ObjectClass super; |
|
|
|
const Panel_EventHandler eventHandler; |
|
|
|
const Panel_EventHandler eventHandler; |
|
|
|
const Panel_DrawFunctionBar drawFunctionBar; |
|
|
|
const Panel_DrawFunctionBar drawFunctionBar; |
|
|
|
|
|
|
|
const Panel_PrintHeader printHeader; |
|
|
|
} PanelClass; |
|
|
|
} PanelClass; |
|
|
|
|
|
|
|
|
|
|
|
#define As_Panel(this_) ((const PanelClass*)((this_)->super.klass)) |
|
|
|
#define As_Panel(this_) ((const PanelClass*)((this_)->super.klass)) |
|
|
|
@ -49,6 +51,8 @@ typedef struct PanelClass_ { |
|
|
|
#define Panel_eventHandler(this_, ev_) (assert(As_Panel(this_)->eventHandler), As_Panel(this_)->eventHandler((Panel*)(this_), ev_)) |
|
|
|
#define Panel_eventHandler(this_, ev_) (assert(As_Panel(this_)->eventHandler), As_Panel(this_)->eventHandler((Panel*)(this_), ev_)) |
|
|
|
#define Panel_drawFunctionBarFn(this_) As_Panel(this_)->drawFunctionBar |
|
|
|
#define Panel_drawFunctionBarFn(this_) As_Panel(this_)->drawFunctionBar |
|
|
|
#define Panel_drawFunctionBar(this_) (assert(As_Panel(this_)->drawFunctionBar), As_Panel(this_)->drawFunctionBar((Panel*)(this_))) |
|
|
|
#define Panel_drawFunctionBar(this_) (assert(As_Panel(this_)->drawFunctionBar), As_Panel(this_)->drawFunctionBar((Panel*)(this_))) |
|
|
|
|
|
|
|
#define Panel_printHeaderFn(this_) As_Panel(this_)->printHeader |
|
|
|
|
|
|
|
#define Panel_printHeader(this_) (assert(As_Panel(this_)->printHeader), As_Panel(this_)->printHeader((Panel*)(this_))) |
|
|
|
|
|
|
|
|
|
|
|
struct Panel_ { |
|
|
|
struct Panel_ { |
|
|
|
Object super; |
|
|
|
Object super; |
|
|
|
@ -84,8 +88,6 @@ void Panel_done(Panel* this); |
|
|
|
|
|
|
|
|
|
|
|
void Panel_setSelectionColor(Panel* this, ColorElements colorId); |
|
|
|
void Panel_setSelectionColor(Panel* this, ColorElements colorId); |
|
|
|
|
|
|
|
|
|
|
|
RichString* Panel_getHeader(Panel* this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Panel_setHeader(Panel* this, const char* header); |
|
|
|
void Panel_setHeader(Panel* this, const char* header); |
|
|
|
|
|
|
|
|
|
|
|
void Panel_move(Panel* this, int x, int y); |
|
|
|
void Panel_move(Panel* this, int x, int y); |
|
|
|
|