mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +00:00
add the example
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@224 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -133,7 +133,7 @@ else
|
||||
L_CFLAGS += -DUSE_STB_IMAGE
|
||||
endif
|
||||
|
||||
EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) examples/scrollbar$(EXEC)
|
||||
EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) examples/scrollbar$(EXEC) examples/checkbox$(EXEC)
|
||||
|
||||
ifeq ($(OPENGL),1)
|
||||
L_OBJS += src/widget/opengl.o
|
||||
|
||||
25
examples/checkbox.c
Normal file
25
examples/checkbox.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
int main() {
|
||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "test", NULL, 0, 0, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8,
|
||||
MwNtitle, "checkbox",
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwCheckBoxClass, "cb1", window, 8, 8, 16, 16,
|
||||
NULL);
|
||||
MwVaCreateWidget(MwCheckBoxClass, "cb2", window, 8, 8 + 16 + 8, 16, 16,
|
||||
MwNchecked, 1,
|
||||
NULL);
|
||||
|
||||
MwVaCreateWidget(MwLabelClass, "lab1", window, 8 + 16 + 8, 8, 16 * 10, 16,
|
||||
MwNtext, "lorem ipsum 1",
|
||||
MwNalignment, MwALIGNMENT_BEGINNING,
|
||||
NULL);
|
||||
MwVaCreateWidget(MwLabelClass, "lab2", window, 8 + 16 + 8, 8 + 16 + 8, 16 * 10, 16,
|
||||
MwNtext, "lorem ipsum 2",
|
||||
MwNalignment, MwALIGNMENT_BEGINNING,
|
||||
NULL);
|
||||
|
||||
MwLoop(window);
|
||||
}
|
||||
Reference in New Issue
Block a user