World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
shadwolf 23-Nov-2005 [2513x2] | 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 [2550x4] | 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 | |
Ashley my ask to see those widgets implemented in REbGUI retail as it is not to bother you on the contrary the return i get on those widget was pretty low... So i think adding them to retail RebGUI will allow all REGUI fans to see the code to learn some tricks and to propose some new things or bug correcting ^^ So my ask is more to dynamise and relaunch the RebGUI process than to be bad with you ^^ | |
actually i'm fulltime dedicated to get a job so i'm not a lot around there anymore but i stay tunned time to times and if you get major problems you can yeld me by mail etc... | |
Graham 4-Dec-2005 [2554x2] | shadwolf, it's easier for us to see them integrated into the rebgui distro to try them out. |
Perhaps Ashley could include them and mark those not fully complete as such? | |
Ashley 4-Dec-2005 [2556] | shadwolf, I'm having a bit of trouble integrating listview52. Copying the code and removing all "ctx-rebgui/widgets/" paths gives the following error: ** Script Error: Invalid path value: edge ** Where: view ** Near: show face/pane/1/pane which is odd as your code never explicitly refers to edge. As you are more familiar with the code, could you have a quick look at merging it into your copy of %rebgui-widgets.r (v 0.3.7) and upload the working result. |
Robert 5-Dec-2005 [2557x6] | How do I use the offset for a widget? Where to put it? I want to do the following: wid1 50x50 return wid2 50x50 return wid3 50x50 and now I want to place the next widget right to wid1 and inline with wid1. |
And wid4 has the heigth from wid1 to wid3. | |
tab-panel: Is it possible to specify a color for the tab text? | |
label / field: How to create labels and fields that are all the same size, automatically? I want all labels to have the width of the widest label and all fields to aligan left. For creating pretty input-forms. | |
Something like guide but more intuitive to use. | |
How is the default size for a group-box determined? IMO it should default to the min-size to include all contained widgets. | |
older newer | first last |