add table widget

This commit is contained in:
Nishi 2026-05-14 21:10:22 +09:00
commit 32266c7656
Signed by: nishi
GPG key ID: 27EF69B208EB9343
11 changed files with 336 additions and 95 deletions

View file

@ -95,18 +95,7 @@ static void draw(MwWidget handle) {
}
static void prop_change(MwWidget handle, const char* key) {
if(strcmp(key, MwNorientation) == 0) {
MwBox b = handle->internal;
b->layout = 1;
MwForceRender(handle);
}
}
static void children_prop_change(MwWidget handle, MwWidget child, const char* key) {
(void)child;
if(strcmp(key, MwNratio) == 0 || strcmp(key, MwNfixedSize) == 0) {
if(strcmp(key, MwNorientation) == 0 || strcmp(key, MwNpadding) == 0 || strcmp(key, MwNmargin) == 0) {
MwBox b = handle->internal;
b->layout = 1;
@ -131,13 +120,28 @@ static void resize(MwWidget handle) {
MwForceRender(handle);
}
static void children_update(MwWidget handle) {
MwBox b = handle->internal;
static void children_update(MwWidget handle, MwWidget child, int new) {
MwBox b = handle->internal;
(void)child;
(void)new;
b->layout = 1;
MwForceRender(handle);
}
static void children_prop_change(MwWidget handle, MwWidget child, const char* key) {
(void)child;
if(strcmp(key, MwNratio) == 0 || strcmp(key, MwNfixedSize) == 0) {
MwBox b = handle->internal;
b->layout = 1;
MwForceRender(handle);
}
}
MwClassRec MwBoxClassRec = {
wcreate, /* create */
destroy, /* destroy */