add table widget
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit

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

@ -383,6 +383,13 @@ MWDECL void* MWAPI MwGetUser(MwWidget handle);
*/
MWDECL void MWAPI MwFreeWidget(MwWidget handle);
/*!
* @brief Gets the frame of the widget
* @param handle Widget
* @param rect Frame
*/
MWDECL void MWAPI MwGetFrame(MwWidget handle, MwRect* rect);
#ifdef _MILSKO
MWDECL void MwForceRender_Internal(MwWidget handle);
MWDECL void MwForceRender2_Internal(MwWidget handle, void* ptr);

View file

@ -51,6 +51,7 @@
#include <Mw/Widget/SubMenu.h>
#include <Mw/Widget/SubWindow.h>
#include <Mw/Widget/Tab.h>
#include <Mw/Widget/Table.h>
#include <Mw/Widget/TreeView.h>
#include <Mw/Widget/Viewport.h>
#include <Mw/Widget/Window.h>

View file

@ -49,6 +49,9 @@
#define MwNday "Iday"
#define MwNwaitLayout "IwaitLayout"
#define MwNscale "Iscale"
#define MwNcolumns "Icolumns"
#define MwNcolumnSpan "IcolumnSpan"
#define MwNrowSpan "IrowSpan"
#define MwNtitle "Stitle"
#define MwNtext "Stext"

View file

@ -29,6 +29,7 @@ typedef struct _MwDirectoryEntry MwDirectoryEntry;
typedef struct _MwBox* MwBox;
typedef struct _MwSubWindow* MwSubWindow;
typedef struct _MwTab* MwTab;
typedef struct _MwTable* MwTable;
typedef struct _MwMouse MwMouse;
#ifdef _MILSKO
typedef struct _MwWidget* MwWidget;
@ -39,6 +40,7 @@ typedef void (*MwHandler)(MwWidget handle);
typedef int (*MwHandlerWithStatus)(MwWidget handle);
typedef void (*MwHandlerProps)(MwWidget handle, char** key);
typedef void (*MwHandlerProp)(MwWidget handle, const char* key);
typedef void (*MwHandlerChildrenUpdate)(MwWidget handle, MwWidget child, int new);
typedef void (*MwHandlerChildrenProp)(MwWidget handle, MwWidget child, const char* key);
typedef void (*MwHandlerKey)(MwWidget handle, int key);
typedef void (*MwHandlerMouse)(MwWidget handle, void* ptr);
@ -212,6 +214,11 @@ struct _MwBox {
int layout;
};
struct _MwTable {
int layout;
MwWidget* widgets;
};
struct _MwSubWindow {
MwWidget frame;
MwWidget minimize;
@ -251,7 +258,7 @@ struct _MwClass {
MwHandlerExecute execute;
MwHandler tick;
MwHandler resize;
MwHandler children_update;
MwHandlerChildrenUpdate children_update;
MwHandlerChildrenProp children_prop_change;
MwHandlerClipboardReceived clipboard;
MwHandlerProps props_change;

24
include/Mw/Widget/Table.h Normal file
View file

@ -0,0 +1,24 @@
/*!
* @file Mw/Widget/Table.h
* @brief Table widget
*/
#ifndef __MW_WIDGET_TABLE_H__
#define __MW_WIDGET_TABLE_H__
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*!
* @brief Table widget class
*/
MWDECL MwClass MwTableClass;
#ifdef __cplusplus
}
#endif
#endif