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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Graham
19-Nov-2005
[2502]
How about adding a slider to the title-group widget to allow scrolling 
of the text in the title-group ?
Robert
20-Nov-2005
[2503]
Just cross-posting Geomol's styles: http://home.tiscali.dk/john.niclasen/canvas/newstyles.r
Might be a nice base for RebGUI.
Ashley
20-Nov-2005
[2504]
Nice clean look. The "button-group" widget (buttons numbered 1 - 
4) would make a good addition. Good idea that.
Pekr
20-Nov-2005
[2505x2]
hmm, my last message got lost probably. I sent it, and then I got 
AltME blue-screen instead of message list for this group, and nothing 
appeared. Kind of short disconnection? :-)
What I just wanted to point out is - those styles do look nice. However, 
they don't seem to reflect mouse-over effect. My question is, if 
we give-up on that. IIRC Chris pointed out, that you have to count 
with such things prior to starting your design. Also - what about 
reflecting in-focus styles? As we know, OS does count with it and 
reflects it visually, what about our Rebol UIs?
Ashley
20-Nov-2005
[2507]
Not sure what you mean by "in-focus styles" - please elaborate. ;)
Pekr
20-Nov-2005
[2508]
Ashley - simply put - keyboard navigation (tabbing). In Windows, 
e.g. if button is tabbed=in-focus (my english term :-), you can visually 
distinguish it ...
Graham
20-Nov-2005
[2509]
You mean there's a hover visual notification?
Pekr
20-Nov-2005
[2510]
yes ... currently there is in RebGui, but there is not with Geomol's 
styles. Or do I miss anything?
Graham
21-Nov-2005
[2511]
Text does not reformat when an area field is resized.
shadwolf
23-Nov-2005
[2512x3]
today jipé of rebol french scene have proposed this  progress bar 
:
rebol []
lg: 0
pos: 50x40
fen: layout/size [
at pos

b1: box white 150x20 "0%"  font [size: 11 color: black shadow: none] 
frame black 1
at pos + 1x1

b2: box 1x18 yellow effect [merge colorize 255.255.0 invert] rate 
25 feel [
engage: func [face action event][
if (b2/size/x < 148) [
   lg: lg + 1
   b2/size: b2/size + 1x0
   b1/text: join to-integer lg / 147 * 100 "%"
   show [b1 b2]
   ]
]
]
] 250x100
view/title center-face fen "Smart progress bar"
would be fun in rebGUI ^^
Pekr
23-Nov-2005
[2515]
looks like old Windows one :-)
shadwolf
23-Nov-2005
[2516x2]
yes that's the trick ^^ but it's fun  old fashion
effective and short code
Ashley
23-Nov-2005
[2518]
I didn't know "frame" was a shortcut for "edge [...]". How long has 
that been in VID? Nice code BTW, I think I'll add it.
shadwolf
23-Nov-2005
[2519]
i didn't know it neither  ^^ jipé is full of suprise i love those 
 little and  full of trickies codes ^^
Graham
23-Nov-2005
[2520]
'frame was in the very early versions of VID but I thought it was 
replaced by 'box.  Perhaps it was resurrected for another use ?
shadwolf
24-Nov-2005
[2521x3]
an amelioration!
rebol []
lg: 0
pos: 50x30
fen: layout/size [
at pos

b1: box white 150x20 "0%"  font [size: 11 color: black shadow: none] 
frame black 1
at pos + 1x1

b2: box 1x18 yellow effect [merge colorize 255.255.0 invert] with 
[
rate: 0
feel: make face/feel [
engage: func [face action event][
if action = 'time [
if (b2/size/x < 148) [
   lg: lg + 1
   b2/size: b2/size + 1x0
   b1/text: join to-integer lg / 147 * 100 "%"
   show [b1 b2]
   ]
   ]
   ]
]
]
t: text 100  form b2/rate
bt: btn "Stop" [
b2/rate: pick [0 none] 'none = b2/rate
bt/text: pick ["Stop" "Start"] "Start" = bt/text
t/text: form b2/rate
show [b2 bt t]
]
] 250x140
view/title center-face fen "Smart progress bar"
thank to jipé for his  implication
DideC
24-Nov-2005
[2524]
It's nice, but it's not really a style.
Graham
25-Nov-2005
[2525x2]
Is there an easy way to change the image in a title-group, *and* 
have the pane holding the text change accordingly ?
I can set the pane offset and the para origin manually .. perhaps 
needs an accessor function?
ICarii
26-Nov-2005
[2527x5]
shad - here's another take on that progress bar :)
rebol []
stylize/master [
	agg-progress: box white "0%" with [
		pstart: pend: pfunc: none
		progress: 50
		oldprogress: 0
		update: does [
			if (self/progress <> self/oldprogress) [
				self/oldprogress: self/progress

    self/effect: compose/deep [draw [pen none fill-pen linear 0x0 0 (self/size/x) 
    25 1 1 red yellow cyan blue box 0x0 (as-pair self/size/x * (self/progress 
    / 100) self/size/y)]]
				self/text: join to-integer self/progress "%"
				show self
			]
		]
		append self/init [self/update]
	]
	rate 25
	feel [
		engage: func [face action event][
			if action = 'time [
				if (face/progress <= 100) and (face/progress >= 0) [

     face/progress: to-decimal ((face/pfunc - face/pstart) * 100 / to-decimal 
     (face/pend - face/pstart))
					face/update
				]
			]
		]
	]
]
view/title center-face layout/tight [

 agg-progress 250x11 font [size: 11 color: none shadow: none] with 
 [pstart: now/time/precise pend: pstart + 30 pfunc: does [return now/time/precise]]

 agg-progress 250x11 font [size: 11 color: none shadow: none] with 
 [pend: now/time/precise pstart: pend + 30 pfunc: does [return now/time/precise]]

 agg-progress 250x11 font [size: 11 color: none shadow: none] with 
 [pstart: 0 pend: 100 pfunc: does [random/seed now/precise return 
 random 100]]

 agg-progress 250x11 font [size: 11 color: none shadow: none] with 
 [rate: none progress: 50]
] "AGG progress bar"
;-)
stylize/master [
	agg-progress-pie: box white "0%" with [
		pstart: pend: pfunc: none
		progress: 50
		oldprogress: 0
		update: does [
			if (self/progress <> self/oldprogress) [
				self/oldprogress: self/progress

    self/effect: compose/deep [draw [pen none fill-pen conic (self/size 
    / 2) 0 (self/size/x / 2) 90 0.5 0.5 red yellow cyan blue arc (self/size 
    / 2) (self/size / 2) 0 (self/progress * 360 / 100) closed]]
				self/text: join to-integer self/progress "%"
				show self
			]
		]
		append self/init [self/update]
	]
	rate 25
	feel [
		engage: func [face action event][
			if action = 'time [
				if (face/progress <= 100) and (face/progress >= 0) [

     face/progress: to-decimal ((face/pfunc - face/pstart) * 100 / to-decimal 
     (face/pend - face/pstart))
					face/update
				]
			]
		]
	]
]
view/title center-face layout/tight [

 agg-progress-pie 100x100 font [size: 11 color: none shadow: none] 
 with [pstart: now/time/precise pend: pstart + 30 pfunc: does [return 
 now/time/precise]]

 agg-progress-pie 100x100 font [size: 11 color: none shadow: none] 
 with [pend: now/time/precise pstart: pend + 30 pfunc: does [return 
 now/time/precise]]
] "AGG progress pie"
oops.. didnt realise I still had the fill-pen scales set to 0.5 .. 
was testing effects.. :)
BrianW
26-Nov-2005
[2532]
Is there a way to do menus in RebGUI?
Graham
26-Nov-2005
[2533]
There is no menu widget, and none planned AFAIK.
Robert
27-Nov-2005
[2534x4]
Just playing around with tab-panel. The tab highlighting isn't working 
correct. The text keeps underlined (orange) even if I select an other 
panel. When moving the mouse over other panels, the highlighting 
stays. Note: I use several nested tab-panels.
It only happens in the most nested tab-panel group. So if you nest 
three tab-panels with 4-5 entries you will see the effect.
min-size: This feature is only applied after the first try to resize 
the window. Than it's used, at startup time, the window has a "default" 
size. Whereever this size comes from.
table: if a column has the width of the sort arrow, it's no longer 
possible to change sorting order after clicking once.
Ashley
27-Nov-2005
[2538]
tab-panel: will investigate
min-size: from the display users guide:

2.1.2 Min-Size

Specify a minimum OS window resize size.

display/min-size "Example" [
    tight
    text 80 blue "Some text" #W
    return
    box 80x40 #WH
] 400x400

Note


The min-size limit will only be enforced upon a window resize, and 
the size is inclusive of an OS specific number of border / title 
pixels. Also note that if any widgets are resizeable (#H and #W) 
and min-size has not been specified then RebGUI will assign a default 
value equal to the initial window size.


table: Already noted by Graham (arrow does not share label feel) 
- will add to list
Robert
28-Nov-2005
[2539x2]
min-size: Ok, RTFM. I did but not the whole paragraph ;-) But, is 
this the best way to handle it? IMO the startup size should be min-size.
table: Ok, thanks.
Pekr
3-Dec-2005
[2541x2]
Graham - what RebGUI is your app based upon? It shows UI defects, 
which are way too much easily to get into - resizing destroys some 
parts of UI, table keyboard scrolling does not work - it moves hilight 
off of the screen, pop-up system is not fixed either, which is pretty 
annoying ...
Graham - btw - VID - Video Interface Dialect - shouldn't it be Visual 
instead of Video? :-)
Ashley
3-Dec-2005
[2543]
Most of those issues are with RebGUI / View itself not Graham's application. 
Next release of RebGUI, which corrects a large number of outstanding 
issues, is waiting on the imminent release of View 1.3.2 (which among 
other things fixes the 'parent option).
Graham
4-Dec-2005
[2544x3]
Pekr, yes, I need to fix that.  Visual is correct.
As for the GUI issues, I am confident that Ashley and contributors 
will fix those issues and so I have released it as is.  I don't resize 
anyway.
I am primarily interested in functionality at present.
Pekr
4-Dec-2005
[2547]
Ashley - I know, that is why I posted reply in this group, to actually 
see the reaction of when next RebGUI release is planned, and what 
it will address :-)
Robert
4-Dec-2005
[2548x2]
Ashley, View 1.3.2? We are already at 1.3.61 or am I missing something?
Seems I have lost track of all the version numbering... just wondering.
shadwolf
4-Dec-2005
[2550x2]
erg  .... treeview – data structure should be simple & consistent 
with other widgets ... sub-blocks are the obvious way to go but I'll 
leave the implementation choices to you ;)
we discussed this point  at the treview begining  ...  we have  [[ 
widgets desc ] [  datas to apply to widgets ]] this struct allows 
dynamic datas changes and sortings with low cpu use. treeeview is 
over  code is tiny and all is there to add more dynamic widgets  
but as  we  want to make a grid widget i don't see the meaning of 
adding to treeview the capability to get edit fields  -> note: actual 
fields can be turned as editable on a certain  key + mouse shortcut 
instead of have a special editable widget. Last source are on  http://www.rebolfrance.info/articles/regui-cooking-widgs