mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-01 15:10:50 +00:00
enum
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@280 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -15,13 +15,23 @@ void spawn2(MwWidget handle, void* user, void* call) {
|
||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||
}
|
||||
|
||||
void spawn3(MwWidget handle, void* user, void* call) {
|
||||
int i;
|
||||
for(i = 0; i <= 6; i++) {
|
||||
MwWidget mb = MwMessageBox(user, "messagebox test", "title", i | MwMB_BUTTONOK);
|
||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
MwWidget msg = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 300, 100, MwNtitle, "test", NULL);
|
||||
MwWidget btn = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8, 300 - 16, (100 - 16) / 2, MwNtext, "press me!", NULL);
|
||||
MwWidget btn2 = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8 + (100 - 16) / 2, 300 - 16, (100 - 16) / 2, MwNtext, "press me!", NULL);
|
||||
MwWidget btn2 = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL);
|
||||
MwWidget btn3 = MwVaCreateWidget(MwButtonClass, "button", msg, 8 + (300 - 16) / 2, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL);
|
||||
|
||||
MwAddUserHandler(btn, MwNactivateHandler, spawn, msg);
|
||||
MwAddUserHandler(btn2, MwNactivateHandler, spawn2, msg);
|
||||
MwAddUserHandler(btn3, MwNactivateHandler, spawn3, msg);
|
||||
|
||||
MwLoop(msg);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ enum MwORIENTATION {
|
||||
enum MwALIGNMENT {
|
||||
MwALIGNMENT_CENTER = 0,
|
||||
MwALIGNMENT_BEGINNING,
|
||||
MwALIGNMENT_END,
|
||||
MwALIGNMENT_END
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -43,35 +43,14 @@ enum MwALIGNMENT {
|
||||
*/
|
||||
#define MwMB_ICONMASK 0xf
|
||||
|
||||
/*!
|
||||
* %brief Warning icon
|
||||
*/
|
||||
#define MwMB_ICONWARNING 0x1
|
||||
|
||||
/*!
|
||||
* %brief Information icon
|
||||
*/
|
||||
#define MwMB_ICONINFO 0x2
|
||||
|
||||
/*!
|
||||
* %brief Note icon
|
||||
*/
|
||||
#define MwMB_ICONNOTE 0x3
|
||||
|
||||
/*!
|
||||
* %brief Question icon
|
||||
*/
|
||||
#define MwMB_ICONQUESTION 0x4
|
||||
|
||||
/*!
|
||||
* %brief News icon
|
||||
*/
|
||||
#define MwMB_ICONNEWS 0x5
|
||||
|
||||
/*!
|
||||
* %brief Error icon
|
||||
*/
|
||||
#define MwMB_ICONERROR 0x6
|
||||
enum MwMB_ICON {
|
||||
MwMB_ICONWARNING = 0x1,
|
||||
MwMB_ICONINFO,
|
||||
MwMB_ICONNOTE,
|
||||
MwMB_ICONQUESTION,
|
||||
MwMB_ICONNEWS,
|
||||
MwMB_ICONERROR
|
||||
};
|
||||
|
||||
/*!
|
||||
* %brief Button mask
|
||||
|
||||
Reference in New Issue
Block a user