|
From: andrew7 <bd...@us...> - 2006-11-30 00:28:58
|
Update of /cvsroot/smartwin/SmartWin/doxygenIn/html In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14411/doxygenIn/html Modified Files: layout.html Log Message: -Add Anchor info. Index: layout.html =================================================================== RCS file: /cvsroot/smartwin/SmartWin/doxygenIn/html/layout.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- layout.html 14 Sep 2005 19:53:46 -0000 1.4 +++ layout.html 30 Nov 2006 00:28:54 -0000 1.5 @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> - <title>SmartWin++ Guide</title></head> + <title>SmartWin++ Layout</title></head> <body> <P>You must set the position and size of each widget after its created, or it won't be visible. The simplest runtime approach is to set the position and size of @@ -13,7 +13,7 @@ the position and size of a widget at runtime as most of the samples do. ( All widgets derive from AspectSizable. ) Or you may be able to use the emerging Sally IDE which has the ability to generate SmartWin++ - windows. + windows. A new alternative is to use the Anchors class. </P> <H3>Why do Layout at runtime?</H3> <P> @@ -88,7 +88,16 @@ crowd out the rest of the widgets) <LI> Partition the available space to each widget present.</LI></OL> - <H3> </H3> + <H3>Anchors class</H3> + <p> + The Anchors class approach is to specify fixed sizes of various widgets, + insert them into Anchor instance with <br> + "void addAnchored( SmartWin::Widget* widget, int anchors )" + and then just call "void resizeAnchored()" in the onSized() handler. + You can specify anchors such as AnchoredItem::left or AnchoredItem::top to + make the widgets stick to the parent's window according to the anchors. + </p> + <H3>How to divide up a window into different areas </H3> <P>You divide the Rectangle by generating smaller Rectangles using Rectangle |