diff --git a/GNUmakefile b/GNUmakefile index e781d42..54e74db 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -86,7 +86,7 @@ SO = .dll EXEC = .exe endif -EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) +EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) examples/scrollbar$(EXEC) ifeq ($(OPENGL),1) L_OBJS += src/widget/opengl.o diff --git a/examples/scrollbar.c b/examples/scrollbar.c new file mode 100644 index 0000000..76a7100 --- /dev/null +++ b/examples/scrollbar.c @@ -0,0 +1,18 @@ +/* $Id$ */ + +#include + +int main(){ + MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 500, 500, + MwNtitle, "main", + NULL); + int i; + + for(i = 0; i < 500 / 16; i++){ + MwVaCreateWidget(MwScrollBarClass, "scroll", window, 16 * i, 0, 16, 500, + MwNorientation, MwVERTICAL, + NULL); + } + + MwLoop(window); +}