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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Ashley
25-Aug-2005
[1850]
But this allows you to resize a window below an invisible threshold 
only to have your resize [partially] ignored when the layout jumps 
back to it's minimum size. I still maintain that setting a realistic 
min-size is not only subjective but the role of the GUI designer 
... if RebGUI tries to infer this setting it will invariably get 
it wrong ("why did it let my title field shrink to less than three 
characters ... everyone knows a one-char field is useless" type of 
issues).
Volker
25-Aug-2005
[1851x2]
No, this allows the layout to jump back to a bigger size if the designer 
made a mistake with min-size.
would work too if you keep negative sizes. but you dont, you turn 
them to 0, thus losing information. thus not beeing able to react 
to re-increasing correctly. or maybe i understand something wrong?
Ashley
25-Aug-2005
[1853x2]
Correct, the code in question prior to latest build was:

	if find face/span #"W" [face/size/x: face/size/x + delta/x]
	if find face/span #"H" [face/size/y: face/size/y + delta/y]


which works well except that negative sizes seem to cause downstream 
problems. Suffice it to say that I'm now leaning towards a layout-min-size 
model to at least prevent negative sizes in the first place! ;) Good 
discussion.
Graham, are you sure the disappearing text-list slider problem wasn't 
just the fact that all rows fit? Try the following code:

b: copy []
repeat i 1000 [insert tail b i]

display "Test" compose/deep [
	text-list #H data [1 2 3 4 5 6 7 8 9 10]
	text-list #H data [(b)]
]


When you maximize the window you'll see that the sliders only appear 
if needed.
Graham
25-Aug-2005
[1855x5]
sure .. but I'll check.
Yep, my demo has 6 or so items in the text-list, and when you max 
the window, only 3 show with loss of the sliders.
And in your example, the right hand text list demonstrates this point 
for me losing it's sliders as well as another problem - a tiny square 
widget.
rather, a wafer thin widget.
Perhaps you're using a fixed version of rebgui?
Ashley
25-Aug-2005
[1860]
Yep, chalk that up as another thing fixed in 0.3.5. ;) The wafer 
thin dragger is still a problem though.
Graham
26-Aug-2005
[1861x3]
display "" [ area 50x20 #WH slider 5x20 #H data [arrows]] do-events


This doesn't resize properly in that the slider keeps its absolute 
x position.
When items are placed at absolute positions, they don't resize.  

So, how about we do a 

at 50%x30%  ??
or 

at 50x20 #H to indicate vertical resizing ?
Ashley
26-Aug-2005
[1864]
First problem is fixed easily enough:


 display "" [ area 50x20 #WH slider 5x20 #XH data [arrows]]	; note 
 the #X directive

Not sure what the second issue is as:


 display "" [at 20x20 area 50x20 #WH slider 5x20 #XH data [arrows]]

seems to work well enough.
Graham
26-Aug-2005
[1865x3]
but not if u do this 


display "" [at 20x20 area 50x20 #WH slider 5x20 #XH data [arrows] 
at 20x5
0 area 50x5 #WH ] do-events
#X directive noted .. thanks.
And #Y directive seems to fix my other problems :)
Ashley
26-Aug-2005
[1868]
Not so much an absolute positioning problem as a by-product of RebGUI's 
simplistic resizing model. Compare:

	display "" [field #WH field #WH return field #WH field #WH]

with:

	display "" [field #H field #WH return field #Y field #YW]


This limitation is by design so won't be changing any time soon (I 
tend to design GUIs that conform to it naturally ... but that may 
be just me ;) )
Graham
26-Aug-2005
[1869]
In this example I can't get vertical positioning working 

display "" [  
    at 0x150
    

    text-list 30x15 #YH data [ "Joe" "Adam" "Bill" "Artur" "Phil" "Simone" 
    ] [ show-text chattofld pick face/data first face/picked ]

        chatarea: area 150x10 #YWH "Intra office chat appears here" slider 
        5x10 #YXH data [arrows]
 
    at 32x160
    chattofld: field 15 #Y chatfld: field 140 #YW [ 

            show-text chatarea rejoin [ chatarea/text newline chattofld/text 
            ": " chatfld/text] 
            show-text chatfld "" rebfocus chatfld
    ]

    ] do-events
BrianW
26-Aug-2005
[1870x2]
neat. got my very simple gui app working in View, and I'm suddenly 
overwhelmed by the urge to try it with RebGUI instead.
How do I right-align the text in a field?
Graham
26-Aug-2005
[1872]
right
Henrik
26-Aug-2005
[1873]
field font [align: 'right]
should work
BrianW
26-Aug-2005
[1874]
perfect, thanks
Ashley
26-Aug-2005
[1875]
Graham, best you can do is remove #Y directive from first 3 widgets. 
To make things even clearer, revert the span-resize function to its 
pre-0.3.4 definition (i.e. replace the following:

			;	protect against negative sizes
			if find face/span #"W" [
				...
			]
			if find face/span #"H" [
				...
			]

with:

			if find face/span #"W" [face/size/x: face/size/x + delta/x]
			if find face/span #"H" [face/size/y: face/size/y + delta/y]

in %rebgui.r (as has been done in the next build).
Graham
26-Aug-2005
[1876x4]
ok.
I've got to keep the #Y as otherwise the top three widgets don't 
move down on resizing ( there are widgets not shown above them ).
that change doesn't seem to have helped :(
Oh, and how do I scroll the text in the chatarea using the slider?
Ashley
26-Aug-2005
[1880]
The area widget, like text-list, should have a slider that appears 
as needed. Hope to have that in the next build.
Graham
26-Aug-2005
[1881]
Ok.
Graham
27-Aug-2005
[1882]
The action associated with the first tab of a tab-panel does not 
fire when first viewed ... wonder if that should be the case.
Graham
28-Aug-2005
[1883x2]
Is there a way to alter the spacing vertically in a check-group? 
 It doesn't respond to space nxn ...
Do group-boxes resize?
Ashley
28-Aug-2005
[1885x2]
No, but they should.
Latest build available at: http://www.dobeash.com/files/RebGUI-035.zip

Issue log: http://www.dobeash.com/it/rebgui/issues.html


*** Unzip this file into your existing RebGUI 0.3.0 distribution. 
Requires View 1.3.1 ***

Highlights include:


 - generic face-iterator function shared by all lists (text-list, 
 table, edit-list & drop-list)

 - new improved table widget finally supporting row (including multiple) 
 selection

 - updated drop-list & edit-list widgets (defocusing support still 
 limited though)
	- area widget now sports a slider by default

 - resizing code (supporting negative sizes) reverted to pre-0.3.4

 - IMPORTANT: resizeable windows that don't have min-size specified 
 are automatically assigned one the same as the original window size
	- Various multi-row text selection issues resolved
	- Various focus issues resolved
	- numerous other minor bug fixes and coding improvements

In the works

	- basic menu widget
	- revamped documentation 
	- stabilize existing code-base for 0.4.0 beta release
Graham
28-Aug-2005
[1887x4]
note that show-focus replaces rebfocus
Page up, down, and cursor keys do not scroll text within an area.
Great news on the table selection .. must try that out.
I want to scroll the pane within a tab panel.  It's the 7th tab. 
 I can find the tab itself

tp2/pane/8/offset/x: 

but what is the path to the panel face ?
Ashley
28-Aug-2005
[1891]
Something like this:

display "" [
	t: tab-panel data ["A" [field] "b" [field]]
	return
	button "<" [t/pane/1/offset/x: t/pane/1/offset/x - 10 show t]
	button ">" [t/pane/1/offset/x: t/pane/1/offset/x + 10 show t]
]
Graham
28-Aug-2005
[1892]
Ahh.. it's the first pane in the main pane.
Graham
29-Aug-2005
[1893x3]
On reflection, I think I want to actually scroll the contents of 
that pane, and not that pane itself.
I've got about 80 check boxes on one tab panel scattered through 
a number of group checkboxes ... need to clear them in one hit. 
Need some way to run thru all the checkboxes and reset them.
Perhaps the 'clear-text accessor function can generalised to a clear-face 
function ?
Ashley
29-Aug-2005
[1896]
display "Test" [

 c: check-group 30x15 data ["Item 1" true "Item 2" false "Item 3" 
 none]
	button [foreach item c/pane [item/data: true] show c]
]
Anton
29-Aug-2005
[1897x2]
if item/style = 'check [...]
oops, sorry, non-VID..
Ashley
29-Aug-2005
[1899]
if widget/type = 'check-group [...]