From 45e08ccde95c84932557701235558e72cdc95f1b Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 28 Oct 2006 16:50:46 +0000 Subject: Fixing caps in class names. --- include/base.h | 6 +-- include/engine.h | 8 +-- include/font.h | 38 +++++++------- include/glbase.h | 4 +- include/glfont.h | 6 +-- include/glshape.h | 20 ++++---- include/glsprite.h | 4 +- include/glwidgets.h | 8 +-- include/mcolor.h | 3 +- include/shape.h | 64 +++++++++++------------ include/sprite.h | 10 ++-- include/texture.h | 22 ++++---- include/widgets.h | 142 +++++++++++++++++++++++++++------------------------- 13 files changed, 170 insertions(+), 165 deletions(-) (limited to 'include') diff --git a/include/base.h b/include/base.h index c08c055..96763e5 100644 --- a/include/base.h +++ b/include/base.h @@ -17,14 +17,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: base.h,v 1.10 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: base.h,v 1.11 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __BASE_H__ #define __BASE_H__ #include #include -#include +#include namespace mogltk { struct rect { @@ -43,7 +43,7 @@ namespace mogltk { virtual bool is2D(); virtual void changeviewport(int x = 0, int y = 0, unsigned int w = 0, unsigned int h = 0); void ToggleFullscreen(); - virtual texture * GrabTexture(); + virtual Texture * GrabTexture(); virtual SDL_Surface * GrabSurface(); protected: base(int, int, int, int); diff --git a/include/engine.h b/include/engine.h index 0d4afbc..77846ac 100644 --- a/include/engine.h +++ b/include/engine.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: engine.h,v 1.22 2006-02-09 17:04:57 pixel Exp $ */ +/* $Id: engine.h,v 1.23 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __ENGINE_H__ #define __ENGINE_H__ @@ -29,7 +29,7 @@ #include namespace mogltk { - class widget; + class Widget; class engine : public Base { public: class keyevent : public Base { @@ -77,7 +77,7 @@ namespace mogltk { static mouseevent * getmouseevent(); static glbase * glbase_o; static base * base_o; - static widget * root; + static Widget * root; private: static bool inited; static bool postsetuped; @@ -98,6 +98,6 @@ namespace mogltk { }; }; -#include +#include #endif diff --git a/include/font.h b/include/font.h index 6cf0e93..32d02dd 100644 --- a/include/font.h +++ b/include/font.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: font.h,v 1.11 2005-12-01 13:48:12 pixel Exp $ */ +/* $Id: font.h,v 1.12 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __FONT_H__ #define __FONT_H__ @@ -26,22 +26,22 @@ #include #include #include -#include +#include #include #include namespace mogltk { - class font : public Base { + class Font : public Base { public: - font(Handle *); - virtual ~font(); + Font(Handle *); + virtual ~Font(); virtual void drawentry(Uint16, int, int, ColorP = WHITE); - void drawtotex(texture *, Uint16, int, int, ColorP = WHITE); + void drawtotex(Texture *, Uint16, int, int, ColorP = WHITE); void putcursor(int, int); void putentry(Uint16, ColorP = WHITE); - void putentryontex(texture *, Uint16, ColorP = WHITE); + void putentryontex(Texture *, Uint16, ColorP = WHITE); void drawchar(unsigned char, ColorP = WHITE); - void drawcharontex(texture *, unsigned char, ColorP = WHITE); + void drawcharontex(Texture *, unsigned char, ColorP = WHITE); void newline(void); int printf(const ugly_string &, ...); int printf(const char *, ...); @@ -49,12 +49,12 @@ namespace mogltk { rect size(const ugly_string &, ...); rect size(const char *, ...); rect size(const ugly_string &, va_list); - rect printtotex(texture *, const ugly_string &, ...); - rect printtotex(texture *, const char *, ...); - rect printtotex(texture *, const ugly_string &, va_list); - texture * printtex(rect *, const ugly_string &, ...); - texture * printtex(rect *, const char *, ...); - texture * printtex(rect *, const ugly_string &, va_list); + rect printtotex(Texture *, const ugly_string &, ...); + rect printtotex(Texture *, const char *, ...); + rect printtotex(Texture *, const ugly_string &, va_list); + Texture * printtex(rect *, const ugly_string &, ...); + Texture * printtex(rect *, const char *, ...); + Texture * printtex(rect *, const ugly_string &, va_list); void setcolor(ColorP); void setshadow(int); void setwspace(int); @@ -68,16 +68,16 @@ namespace mogltk { int cx, cy, ox; ColorP textcolor; int shadow, wspace; - texture * alloctexture(); + Texture * alloctexture(); void Bind(int); private: void checknbind(int, ColorP); - texture ** fonttex; - texture ** fontcache[16]; + Texture ** fonttex; + Texture ** fontcache[16]; Uint16 * corresp; }; - extern font * SystemFont; - extern font * FixedFont; + extern Font * SystemFont; + extern Font * FixedFont; }; #endif diff --git a/include/glbase.h b/include/glbase.h index 2936549..ab5422a 100644 --- a/include/glbase.h +++ b/include/glbase.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glbase.h,v 1.12 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: glbase.h,v 1.13 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __GLBASE_H__ #define __GLBASE_H__ @@ -42,7 +42,7 @@ namespace mogltk { static void glVertex(GLint, GLint, GLint = 0, GLint = 1); static void glVertex(GLfloat, GLfloat, GLfloat = 0.0, GLfloat = 1.0); static void glVertex(GLdouble, GLdouble, GLdouble = 0.0, GLdouble = 1.0); - virtual texture * GrabTexture(); + virtual Texture * GrabTexture(); virtual SDL_Surface * GrabSurface(); private: int twoD; diff --git a/include/glfont.h b/include/glfont.h index b0ab2f6..4c2a880 100644 --- a/include/glfont.h +++ b/include/glfont.h @@ -17,17 +17,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glfont.h,v 1.16 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: glfont.h,v 1.17 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __GLFONT_H__ #define __GLFONT_H__ #include -#include +#include #include namespace mogltk { - class glfont : public font { + class glfont : public Font { public: glfont(Handle *); virtual ~glfont(); diff --git a/include/glshape.h b/include/glshape.h index 0647633..77eea0f 100644 --- a/include/glshape.h +++ b/include/glshape.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glshape.h,v 1.15 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: glshape.h,v 1.16 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __GLSHAPE_H__ #define __GLSHAPE_H__ @@ -25,11 +25,11 @@ #include #include #include -#include -#include +#include +#include namespace mogltk { - class glshape : public shape { + class glShape : public Shape { public: virtual void pixel(int x, int y, ColorP = WHITE); virtual void box(int x1, int y1, int x2, int y2, ColorP = WHITE); @@ -41,12 +41,12 @@ namespace mogltk { virtual void hline(int x1, int x2, int y, ColorP, ColorP); virtual void vline(int x, int y1, int y2, ColorP = DOS_WHITE); virtual void vline(int x, int y1, int y2, ColorP, ColorP); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, ColorP = WHITE); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP = WHITE); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx = 0, int ty = 0, double = 1.0); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx1, int ty1, int tx2, int ty2); - virtual void fdraw(fill * f, ColorP = WHITE, int sx = 0, int sy = 0); - virtual void sdraw(fill * f, ColorP = WHITE, int sx = 0, int sy = 0); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, ColorP = WHITE); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP = WHITE); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx = 0, int ty = 0, double = 1.0); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx1, int ty1, int tx2, int ty2); + virtual void fdraw(Fill * f, ColorP = WHITE, int sx = 0, int sy = 0); + virtual void sdraw(Fill * f, ColorP = WHITE, int sx = 0, int sy = 0); private: bool Enter(bool); virtual bool Enter(); diff --git a/include/glsprite.h b/include/glsprite.h index 91c3f76..d523e4d 100644 --- a/include/glsprite.h +++ b/include/glsprite.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glsprite.h,v 1.7 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: glsprite.h,v 1.8 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __GLSPRITE_H__ #define __GLSPRITE_H__ @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include namespace mogltk { diff --git a/include/glwidgets.h b/include/glwidgets.h index cd87a5f..2c32f0a 100644 --- a/include/glwidgets.h +++ b/include/glwidgets.h @@ -17,18 +17,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glwidgets.h,v 1.9 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: glwidgets.h,v 1.10 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __GLWIDGETS_H__ #define __GLWIDGETS_H__ -#include +#include namespace mogltk { - namespace widgets { + namespace Widgets { class glRoot : public Root { public: - glRoot(shape *); + glRoot(Shape *); protected: virtual void draw(); }; diff --git a/include/mcolor.h b/include/mcolor.h index 9592bbe..30184c4 100644 --- a/include/mcolor.h +++ b/include/mcolor.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: mcolor.h,v 1.10 2006-01-31 17:02:39 pixel Exp $ */ +/* $Id: mcolor.h,v 1.11 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __MCOLOR_H__ #define __MCOLOR_H__ @@ -38,6 +38,7 @@ namespace mogltk { Uint32 toSDL(SDL_PixelFormat * = 0); void fromSDL(Uint32, SDL_PixelFormat * = 0); void fromHSV(double H, double S, double V); // H in degrees + void toHSV(double * H, double * S, double * V); static Color Min; static Color Max; Color c; diff --git a/include/shape.h b/include/shape.h index b5c3d91..74422a1 100644 --- a/include/shape.h +++ b/include/shape.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: shape.h,v 1.17 2005-12-01 13:48:12 pixel Exp $ */ +/* $Id: shape.h,v 1.18 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __SHAPE_H__ #define __SHAPE_H__ @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include namespace mogltk { typedef enum { @@ -47,10 +47,10 @@ namespace mogltk { virtual ~segwalker(); virtual void step(int x1, int y1, int x2, int y2); }; - class fill : public Base { + class Fill : public Base { public: - fill(); - virtual ~fill(); + Fill(); + virtual ~Fill(); void walk(fillwalker *); void swalk(segwalker *); void insert(int, int, int, int); @@ -59,10 +59,10 @@ namespace mogltk { int GetMinY() const; int GetMaxX() const; int GetMaxY() const; - texture * GetTexture(); - texture * Talloc(); - texture * GetSTexture(); - texture * STalloc(); + Texture * GetTexture(); + Texture * Talloc(); + Texture * GetSTexture(); + Texture * STalloc(); Color last; private: void insert(int, int); @@ -71,7 +71,7 @@ namespace mogltk { }; class sline : public Base { public: - sline(int, fill *); + sline(int, Fill *); virtual ~sline(); int GetY() const; void insert(int, int); @@ -93,7 +93,7 @@ namespace mogltk { }; int y; sline * next; - fill * header; + Fill * header; sline * look(int); protected: point * pheader; @@ -102,22 +102,22 @@ namespace mogltk { int count() const; }; int minX, minY, maxX, maxY; - texture * cached; - texture * scached; + Texture * cached; + Texture * scached; std::vector segments; protected: sline * header; friend class sline; }; - class shape : public Base { + class Shape : public Base { public: - shape(SDL_Surface * = 0); + Shape(SDL_Surface * = 0); virtual void pixel(int x, int y, ColorP = WHITE); virtual void circle(int x, int y, int r, ColorP = WHITE); virtual void pcircle(int x, int y, int r, ColorP = WHITE); - virtual fill * fcircle(int x, int y, int r); - virtual void fdraw(fill *, ColorP = WHITE, int sx = 0, int sy = 0); - virtual void sdraw(fill *, ColorP = WHITE, int sx = 0, int sy = 0); + virtual Fill * fcircle(int x, int y, int r); + virtual void fdraw(Fill *, ColorP = WHITE, int sx = 0, int sy = 0); + virtual void sdraw(Fill *, ColorP = WHITE, int sx = 0, int sy = 0); virtual void box(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE); virtual void box3d(int x1, int y1, int x2, int y2, ColorP = DOS_WHITE, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, int = 2, bool = false); virtual void box(int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP); @@ -131,10 +131,10 @@ namespace mogltk { virtual void vline3d(int x, int y1, int y2, ColorP = DOS_HIGH_WHITE, ColorP = DOS_GRAY, bool = false); virtual void vline(int x, int y1, int y2, ColorP, ColorP); virtual void line(int x1, int y1, int x2, int y2, ColorP = WHITE); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, ColorP = WHITE); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP = WHITE); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx = 0, int ty = 0, double = 1.0); - virtual void tbox(texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx1, int ty1, int tx2, int ty2); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, int tx = 0, int ty = 0, double = 1.0, ColorP = WHITE); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, int tx1, int ty1, int tx2, int ty2, ColorP = WHITE); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx = 0, int ty = 0, double = 1.0); + virtual void tbox(Texture *, int x1, int y1, int x2, int y2, ColorP, ColorP, ColorP, ColorP, int tx1, int ty1, int tx2, int ty2); virtual void window(int x1, int y1, int x2, int y2, const String & title = "", ColorP titlecolor = DOS_HIGH_WHITE, @@ -144,13 +144,13 @@ namespace mogltk { ColorP shade2 = DOS_GRAY); virtual void text(int x, int y, const String &, ColorP textcolor = DOS_HIGH_WHITE, - align_t align = LEFT, mogltk::font * = mogltk::SystemFont); + align_t align = LEFT, mogltk::Font * = mogltk::SystemFont); virtual void text3d(int x, int y, const String &, ColorP textcolor = DOS_BLACK, ColorP shade1 = DOS_HIGH_WHITE, ColorP shade2 = DOS_GRAY, align_t align = LEFT, - bool bevel = false, mogltk::font * = mogltk::SystemFont); + bool bevel = false, mogltk::Font * = mogltk::SystemFont); virtual void button(int x1, int y1, int x2, int y2, const String &, bool bevel = false, ColorP front = DOS_WHITE, @@ -173,25 +173,25 @@ namespace mogltk { class filldrawer : public fillwalker { public: - filldrawer(fill *, texture *, ColorP = DOS_WHITE); + filldrawer(Fill *, Texture *, ColorP = DOS_WHITE); virtual ~filldrawer(); virtual void step(int x, int y); private: - fill * f; - texture * t; + Fill * f; + Texture * t; ColorP c; int oldx, oldy; }; class segdrawer : public segwalker { public: - segdrawer(fill *, texture *, ColorP = DOS_WHITE); + segdrawer(Fill *, Texture *, ColorP = DOS_WHITE); virtual ~segdrawer(); virtual void step(int x1, int y1, int x2, int y2); private: - fill * f; - texture * t; + Fill * f; + Texture * t; ColorP c; - shape * sh; + Shape * sh; }; }; diff --git a/include/sprite.h b/include/sprite.h index 176f793..6263ada 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: sprite.h,v 1.13 2004-11-27 21:48:01 pixel Exp $ */ +/* $Id: sprite.h,v 1.14 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __SPRITE_H__ #define __SPRITE_H__ @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace mogltk { class Sprite : public Base { @@ -48,15 +48,15 @@ namespace mogltk { TexList(int); virtual ~TexList(); Sprite * sprheader; - const texture * GetTex() const; - texture * GetTex(); + const Texture * GetTex() const; + Texture * GetTex(); static const TexList * GetHead(); const TexList * GetNext() const; TexList * GetNext(); void Bind() const; SDL_Surface * GetSurface(); private: - texture * tex; + Texture * tex; static TexList * header; TexList * next, * prev; }; diff --git a/include/texture.h b/include/texture.h index 228f016..e49e48f 100644 --- a/include/texture.h +++ b/include/texture.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: texture.h,v 1.11 2006-02-02 17:29:04 pixel Exp $ */ +/* $Id: texture.h,v 1.12 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __TEXTURE_H__ #define __TEXTURE_H__ @@ -29,13 +29,13 @@ #include namespace mogltk { - class texture : public Base { + class Texture : public Base { public: - texture(int, int, bool = false) throw (GeneralException); - texture(Handle *, bool = false) throw (GeneralException); - texture(int, int, int, int); - texture(SDL_Surface *, bool = false) throw (GeneralException); - virtual ~texture(); + Texture(int, int, bool = false) throw (GeneralException); + Texture(Handle *, bool = false) throw (GeneralException); + Texture(int, int, int, int); + Texture(SDL_Surface *, bool = false) throw (GeneralException); + virtual ~Texture(); SDL_Surface * GetSurface(); Uint32 * GetPixels(); SDL_PixelFormat * GetFormat(); @@ -56,10 +56,10 @@ namespace mogltk { bool texture_allocated; SDL_Surface * surface; bool planar, tainted, taintable; - static texture * header; - static texture * footer; - texture * next, * prev; - static texture * active; + static Texture * header; + static Texture * footer; + Texture * next, * prev; + static Texture * active; void recTaint(void); }; }; diff --git a/include/widgets.h b/include/widgets.h index eb51051..f808981 100644 --- a/include/widgets.h +++ b/include/widgets.h @@ -17,13 +17,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: widgets.h,v 1.16 2006-02-02 11:01:13 pixel Exp $ */ +/* $Id: widgets.h,v 1.17 2006-10-28 16:50:46 pixel Exp $ */ #ifndef __WIDGETS_H__ #define __WIDGETS_H__ #include -#include +#include #include #include @@ -47,9 +47,9 @@ namespace mogltk { E_MOUSE_OUT_CLICK, E_MOUSE_DBL_CLICK, }; - class widget : public Base { + class Widget : public Base { public: - virtual ~widget() throw (GeneralException); + virtual ~Widget() throw (GeneralException); virtual void move(int x, int y); virtual void resize(int sx, int sy); int GetX(); @@ -61,15 +61,15 @@ namespace mogltk { int GetAX2(); int GetAY2(); virtual mogltk::rect GetDrawRect(); - widget * Father(); - widget * Child(); - widget * Next(); - widget * Prev(); - widget * InnerPanel(); - virtual widget * find_widget(int x, int y); + Widget * Father(); + Widget * Child(); + Widget * Next(); + Widget * Prev(); + Widget * InnerPanel(); + virtual Widget * find_widget(int x, int y); void fulldraw(); - shape * Shaper(); - void mainloop(); + Shape * Shaper(); + void mainloop() throw (GeneralException); void m_event(int x, int y, event_t event); bool inside(int x, int y); bool GetVisible(); @@ -82,13 +82,13 @@ namespace mogltk { void set_viewport(); void delete_me(); protected: - widget(widget * father, int x, int y, int sx, int sy, int type, String name, shape *); + Widget(Widget * father, int x, int y, int sx, int sy, int type, String name, Shape *); virtual void draw(); virtual bool process_event(int x, int y, event_t event); virtual void resize_notify(); - virtual widget * create_panel(); - void set_exclusive(widget *); - void unset_exclusive(widget *); + virtual Widget * create_panel(); + void set_exclusive(Widget *); + void unset_exclusive(Widget *); void add_out_move(); void remove_out_move(); void add_out_click(); @@ -98,23 +98,23 @@ namespace mogltk { String caption; private: int x, y, sx, sy, ax, ay, ax2, ay2; - widget * father, * next, * prev, * child, * last, * root, * panel; - static widget * focused; + Widget * father, * next, * prev, * child, * last, * root, * panel; + static Widget * focused; int type; String name; - shape * sh; - widget * exclusive; + Shape * sh; + Widget * exclusive; bool visible; bool enabled; class timed_event { public: - timed_event(widget * _w, Uint32 _t) : w(_w), t(_t) { } - widget * w; + timed_event(Widget * _w, Uint32 _t) : w(_w), t(_t) { } + Widget * w; Uint32 t; }; static std::vector timed_events; - static std::vector add_list; - static std::vector del_list; + static std::vector add_list; + static std::vector del_list; static bool in_delete_loop; void computeabs(); @@ -126,54 +126,58 @@ namespace mogltk { void linkme(); }; - namespace widgets { + namespace Widgets { /*! - The drawer is mostly used inside the Root widget, to implement the + The drawer is mostly used inside the Root Widget, to implement the function to draw the background. */ class drawer : public Base { public: - virtual void draw(widget *) = 0; + virtual void draw(Widget *) = 0; }; /*! - The action class defines "what happens" when you activate a widget, + The action class defines "what happens" when you activate a Widget, mostly used in buttons and co. */ class action : public Base { public: - virtual void do_action(widget *) = 0; + virtual void do_action(Widget *) = 0; }; /*! - The Root widget is the father of all the widgets. It'll define the - background, as well as the whole tree of the visible widgets onscreen. + The Root Widget is the father of all the Widgets. It'll define the + background, as well as the whole tree of the visible Widgets onscreen. */ - class Root : public widget { + class Root : public Widget { public: - Root(shape *, drawer * = 0); + Root(Shape *, drawer * = 0, drawer * = 0); void setdrawer(drawer *); + void setbgdrawer(drawer *); + virtual void drawbg(); protected: virtual void draw(); + private: drawer * dr; + drawer * bg; }; /*! - The Panel widget is not visible. Its only usage is to hold several - other widgets at a relative position. + The Panel Widget is not visible. Its only usage is to hold several + other Widgets at a relative position. */ - class Panel : public widget { + class Panel : public Widget { public: - Panel(shape *, widget * father, int x, int y, int w, int h); + Panel(Shape *, Widget * father, int x, int y, int w, int h); }; /*! - The Button widget will draw a very simple button onscreen, and + The Button Widget will draw a very simple button onscreen, and react to all the necessary mouse events. */ - class Button : public widget { + class Button : public Widget { public: - Button(action *, shape *, widget * father, int x, int y, int w, int h, const String & caption); + Button(action *, Shape *, Widget * father, int x, int y, int w, int h, const String & caption); virtual ~Button() throw (GeneralException); void simulate_press(); action * cascade_action(); @@ -187,25 +191,25 @@ namespace mogltk { }; /*! - The Label widget is only a pure inactive chunk of text. + The Label Widget is only a pure inactive chunk of text. */ - class Label : public widget { + class Label : public Widget { public: - Label(shape *, widget * father, int x, int y, int w, int h, const String & caption, const ColorP & color = BLACK, mogltk::font * = mogltk::SystemFont); + Label(Shape *, Widget * father, int x, int y, int w, int h, const String & caption, const ColorP & color = BLACK, mogltk::Font * = mogltk::SystemFont); virtual ~Label() throw (GeneralException) {} protected: virtual void draw(); private: ColorP color; - mogltk::font * label_font; + mogltk::Font * label_font; }; /*! The SmartBox is a simple window with a title line. */ - class SmartBox : public widget { + class SmartBox : public Widget { public: - SmartBox(shape *, widget * father, int x, int y, int w, int h, const String & caption); + SmartBox(Shape *, Widget * father, int x, int y, int w, int h, const String & caption); virtual rect GetDrawRect(); protected: virtual void draw(); @@ -219,7 +223,7 @@ namespace mogltk { */ class SmartBoxClose : public SmartBox { public: - SmartBoxClose(shape *, widget * father, int x, int y, int w, int h, const String & caption); + SmartBoxClose(Shape *, Widget * father, int x, int y, int w, int h, const String & caption); }; /*! @@ -228,31 +232,31 @@ namespace mogltk { */ class MsgBox : public SmartBox { public: - MsgBox(action *, shape *, widget * father, const String & caption, const String & text, mogltk::font * = mogltk::SystemFont); + MsgBox(action *, Shape *, Widget * father, const String & caption, const String & text, mogltk::Font * = mogltk::SystemFont); virtual ~MsgBox() throw (GeneralException); private: - mogltk::font * msgbox_font; + mogltk::Font * msgbox_font; }; /*! - The Frame widget will act as a visible panel. It'll hold widgets + The Frame Widget will act as a visible panel. It'll hold Widgets within a visible frame or fence. */ - class Frame : public widget { + class Frame : public Widget { public: - Frame(shape *, widget * father, int x, int y, int w, int h); + Frame(Shape *, Widget * father, int x, int y, int w, int h); virtual rect GetDrawRect(); protected: virtual void draw(); }; /*! - The ContextMenu is a quite heavy widget which will display a kind of + The ContextMenu is a quite heavy Widget which will display a kind of popup menu, holding several buttons or submenus in nodes. */ - class ContextMenu : public widget { + class ContextMenu : public Widget { public: - ContextMenu(shape *, widget * father, int x, int y); + ContextMenu(Shape *, Widget * father, int x, int y); virtual ~ContextMenu() throw (GeneralException); void addnode(const String &, action *); void addline(); @@ -298,12 +302,12 @@ namespace mogltk { }; /*! - The Menu widget will be display ontop of the father widget, and its + The Menu Widget will be display ontop of the father Widget, and its submenus are simply sont ContextMenus. */ - class Menu : public widget { + class Menu : public Widget { public: - Menu(shape *, widget * father); + Menu(Shape *, Widget * father); virtual ~Menu() throw (GeneralException) {} void addnode(const String &, action *); void addsub(const String &, ContextMenu * sub); @@ -339,11 +343,11 @@ namespace mogltk { }; /*! - The InputText widget is used to do a simple input box on the screen. + The InputText Widget is used to do a simple input box on the screen. */ - class InputText : public widget { + class InputText : public Widget { public: - InputText(action *, shape *, widget * father, int x, int y); + InputText(action *, Shape *, Widget * father, int x, int y); virtual ~InputText() throw (GeneralException); virtual void draw(); const String & GetText() const; @@ -374,30 +378,30 @@ namespace mogltk { */ class InputDialog : public SmartBox { public: - InputDialog(action *, shape *, widget * father, const String & caption, const String & text, mogltk::font * = mogltk::SystemFont); + InputDialog(action *, Shape *, Widget * father, const String & caption, const String & text, mogltk::Font * = mogltk::SystemFont); virtual ~InputDialog() throw (GeneralException); String GetText(); private: InputText * it; - mogltk::font * InputDialog_font; + mogltk::Font * InputDialog_font; }; /*! - The ActionAndDelete provides a mechanism for a widget to run an action then self-destruct. + The ActionAndDelete provides a mechanism for a Widget to run an action then self-destruct. Used for example by the MsgBox and InputDialog. */ - class ActionAndDelete : public mogltk::widgets::action { + class ActionAndDelete : public mogltk::Widgets::action { public: - ActionAndDelete(mogltk::widget * _parent, mogltk::widgets::action * _a) : parent(_parent), a(_a) { } - virtual void do_action(mogltk::widget *) { + ActionAndDelete(mogltk::Widget * _parent, mogltk::Widgets::action * _a) : parent(_parent), a(_a) { } + virtual void do_action(mogltk::Widget *) { if (a) a->do_action(parent); parent->delete_me(); delete this; } private: - mogltk::widget * parent; - mogltk::widgets::action * a; + mogltk::Widget * parent; + mogltk::Widgets::action * a; }; }; }; -- cgit v1.2.3