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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Gregg
29-Mar-2005
[333]
Really impressive progress! My hat's off to Ashley and the RebGUI 
team.
shadwolf
29-Mar-2005
[334]
Ashley I notice it it was done pretty quickly as a try Like a can 
I do this algorithma ;)
Graham
29-Mar-2005
[335]
I'm missing a new_folder.png
shadwolf
29-Mar-2005
[336]
the caculation/show on lefted popup menu are pertty un goodly calculated 
into menu feels ;)
Graham
29-Mar-2005
[337]
ahh.. got the new distro.
shadwolf
29-Mar-2005
[338x3]
buuuuuu you supres my nice lefted lol ;)
hehehe no problem I think firsst we will provide it easy and then 
we could enhance it maybe cyphre wants to apport some code to it 
and enbetter it
ctx-menu was in a early stage  :)
Graham
29-Mar-2005
[341]
is the first character of the words supposed to overlap the images?
shadwolf
29-Mar-2005
[342x3]
no ...
with my version it's not draw like this so 2 alternatives : or Ashley 
deleted some of the compositing code (don't think so ) or the images 
are to big and to avoid this to append again we need to add a static 
image menu resampling in order to get them fit the relevent value 
;)
Graham some indulgence please menu in rebgui are very alpha stage 
vefor sunday I don"t even know  what could be the result of having 
it to rebogui and if it was workable with older non AGG capable rebol/view 
;)
Graham
29-Mar-2005
[345]
hehe .. not complaining, just asking ..
shadwolf
29-Mar-2005
[346x6]
when I see it was relatively close in code motion to rebgui I started 
to wanted hardly to port it and better it a little (the famous lefted 
option ... to quick developed to convince every one  ;)
GRaham you point to good problems any way ;)
the ask is do we need to specify in hard coded way the resize of 
every image ...
or do we let user size it's image be it self ?
img: to image! make face [edge: none image: img size: 22x22]
hum hum  I saying craps ... the image is hard coded sized but maybe 
to big ...
Ashley
29-Mar-2005
[352]
Previous images were 18x18, while I'm using "standard" 22x22 ones. 
Everything else needs to be resized accordingly, but it's going to 
be hard-coded so a lot of the dynamic sizing code can go. Less is 
more. ;)
shadwolf
29-Mar-2005
[353x7]
:)
hey ashkey good to see you online at the same time than me
;;)
I was looking too it ... to see if we could only deplace to left 
the text  un menu popup
graham's menu problem patch
insert tail sub/pane make item-f [;menu item
						type: 'item
						text: itm
						offset: oft
						root: sub

      font-colors: either dis? [[172.168.153 172.168.153]] [font-colors]
						font: make font [align: 'left color: font-colors/2]

      para: make para [wrap?: false origin:  22x1 + (lineh * 1x0)]
						size: 0x2 + get-tsize/fnt itm font
starting line 132 just copy the para: value of item-f
Graham
29-Mar-2005
[360]
The icons look about 20% bigger than the ones used in Trillian .. 
which I just downloaded.
shadwolf
29-Mar-2005
[361x9]
hum
with a little  modification to para:  arround line 132 you can use 
both witout any over showing of text problem
para: make para [wrap?: false origin:  22x1 + (lineh * 1x0)]
can be para: make para [wrap?: false origin:  15x1 + (lineh * 1x0)] 
if you prefer
it's the first parameteer of para/origin: that needs to be changed 
;)
know what next task is a true challenge making tables in the style 
of GUI4CLI ... I'm affraid to turn mad ;)
G4C TUT_MCListview

// ===========================================================
// A Multi Column (or Database) Listview..
// ===========================================================

WINDOW 126 90 367 373 "Listview"
	winattr style resize

xOnLoad
	// add some records to the listview & open..
	gosub #this AddRecords
	guiopen #this

xOnClose
	guiquit #this

// ===========================================================
// The listview
// - This is a normal MULTISELECT listview (the default).
// For this type to be triggered, you must double-click it.
// ===========================================================

XLISTVIEW 0 0 0 0 'The Title' "" var

	attr ID mylv
	attr resize 0022
	attr frame sunk

	// Give it a grid and allow the user to drag, drop & re-arrange
	// the lines - You can add more styles here..
	attr style grid/arrange/drag/drop/arrange

	// Add some columns. The first one we state with a '#'
	// in front to indicate we mean the 1st column.
	attr LVCOLUMN '#Item/width/120/TITLE/Description'

 attr LVCOLUMN 'Units/width/60/TITLE/Units/TYPE/number/JUSTIFY/RIGHT'

 attr LVCOLUMN 'Amount/width/60/TITLE/Amount/TYPE/number/JUSTIFY/RIGHT'

 attr LVCOLUMN 'Total/width/60/TITLE/Total/TYPE/number/JUSTIFY/RIGHT'

	// show the line double clicked..

 SetWinTitle #this 'SUM: $%Units x $%Amount = $($%Units * $%Amount)'


// ===========================================================
// This is a routine to add 100 records with various
// meaningless values to the above listview. Note how
// the fields can be used as normal variables.
// ===========================================================

xRoutine AddRecords
	local c

	use lv #this mylv

	// before we start, we HIDE the listview. This will
	// stop Gui4Cli from visually refreshing it every time
	// we add a record and will GREATLY increase the speed.
	// This will have no effect if the window is closed.
	// After we finish, we show it again..
	setevent #this mylv HIDE

	for c 0 100
		// add an empty record..
		lv add ''

		// Fill the fields with various values..
		%Item   = "This is Item $c"
		%Units  = $($c * 3)
		%Amount = $(($%Units / 2)*1000)
		%Total  = $($%Units * $%Amount)

	endfor

	// Show the listview again, refreshing the display..
	setevent #this mylv SHOW

// ===========================================================
// Right mouse button handling - Some menu choices..
// ===========================================================

xOnRMB


 QuickMenu -1 -1 'Select All/Remove selected/Add 100 records/#sepa/cancel'
	use lv #this mylv
	docase $$choice
		case = 0			// Select All
			lv select all
			break
		case = 1			// Remove selected
			lv delete selected
			break
		case = 2			// Add some records..
			gosub #this AddRecords
	endcase
this code sample show how multi column tables are treated using Gui4Cli 
;)
I think the menu code to popup menu must be retake in part to make 
the dropdown item alowing to put to it text + image icons :)
Robert
31-Mar-2005
[370x9]
area style: Is it possible to add ctrl+cursor-left/right to jump 
over words? This would be nice and makes the area style mostly complete.
tabbing: How about a tabbing for "forms" and a tabbing WRT group-boxes. 
CTRL+TAB could jump out of the group box to the next field/group 
box and SHIFT+CTRL+TAB would jump backwards.
led: IMO it would be nice to have the same click-awareness as CHECK.
splitter: adding a richt-click to reset splitter to original position. 
If users have screwed up their layout ;-))
tab: IIRC someone state it already. A scroll-able tab-heading.
BTW: I'm just posting what I recognize while playing around with 
the TOUR. Great work so far!! Really looks very nice.
tab / group: Is the DATA part realy required as a structural element? 
What about this?

tab-panel [
	size 1000x300
	"Tab1" [...]
	"Tab2" [...]

The idea is to implicitly add a tab for each STRING! BLOCK! pair.
]
I never really like the implicit usage of FACE and other words in 
VID. Especially if not documented and those words are not very obvious 
to guess. I see that RebGUI uses the same approach:
	slider	[action [show-data p face/data]]

What about this?
	slider	[action [show-data p slider/data]]

This shows what kind of object we (implicitly) use.
slightly OT: With all those widgets now. Where is VID still "better" 
than RebGUI? Are we are missing anything?
Maarten
31-Mar-2005
[379]
Robert: VID isn't better imho.
Robert
31-Mar-2005
[380]
:-) Ok, now I know what to use for my "new" projects.
Pekr
31-Mar-2005
[381x2]
Isolation/encapsulation of particular styles (widgets) functionality 
may mean simplyfying the situation, as we can see with RebGUI, althought 
it is not as feature (widget) complete as VID is ...
Rebol is so much free-form, that with something like VID, componentised 
(shared) feels, etc., you can get yourself into trouble and VID starts 
to look like a bit bloated, although it is really to say such thing 
about anything rebol related ...