From c492bb95a2bb8f739b7c0a061090b9ad4549c975 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 20 Jun 2005 22:43:35 +0000 Subject: Minor cosmetic changes. --- include/widgets.h | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'include/widgets.h') diff --git a/include/widgets.h b/include/widgets.h index 8865f9c..bf1cab1 100644 --- a/include/widgets.h +++ b/include/widgets.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: widgets.h,v 1.10 2005-03-29 16:37:42 orphis Exp $ */ +/* $Id: widgets.h,v 1.11 2005-06-20 22:43:35 pixel Exp $ */ #ifndef __WIDGETS_H__ #define __WIDGETS_H__ @@ -118,16 +118,28 @@ namespace mogltk { }; namespace widgets { + /*! + 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; }; + /*! + 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; }; + /*! + 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 { public: Root(shape *, drawer * = 0); @@ -137,11 +149,19 @@ namespace mogltk { drawer * dr; }; + /*! + The Panel widget is not visible. Its only usage is to hold several + other widgets at a relative position. + */ class Panel : public widget { public: Panel(shape *, widget * father, int x, int y, int w, int h); }; + /*! + The Button widget will draw a very simple button onscreen, and + react to all the necessary mouse events. + */ class Button : public widget { public: Button(action *, shape *, widget * father, int x, int y, int w, int h, const String & caption); @@ -154,6 +174,9 @@ namespace mogltk { action * a; }; + /*! + The Label widget is only a pure inactive chunk of text. + */ class Label : public widget { public: Label(shape *, widget * father, int x, int y, int w, int h, const String & caption, const ColorP & color = BLACK); @@ -163,6 +186,9 @@ namespace mogltk { ColorP color; }; + /*! + The SmartBox is a simple window with a title line. + */ class SmartBox : public widget { public: SmartBox(shape *, widget * father, int x, int y, int w, int h, const String & caption); @@ -174,17 +200,28 @@ namespace mogltk { int ox, oy, oax, oay; }; + /*! + The SmartBoxClose is a SmartBox with a close button at upper-left. + */ class SmartBoxClose : public SmartBox { public: SmartBoxClose(shape *, widget * father, int x, int y, int w, int h, const String & caption); }; + /*! + The MsgBox is a SmartBoxClose which holds a text, as well as a + 'Ok' button. + */ class MsgBox : public SmartBoxClose { public: MsgBox(shape *, widget * father, const String & caption, const String & text); virtual ~MsgBox(); }; + /*! + The Frame widget will act as a visible panel. It'll hold widgets + within a visible frame or fence. + */ class Frame : public widget { public: Frame(shape *, widget * father, int x, int y, int w, int h); @@ -193,6 +230,10 @@ namespace mogltk { virtual void draw(); }; + /*! + 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 { public: ContextMenu(shape *, widget * father, int x, int y); @@ -240,6 +281,10 @@ namespace mogltk { bool iin_click(); }; + /*! + The Menu widget will be display ontop of the father widget, and its + submenus are simply sont ContextMenus. + */ class Menu : public widget { public: Menu(shape *, widget * father); -- cgit v1.2.3