World: r3wp
[!GLayout] ask questions and now get answers about GLayout.
older | first |
Maxim 3-Jan-2007 [51x2] | all the resizing algorythms are handled within the groups themselves based on indicators which are included within the gadgets and sub layouts they contain. |
all you really have to supply (if one of the current sizing extensions does not do what you need) is implement two methods. | |
xavier 3-Jan-2007 [53x2] | for the moment i just need to resize windows |
most of the time i dont need to resize the styles on it | |
Maxim 3-Jan-2007 [55x7] | calc-sizes is a function which lets your style decide what kind of space requirement it has, if it benefits from extra space (like a field or list) and this is independent in X and Y. |
calc-size also lets you allocate default size and hard set minimal size of your face. | |
once all face have resolved the size they need/expect/allow a second process is space attribution | |
which is handled in the gl-layout function. | |
basically, you receive a size as input and then refresh your face based on that size. it will always be guaranteed to fit within the specs you gave within calc-size | |
this means that if no face in a layout can stretch or is elastic, the window will never allow resizing in that direction... trying to resize it beyon, will effetively resize the window back to its nominal size, allowing the other axis to resize freely. | |
there are also other powerfull functions which allow other tricks with groups, or to easily to extend the dialect of a style for example. | |
xavier 3-Jan-2007 [62x2] | ok so i need to have all widgets resizable if i cant a window resizable in every direction ? |
want | |
Maxim 3-Jan-2007 [64] | yes each direction being indepent... elasticity and stretching are pairs... you specify your face's needs independently. |
xavier 3-Jan-2007 [65] | ok it will be possible cause i have few styles heavilly modified : i just needed a text area wich can be erased when clicked and a field where all letter were typed in majuscules |
Maxim 3-Jan-2007 [66] | I sometimes add an elastic (an actual glayout style) within a group, or add the elasticity to a face, just to allow the gui to resize even though it has no real advantage in resizing. |
xavier 3-Jan-2007 [67] | yes but in general its always usefull to resize at least the windows that contain the faces |
Maxim 3-Jan-2007 [68] | yess you'll see within a few minutes of testing how it reacts. |
xavier 3-Jan-2007 [69] | ok i see ... i m less affraid of trying to rewrite all that :)))) thanks |
Maxim 3-Jan-2007 [70] | this layout for example: column [ header "enter text" field ] will popup a window which stretches only in x by default |
xavier 3-Jan-2007 [71] | ok i test it |
Maxim 3-Jan-2007 [72x2] | if you allow field to stretch in Y , then, obviously it will look weird, since you'd end up with a multi-line text entry which actually only has one line entry... |
just remeber that every thing has to be wrapped within columns and rows, which is the main difference in code. | |
xavier 3-Jan-2007 [74x4] | yes but it remain simple and logical |
column if i want to resize it in y | |
and row if i want to resize it in x ? | |
order | |
Maxim 3-Jan-2007 [78] | column if you want to stack your faces in Y , row to stack them X . it has no effect on resizing. |
xavier 3-Jan-2007 [79] | yes placing them not resizing ... i m sorry |
Maxim 3-Jan-2007 [80x2] | remember that you can (just like in VID) assign your face AND groups to variables in order to manipulated them afterwards (replacing panes, for example) |
if you ever change something interactively and wish to recompute the layout (cause the sizing needs have changed for any reason) then call refresh on any face or group. | |
xavier 3-Jan-2007 [82] | ok it sounds cool |
Maxim 3-Jan-2007 [83] | sometimes you'll need to call refresh on the window itself, cause the new/old faces will change how the whole tree of groups measure up against each other |
GiuseppeC 15-Dec-2007 [84] | Maxim answered on the Mailing List about GLayout vs RebGUI describing GLayout. I suppose I will have to take a look at his project too. |
xavier 7-Jan-2008 [85] | i ve tried it and its very efficient |
amacleod 10-Sep-2009 [86x2] | Glayout webpage: page last updated: 2-Nov-2006 |
Maxim, how much further have you developed GLayout since the site was updated? | |
Maxim 10-Sep-2009 [88] | a lot ;-) |
amacleod 10-Sep-2009 [89] | available? |
Maxim 10-Sep-2009 [90:last] | on my HD... some look and feel issues have kept me from releasing it. I need to clean it up and that takes time... for my part I don't mind the few display quirks for my apps... |
older | first |