r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 GUI]

Kaj
27-Jan-2011
[5803]
Yes, so you don't want to draw a 100x100 item
Ladislav
27-Jan-2011
[5804]
see above
Kaj
27-Jan-2011
[5805]
Yes, so you don't want to draw a 100x100 item
Ladislav
27-Jan-2011
[5806]
see above
Kaj
27-Jan-2011
[5807x2]
Yes, so you don't want to draw a 100x100 item
User deadlock
Ladislav
27-Jan-2011
[5809]
Could you please repeat for somebody not able to remember what he 
read 1 second before?
Kaj
27-Jan-2011
[5810]
No
Ladislav
27-Jan-2011
[5811]
Thanks
Maxim
27-Jan-2011
[5812]
hahhaha
Rebolek
27-Jan-2011
[5813]
the basic question is, what is the meaning of pair! in layout? is 
it size that user wants or is it size that user wants to be used 
for some inner magic?
Kaj
27-Jan-2011
[5814x2]
Yes
If it is not used in a userfriendly way, it shouldn't be there at 
all
Maxim
27-Jan-2011
[5816]
when a concept of default size is there, that is usually what you 
want the pair to be.  when it goes beyon min or max bounds, usually 
you want to push these to at least match the default size...   the 
developper is expressly asking for an adjustment to the default.


the thing is that when a widget is in an auto-resizing layout, asking 
for 100x100 might not actually give you that size, because all the 
widgets are subject to the layout in which they are displayed.  in 
row/columns, you will be subject to equalizing other lateral sizes 
in the list and may be given more space in the longitudinal size, 
such that in fact, your button may be larger than what you asked 
for.


the only way to force a 100x100 button is for the gui to support 
static sizing within a dynamic layout, or support max-size and set 
it to the exact same as default size effectively making it a static 
sized button.
Ladislav
27-Jan-2011
[5817]
Yes, Max.
Rebolek
27-Jan-2011
[5818]
You can write preprocessor that will convert every [button "text" 
100x100] into [button "text" [min-size: 100x100 init-size: 100x100 
max-size: 100x100] and that's all. But there's strong opposition 
to having this directly in dialect.
Maxim
27-Jan-2011
[5819]
just sharing my 15 years of experience building/analysing dynamic 
resizing layout engines.
Ladislav
27-Jan-2011
[5820]
You can write preprocessor that will convert every [button 

text" 100x100] into [button "text" [min-size: 100x100 init-size: 
100x100 max-size: 100x100] and that's all. But there's strong opposition 
to having this directly in dialect." - it is certainly possible to 
have such "statically sized" style, but that is not what the majority 
of users would need
Maxim
27-Jan-2011
[5821x2]
Glass, for example,  just makes you get *at least* that space and 
won't change the resizing model of the style on its own... you have 
to ask it manually to become static by using other switches.
and frames use pairs for margins.
Rebolek
27-Jan-2011
[5823]
maybe it can be done using some kind of option, for example [button 
"test" 100x100 #and-i-really-mean-it]
Ladislav
27-Jan-2011
[5824]
It is quite logical, as far as I remember, you told us, that Glass 
did not have the Max-size at all?
Maxim
27-Jan-2011
[5825x2]
no it doesn't.   Glass still doesn't have the multi-layered sizing 
model of GLayout though, which makes it currently harder to manage 
than it should.
in GLayount, max-size is sort of automatic.  there are two sizing 
values, one for filling, one for stretching. 


its very effective in making sure that only things which benefit 
from extra size, actually get it, and makes everything neatly aligned 
with virtually no need for any manual sizing control in the layout.
Ladislav
27-Jan-2011
[5827]
Do you have different panel styles, using different resizing, or 
just one resizing algorithm?
Maxim
27-Jan-2011
[5828x2]
There currently is only one Frame resizing model (which works in 
X or Y).   though in fact, one can tweak the frame's default decisions 
in substyles.


this has been done in the scrollframe which uses a sub frame dynamically 
and renders a bitmap then uses the bitmap in the display.
because all the layout is a network of nodes, you can really do funky 
stuff... I plan on making a demo of such things as snapping overlays 
to edges of other widgets.
Ladislav
27-Jan-2011
[5830]
Does the Frame resizing model use a kind of "tabular layout", or, 
is it more like the hgroup/vgroup styles, where only the rows/columns 
are maintained, but not both at the same time?
Maxim
27-Jan-2011
[5831x2]
row/column
though with static size you can get similar results to tabular sizing.
Ladislav
27-Jan-2011
[5833]
yes, sure, the results frequently look the same
Maxim
27-Jan-2011
[5834]
when I say static size in GLass, it just means that it doesn't fill 
the space.   things still align and stack up automatically within 
the frame.
Ladislav
27-Jan-2011
[5835]
Yes, the same here, when the inability to grow to fill the whole 
"cell size" means, that the alignment becomes visible (left, right, 
or center in the horiz. direction, top, bottom, middle in the vertical)
Pekr
27-Jan-2011
[5836]
I am still busy on my business trip, returning home tomorrow. I am 
thinking about producing Wiki article about what I find non optimal, 
or what I don't understand. So far I have gripes with 'options block, 
which does not map directly to facets, but is - artificial. That 
part has to move to declarative style definition, as it influences 
how you use the dialect ....
Henrik
27-Jan-2011
[5837]
it may have scrolled out of the way, but there is an R3 GUI project 
in Curecode now.
Claude
29-Jan-2011
[5838x2]
the screen flashes if we expanded the window - i try hello-worl.r3
ubuntu 10.10
Andreas
2-Feb-2011
[5840]
A quick question: is proper alignment along font baselines planned 
for the GUI?
Pekr
2-Feb-2011
[5841]
I would first welcome fixing the quality of font display, which is 
really 80ties quality :-)
Andreas
2-Feb-2011
[5842]
Not that I understand anything about GUI implementation, but font 
rendering sounds like a mere technicality for me.
Henrik
2-Feb-2011
[5843]
actually it's late 90s :-)
Andreas
2-Feb-2011
[5844x2]
Proper alignment of elements along font baselines sounds like it 
_could_ have a deeper impact and requires some planning.
But no idea, really. Maybe it's just a technicality as well :)
Maxim
2-Feb-2011
[5846]
I agree that precise use of the baseline should be doable.  its the 
only way to properly handle multi-font display.  it would also be 
nice to be able to inspect the font so that we can measure the different 
metrics of a font.


x-height, descent, ascent, cap height, linegap (leading), H space 
width, etc.


On the Amiga, I used to align text with these values in code and 
it seemed to be much better.
Ladislav
3-Feb-2011
[5847]
Panel resizing user poll:

Background information:


For resizing purposes, every graphic element (including panels) has:

INIT-SIZE, MIN-SIZE and MAX-SIZE dimensions:


* INIT-SIZE is the size that is being resized (magnified or minified),

* MIN-SIZE is the smallest possible size of the element after resize,

* MAX-SIZE is the largest possible size of the element after resize.


Until now, we used auto-sized panels, for which we always (after 
every content change, like insertion of a button, etc.) recomputed 
their INIT-SIZE, MIN-SIZE and MAX-SIZE based on the sizes of the 
elements the panel contained.


Currently it looks, that there are many reasons, why it may be better 
to *not automatically recompute* INIT-SIZE, MIN-SIZE and MAX-SIZE 
after at least some of the possible change types.


Therefore, we introduced a non-auto-sized panel, which auto-computes 
INIT-SIZE, MIN-SIZE and MAX-SIZE on-demand only.

Our questions:


* After inserting a button (or other contents), what do you think 
should be the default action - recompute all the above values, or 
not recompute any of the above values?

* How to specify a non-default behaviour? Cyphre came with a proposal 
to use a /UPDATE refinement accepting a WHAT block, so, e.g. /UPDATE 
[MIN-SIZE MAX-SIZE] is required to update just the specified dimensions. 
Would you find a different alternative more convenient?
Robert
3-Feb-2011
[5848]
Default action: What would be the outcome of one or the other option?
Ladislav
3-Feb-2011
[5849]
The outcome of the case not recalculating INIT-SIZE, MIN-SIZE and 
MAX-SIZE would be, that the panel would try to occupy the same space 
as before the change. That may be what the user wanted, if he had 
a specific idea, how large the panel should be, regardless of the 
contents he might add into it later.


The outcome of recalculating INIT-SIZE, MIN-SIZE and MAX-SIZE (on 
the other hand) is, that the panel dimensions are auto-changed after 
almost every change. It looks especially "ugly" in case dividers 
are used to change panel dimensions, since if you change the X dimension, 
and later the Y dimension, due to INIT-SIZE recalculation, your former 
change may become totally ignored.
james_nak
3-Feb-2011
[5850]
So you are referring to what happens when the faces are first rendered 
or when a user manipulates the GUI manually or both?
Ladislav
3-Feb-2011
[5851]
The above is not related to what happens when the Panels are first 
rendered. It refers to the case, when somehow, a panel changes somehow, 
e.g. whan a new button is inserted into a panel, or a divider in 
a panel is moved, ....
james_nak
3-Feb-2011
[5852]
Thanks. Then, if I am thinking about this correctly, in the case 
where a user might increase the size of a window, would it be likelt 
he wants the interface to be larger or that he wants to see more 
of what is not visible. Am I off in thinking this is what you are 
asking?