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

World: r3wp

[!RebGUI] A lightweight alternative to VID

shadwolf
11-Apr-2005
[552x7]
tab-panel: make face [
		color:	none
		pane:	[]
		l-arw: none 
		r-arw: none
		dir-buttons: false
		feel:	make default-feel [
			redraw: function [face act pos] [test-size test-wid] [
				if act = 'show [face/pane/1/size: face/size - 0x20
; 					
; 				 	test-wid: face/pane/1
; 		    		test-size: test-wid/size/x
; 					if greater? test-size face/size/x  [
; 						either not dir-buttons [
; 				 			dir-buttons: true
; 		    				insert tail face/pane face/l-arw: make arrow [
; 	        					size: 20x20
; 		    					offset: as-pair (face/size/x - 40) 0
; 		    					data: 'left
; 		    					action: [print "you clicked left" ]
; 	     					] do face/l-arw/init
; 		    				insert tail face/pane face/r-arw: make arrow [
; 	        					size: 20x20
; 		    					offset: as-pair (face/size/x - 20) 0 
; 		    					action: [print "you clicked right" ]
; 		    					data: 'right
; 	     					] do face/r-arw/init
; 	 					][	
; 	 						face/r-arw/offset: as-pair (face/size/x - 20) 0 
; 	 						face/l-arw/offset: as-pair (face/size/x - 40) 0 
; 	 					]
; 	     			]

; 			    print "la liste des bouttn est plus grande  que ce que l'on 
voit!!!" 
		    	]
			]
		]
		
		init:	has [tab-offset last-tab] [
			;	create main display area
			insert pane make face [ offset: 0x20 edge: default-edge]
			;	add tabs
			tab-offset: 0x0

   insert tail pane make face [ offset: 0x0 pane: [] color: none ]
			container: last pane

   insert container/pane make face [ offset: 0x0 pane: [] color: none]
			foreach [title spec] data [
				insert tail container/pane/1/pane make face [
					offset:	tab-offset
					size:	1x20
					pane:	[]
					text:	title
					effect:	reduce ['round edge-color 5 'draw copy []]
					resize:	none
					font:	make default-font [align: 'center valign: 'bottom]
					para:	default-para
					feel:	make default-feel [
						over: func [face act pos] [
							either act [

        insert face/effect/draw compose [	; compose required for AGG betas
									pen over-color
									line 3x1 (as-pair face/size/x - 4 1)
									line 2x2 (as-pair face/size/x - 3 2)
									line 1x3 (as-pair face/size/x - 2 3)
								]
								show face
							][

        if face/parent-face/parent-face/parent-face/pane/1/pane <> face/data 
        [	; clear unless selected
									clear face/effect/draw
									show face
								]
							]
						]
						engage: function [face act event] [pf old-face] [
							if event/type = 'down [
								pf: face/parent-face
								pf3: pf/parent-face/parent-face

        if pf3/pane/1/pane = face/data [return]	; has a new tab been selected?
								clear face/effect/draw
								old-face: pick pf/pane pf3/data			; find previous tab
								old-face/resize: pf3/size				; remember last size
								old-face/size: old-face/size - 0x1		; deflag old
								clear old-face/effect/draw
								face/size: face/size + 0x1				; flag new
								face/feel/over face true 0x0
								pf3/data: index? find pf/pane face		; set new pane#
								pf3/pane/1/pane: face/data				; init tab panel
								if pf3/size <> face/resize [				; recursive resize
									span-resize pf3/pane/1 pf3/size - face/resize
									face/resize: pf3/size
								]
								show pf3
							]
						]
					]
				]
				last-tab: last container/pane/1/pane

    last-tab/size/x: 10 + first size-text last-tab	; set tab title width

    display/layout "" spec last-tab					; generate tab spec into tab 
    pane
				last-tab/data: last-tab/pane					; swap pane into data
				last-tab/pane: none								; clear pane
				last-tab/resize: size							; original panel size

    tab-offset/x: tab-offset/x + last-tab/size/x	; set offset for next 
    tab title
			]
			print "size et countainer a la con !!"
			probe size/x
			container/size: as-pair size/x 20
			probe container/size/x
			container/pane/1/size: container/size

   container/pane/1/pane/1/size: container/pane/1/pane/1/size + 0x1	; 
   flag 1st tab
			data: 1								; set pane#
			pane/1/pane: container/pane/1/pane/1/data			; init tab panel

   container/pane/1/pane/1/feel/over container/pane/1/pane/1 true 0x0	; 
   flag first as active
		]
	]
as I inserted 2 countainers to hold header buttons in tab panel I 
had to recode lot of path to be able to locate the convienient widgets 
:=
:)))
i solve both bugs by adding 9999x20 in the containers definition
now I have a new bug the 2 last header button are inserted into the 
secon tab-panel (the demo one ;) ))
how could they jump there  ???
I have no Idea :)
shadwolf
12-Apr-2005
[559x6]
well ashley the last code is posted to you private area (don't want 
to garbage this directory)
have fun ;)
the last thing to be done is: 1) scroll the sub countainer when we 
clic on the arrows 2) when the windows is bigger enought the arrows 
must desapeare been hided :)
sure you need first to find why the 2 last button header of the main 
tab panel jumps to the secon tab panel
Ashley: I posted to you in private my l	astest code.  visualisation 
of the arrows and scoll of the header buttons is done
there is still some bugs that I don't know how to solve them ... 
this time I'm really off ...
shadwolf
21-Apr-2005
[565x3]
ASHLEY  LOOK TO PRIVATE FOR A  SCROLLER WITH NONE  JITTERRING DRAGGER 
IMPLEMENTATION.
and lot of information of what I done and how :)
for all people reading this groups tab-panel problems have been solve
Gregg
21-Apr-2005
[568]
Excellent Shadwolf. Glad to see things are still active and progressing 
on this. I wish I weren't so busy at the moment, and I hope the community 
will help to make RebGUI a model for future projects.
shadwolf
21-Apr-2005
[569x2]
for this project I think the most important thing is the continuty 
there was so mutch widgets lib more or less evoluted that have been 
abandonned because no body was conserned by the futurs of those library 
I want to participate more but my implementations in general are 
very code consumming ;).
but I'm learning lot of things.
Ashley
24-Apr-2005
[571]
Alpha2 build available at: http://www.dobeash.com/files/RebGUI-020.zip

Highlights include:


 - New, unit based sizing model (see http://www.dobeash.com/it/rebgui/display.html)

 - Improved language localization (see http://www.dobeash.com/it/rebgui/locale.html)

 - New arrow, chevron, check-group, led-group, scroller, spinner and 
 drop-list widgets
	- Lots of minor fixes
	- show redefine removed
	- Use of -1 instead of 9999 to denote auto-size
	- Aesthetic improvements (use of gradients)
	- %tour.r substantially rewritten

Known issues

	- spinner and drop-list widgets need more work
	- scroller needs more work (resizeable dragger)

In progress

	- Improved tab-panel (shadwolf)
	- Menu (cyphre / shadwolf)
	- tabbing
	- field input validation (field input masks, etc)

That leaves less than half a dozen widgets to go!

	list		single column
	listview	multi-column
	treeview
	popup-menu	context menu
	status		status bar with one or more “segments”
Robert
24-Apr-2005
[572x2]
Great stuff!! One question WRT fields uses in specification and runtime, 
for example LED-Group. Is it possible to alter the led-group content? 
Adding or removing possible entries in it? Or is this a one-time 
action when the widget initializes?
resizing system: How about a method that will store the layout if 
altered by the user and reload the GUI in the same layout? It always 
drives me nuts if I have to resize application splitter bars, panes 
etc. when starting again.
Pekr
24-Apr-2005
[574x2]
Rebgui starts to look very nicely polished (UI wise), just a bit 
WinXP-ish, but it never mind here ... maybe OSx users will complain 
later :-)
I do not remember now, if it was said that skin system will be available 
later?
shadwolf
24-Apr-2005
[576x2]
beautyfull ;)
robet adding some thing to a group coud be done by append My-group-var/data 
compose [etc...] then my-group-var/init :)
Gregg
24-Apr-2005
[578x2]
Drop list seems to have some issues. Doesn't keep the selected value. 
Maybe just a demo thing.
Looking awesome though!
shadwolf
24-Apr-2005
[580x2]
gregg it's just a demo thing ;)
Known issues

	- spinner and drop-list widgets need more work
Volker
25-Apr-2005
[582]
would it be ok if i try to make this stuff style-compatible? so that 
it could be used both ways?
shadwolf
25-Apr-2005
[583x8]
Volker sure but once you get a working code you need to submit it 
to Ashley ;)
to allow him interger it and ptimize it
optimize it ;)
I'm starting a portage of a very good list widget made by Claude 
RAMIER (cr8825) this code offer many things
sorting, text, field, image, check, info
colom rezising using mouse
returning selected mouse, enbeding non showed information
I will made maybe a merge betwin cyphre my-list and Claude table 
widgets first because Table is twice biger in code than my-list and 
second because some fonctionnality interresting in table made by 
claude.
Ashley
25-Apr-2005
[591]
Robert: LED-Group attributes can be changed at runtime with:

	led-handler/pane/2/data: true
	led-handler/pane/2/text: "Test"
	show led-handler


but the specification (number of LEDs and orientation) is fixed at 
specification time. I have no plans to change this.


Pekr: Most folks are familiar with WinXP, it is something to model. 
The basic RebGUI color scheme is controlled by less than a dozen 
words, and arrow / chevron / other is fully inheritable; but the 
"look" (e.g. tab shape and active shading) is hard-coded in most 
cases. So the answer is that you can easily change the cosmetic aspects 
of the UI but not the fundamentals.

Gregg: known issue.


Volker: Not sure which way you mean. If you want to contribute new 
widgets that work with both VID and RebGUI then I'll be spending 
time optimizing them for RebGUI which will break their VID compatibility. 
If you mean that you want to make the RebGUI widgets work under VID 
then feel free to do so with the widgets I have authored. For other 
widgets, please contact their author(s).
Scot
25-Apr-2005
[592]
Nice.
Robert
26-Apr-2005
[593]
multi-column-list: Please consider adding the auto-filter feature 
as present in Excel. This is a super-fast filter / search feature 
that can be used in most applications.
shadwolf
26-Apr-2005
[594x2]
Robert hum first we will try to make it as somplete as we can ;) 
the autofill feature is neede to for drop list IMOO
so it will come but it's in my opinion a non vital feature it"s like 
the chery on to of the cake not the cake it self  hehe if you see 
what I mean ;)
Volker
26-Apr-2005
[596]
Ashley: changing RebGUI and vid sothat styles are interchangeable.
Robert
26-Apr-2005
[597]
IMO this complicates the RebGUI widgets unecessarly. It would be 
nice to have a wrapper for RebGUI widgets that make them VID compatible. 
But than only as a oneway. RebGUI -> VID not the other way.
Vincent
26-Apr-2005
[598]
a simple way could be 

1) VID -> RebGUI : a 'face widget for RebGUI, to put any prebuilded 
face (ie made by 'layout) in a display,

2) RebGUI -> VID : a 'make-face -like function to build a reusable 
RebGUI face
Brock
26-Apr-2005
[599]
Auto-fill or similarly auto-filter is done fairly nicely in Carl's 
Rebodex.
[unknown: 5]
26-Apr-2005
[600]
Anyone made a non rectangular gui layout?
Ammon
26-Apr-2005
[601]
Yes, that has been done.  I've seen it somewhere but for the life 
of me I cannot recall where or who it was that built it....