diff options
author | pixel <pixel> | 2003-11-14 17:21:14 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-11-14 17:21:14 +0000 |
commit | fae0c2bfe95a122de0f165791690dc18928a931c (patch) | |
tree | 1f8056a480702d72c4f871ad7375a575510bb7ff /lib/glwidgets.cc | |
parent | d7575bef1e530eac004c973b0384a12561f0bb8b (diff) |
Started working on widgets.
Diffstat (limited to 'lib/glwidgets.cc')
-rw-r--r-- | lib/glwidgets.cc | 51 |
1 files changed, 8 insertions, 43 deletions
diff --git a/lib/glwidgets.cc b/lib/glwidgets.cc index f8e0389..511cdc4 100644 --- a/lib/glwidgets.cc +++ b/lib/glwidgets.cc @@ -1,43 +1,8 @@ -#include <SDL.h> -#include <Input.h> -#include "glfont.h" -#include "glwidgets.h" - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gettext.h" - -mogltk::widget * mogltk::widget::cur_root = 0; - -mogltk::widget::widget(widget * _father, int _x, int _y, int _sx, int _sy) throw (GeneralException) : - x(_x), y(_y), sx(_sx), sy(_sy), father(_father) { - - if (!father) - father = cur_root; - - if (father) { - next = father->child; - father->child = this; - root = father->root; - } else { - next = 0; - cur_root = root = this; - } - prev = 0; - child = 0; -} - -mogltk::widget::~widget() { - while(child) - delete child; - - if (prev) - prev->next = next; - else if (father) - father->child = next; - - if (next) - next->prev = prev; -} +#include <SDL.h>
+#include <SDL_opengl.h>
+#include "mcolor.h"
+#include "glwidgets.h"
+
+void mogltk::glRoot::draw() {
+ Shaper()->box(GetAX(), GetAY(), GetAX2(), GetAY2());
+}
|