From ff05e0d8437c50e86229a79b99c8f1ae0ffe773f Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 14 Mar 2003 02:05:15 +0000 Subject: Creating shapes --- include/Makefile.am | 2 +- include/glfont.h | 1 + include/glshape.h | 29 +++++++++++++++++++++++++++++ include/glwidgets.h | 14 ++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 include/glshape.h create mode 100644 include/glwidgets.h (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index fa972cf..0aa8482 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,4 @@ pkginclude_HEADERS = \ -engine.h glbase.h glfont.h gltexture.h sprite.h +engine.h glbase.h glfont.h gltexture.h glshape.h glwidgets.h sprite.h noinst_HEADERS = gettext.h diff --git a/include/glfont.h b/include/glfont.h index 464cd47..4ace74a 100644 --- a/include/glfont.h +++ b/include/glfont.h @@ -37,6 +37,7 @@ namespace mogltk { Color textcolor; int shadow; }; + extern font * SystemFont; }; #endif diff --git a/include/glshape.h b/include/glshape.h new file mode 100644 index 0000000..cd9fef0 --- /dev/null +++ b/include/glshape.h @@ -0,0 +1,29 @@ +#ifndef __GLSHAPE_H__ +#define __GLSHAPE_H__ + +#include +#include +#include + +namespace mogltk { + class shape : public Base { + public: + static void box(int x1, int y1, int x2, int y2, Color = WHITE); + static void box(int x1, int y1, int x2, int y2, Color, Color, Color, Color); + static void obox(int x1, int y1, int x2, int y2, Color = WHITE); + static void obox(int x1, int y1, int x2, int y2, Color, Color, Color, Color); + static void tbox(texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, Color = WHITE); + static void tbox(texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, Color = WHITE); + static void tbox(texture *, int x1, int y1, int x2, int y2, Color, Color, Color, Color, int tx = 0, int ty = 0, double = 1.0); + static void tbox(texture *, int x1, int y1, int x2, int y2, Color, Color, Color, Color, int tx1, int ty1, int tx2, int ty2); + static void hline(int x1, int x2, int y, Color = WHITE); + static void hline(int x1, int x2, int y, Color, Color); + static void vline(int x, int y1, int y2, Color = WHITE); + static void vline(int x, int y1, int y2, Color, Color); + private: + static bool in2D(bool); + static void out2D(bool); + }; +}; + +#endif diff --git a/include/glwidgets.h b/include/glwidgets.h new file mode 100644 index 0000000..3529fab --- /dev/null +++ b/include/glwidgets.h @@ -0,0 +1,14 @@ +#ifndef __GLWIDGETS_H__ +#define __GLWIDGETS_H__ + +#include "Exceptions.h" + +namespace mogltk { + class widget : public Base { + public: + widget(); + virtual ~widget(); + }; +}; + +#endif -- cgit v1.2.3