mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 06:30:52 +00:00
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@42 b9cfdab3-6d41-4d17-bbe4-086880011989
33 lines
744 B
C
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;
|