Files
milsko/src/button.c
NishiOwO b20c81b46e thing
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@42 b9cfdab3-6d41-4d17-bbe4-086880011989
2025-09-29 02:43:01 +00:00

33 lines
744 B
C

/* $Id$ */
#include <Mw/Milsko.h>
static void create(MwWidget handle) {
MwSetDefault(handle);
}
static void draw(MwWidget handle) {
MwRect r;
r.x = 0;
r.y = 0;
r.width = MwGetInteger(handle, MwNwidth);
r.height = MwGetInteger(handle, MwNheight);
MwDrawFrame(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)), handle->pressed);
// MwDrawRect(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)));
}
static void click(MwWidget handle) {
MwDispatchUserHandler(handle, MwNactivateHandler, NULL);
}
MwClassRec MwButtonClassRec = {
NULL, /* opaque */
create, /* create */
NULL, /* destroy */
draw, /* draw */
click /* click */
};
MwClass MwButtonClass = &MwButtonClassRec;