|
From: andrew7 <bd...@us...> - 2006-12-10 19:36:38
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9046/include/smartwin Modified Files: Anchors.h Log Message: Put into namespace SmartWin and clean documentation Index: Anchors.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/Anchors.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Anchors.h 20 Nov 2006 03:45:45 -0000 1.1 +++ Anchors.h 10 Dec 2006 19:36:32 -0000 1.2 @@ -13,6 +13,13 @@ using std::vector; +namespace SmartWin +{ + +/// AnchoredItem defined the possible parameters for the addAnchored function. +/** Each value describes where the widget will be anchored. "top" for example + * indicated that the widget will always remain the same distance from its parent's top. +*/ struct AnchoredItem { enum {top=1, bottom=2, left=4, right=8}; // Attach to that side. enum { box = (top | bottom | left | right) }; // Attach to all sides; ie adjust to shape of parent. @@ -28,7 +35,7 @@ }; /// Anchor fixed sized widgets to the sides of their parent window. -/** +/** \ingroup WidgetLayout * A helper class to do some auto-resizings of widgets in SmartWin++. * * Take for example the common dialog Open File. @@ -36,18 +43,12 @@ * to the lower-right corner of the dialog. On the other hand, the control that lists all * the files in the current directory, grows or shrinks according to the size of the dialog. * -* That's what my class does. After widgets were created, you add them to a special list, +* That's what Anchors does. After the widgets were created, you add them to a special list, * and in the event handler of OnSize (of your WidgetWindow), you call a special method that * resizes all the widgets you've added before. * * Supposed to be simple. -* An example project (working with the Sally IDE & with a mingw32 makefile) is available online. -* -* (The anchors-sample.zip contains everything needed to compile, including the anchors source, and a compiled exe. -* -* http://t2.technion.ac.il/~scg/anchors-sample.zip -* http://t2.technion.ac.il/~scg/anchors-source.zip -* By: Carmi Grushko (venndigram) - 2006-10-02 20:38 +* Credit Carmi Grushko (venndigram) - 2006-10-02 20:38 * */ class AnchorManager { @@ -57,7 +58,8 @@ /** The addAnchored() function measures and stores the distances from the sides of * the widget's parent. It also stores the anchors bitmap which specifies which sides * of the parent should be used in resizing the widget later on. <br> - * IN: anchors: a combination of AnchoredItem::left, AnchoredItem::right, AnchoredItem::top, AnchoredItem::bottom + * IN: widget: Any widget that has already been sized and placed in its parent's window. <br> + * anchors: a combination of AnchoredItem::left, AnchoredItem::right, AnchoredItem::top, AnchoredItem::bottom <br> * Specifing "AnchoredItem::right" will ensure that the widget will always be the * same distance from its parent's right edge. Specifing "AnchoredItem::row" will cause the widget to go * from the left to the right side of the parent, keeping its original size. @@ -200,6 +202,19 @@ }; +/* +* An example project (working with the Sally IDE & with a mingw32 makefile) is available online. +* +* (The anchors-sample.zip contains everything needed to compile, including the anchors source, and a compiled exe. +* +* http://t2.technion.ac.il/~scg/anchors-sample.zip +* http://t2.technion.ac.il/~scg/anchors-source.zip +* By: Carmi Grushko (venndigram) - 2006-10-02 20:38 +*/ + +} + + #endif //region SallyIDE Text Editor Settings //Caret=(0,0) |