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

World: r3wp

[!REBOL3 GUI]

Pekr
7-Feb-2011
[5890]
GrahamC: well, as for browser, I recently looked into FF 4 featureset 
- video, audio, smooth fonts (open type), transitions effects via 
CSS 3, 4x faster JS ... we are somehow starting to lag behind :-)
GrahamC
7-Feb-2011
[5891]
Yeah ... I was thinking that maybe we should be using a similar event 
model to make it easier for us to learn both :)
Pekr
7-Feb-2011
[5892]
GrahamC: the event does not necessarily have to be "consumed". In 
REBOL, we simply have events, and you can always return just the 
same event when processed by our handler. Remember insert-event-func 
from R2? You could create transparent event filters ...
Rebolek
7-Feb-2011
[5893]
It's much better than R2, because it's actually possible to work 
with events.
Pekr
7-Feb-2011
[5894]
We need the ability to create events, and we should also be sure, 
that we are able to obtain modern events, as e.g. above mentioned 
FF4 can now handle multi-touch native Windows 7 event. And we are 
not even receiving such things as ctrl tab for tab handling. What 
I still don't understand is - the system port? Is that port still 
available in R3? And what was it good for? It would be e.g. nice, 
if by opening the system port, you would insert such a listener to 
the OS event model, registering for particular events. Well, that 
might be slow, if you are not carefull, but that way you might be 
able to receive any system event possible .... but not sure it is 
even possible :-)
GrahamC
7-Feb-2011
[5895]
Yeah, they also have event bubbling .. so a click can propagate outwards 
for other things to deal with
Rebolek
7-Feb-2011
[5896x2]
We need the ability to create events
 - so you should try make event!
event bubbling - that's part of R3GUI.
Pekr
7-Feb-2011
[5898]
Rebolek - I know make event! is possible, but does it actully work? 
IIRC it was not fully working in early alphas? So you say I am able 
to simulate e.g. a keypress, mouse event, etc.?
GrahamC
7-Feb-2011
[5899]
is make event! attached to a particular GUI object?
Rebolek
7-Feb-2011
[5900x2]
Yes. I haven't got use for it yet, so I tested it only briefly. But 
I was able to create event!, send it to another face and process 
it.
Graham no. It's up to you what are you going to do with that event.
Pekr
7-Feb-2011
[5902]
Graham - why should it be? I expect it being just a structure/object, 
you fill in the data, and it gets inserted into the event queue, 
then your objects react accordingly, like if the event would be generated 
by normal action.
GrahamC
7-Feb-2011
[5903x2]
So, how you would you simulate a mouse click on a button then?
a button that might be buried by another window on top of it?
Rebolek
7-Feb-2011
[5905]
I would simply call on-click for that particular button
Pekr
7-Feb-2011
[5906]
graham - the gui has many nice features/handlers. There are things 
like do-face, do-style, not sure if cause-action is there (IIRC it 
was part of Gab's GUI)
GrahamC
7-Feb-2011
[5907]
resize on a window?
Rebolek
7-Feb-2011
[5908]
do-style window 'on-resize win-size
Henrik
7-Feb-2011
[5909]
eventually we'll need the automated test system, so an "event machine 
gun" is needed.
GrahamC
7-Feb-2011
[5910x2]
and a way to record macros?
is there a way to enter characters into a field ?  Like the DEL, 
and Backspace ?
Henrik
7-Feb-2011
[5912]
macros could be derived from the undo system
GrahamC
12-Feb-2011
[5913]
Is Pekr's port of the demo available yet?
Pekr
12-Feb-2011
[5914x5]
I am going to work on it a bit today, and tomorrow, then I can release 
what I have ...
I am really nervous about things like removing the easy ability of 
changing the color of something easily, and if it will unnerve me 
in the future, I will fork it ... :-)
I want freaking to change the color of the scroller, the way Carl 
did it easily, via span-colors, easily changing the gradient. Material 
system is useless for me, if I can't do so easy things the esay way 
...
I am looking for the GUI for massess, not for academic stuff ...
Any hints how the material system work? How do I "destylize" panel 
for e.g.? Let's say I want panel functionality, but without the visuals 
(if I enclose everything in panel, there's too many borders and gradients 
around, and I would like to have more relaxed design). Let's say 
I would like to create derived style, called panel-, panel-less, 
pure-panel, whatever. I can see following draw code:

draw: [
			plain: []
			gradient: [
				clip margin-box/top-left margin-box/bottom-right
				pen none
				line-width 0
				grad-pen linear 1x1 0 gob-size/y 90 area-fill
				box (margin-box/top-left + 1) (margin-box/bottom-right - 1) 1
			]
		] 

And following on-make code:

			on-make: [
				make-material face get-facet face 'material
				set-material face 'up
				all [
					get-facet face 'area-fill
					set-facet face 'draw-mode 'gradient
				]
				make-panel face 'panel
			] 

What I am supposed to do, to change the disign?
Henrik
12-Feb-2011
[5919x2]
When this is created properly, the basic panel should have no visible 
frame.
Then other styles would derive from it and add the necessary frame.
Pekr
12-Feb-2011
[5921x4]
yes, but what's the usage case?
e.g. following function (trying to study material system):

set-material: funct [

 "Chooses the gradient from a material object to use with a face mode"
	face [object!]
	mode [word! none!]
][
	all [
		mat: get-facet face 'materials
		set-facet face 'area-fill any [
			all [mode select mat mode]
			select mat 'up ; default mode is 'up, for none inputs

   select mat first words-of mat ; if 'up does not exist, use first 
   word
		]
	]
]


E.g. for panel, there is no 'materials facet, just 'material one, 
as can be seen in on-make actor ....
hmm, progressing slowly, but at least something:


>> view [p: hpanel [button do [print mold get-facet p 'materials]]]
make object! [

    up: [0.0.0.200 0.0 0.0.0.255 0.5 255.255.255.255 0.5 255.255.255.220 
    1.0]

    down: [0.0.0.200 0.0 0.0.0.255 0.5 255.255.255.255 0.5 255.255.255.220 
    1.0]

    over: [0.0.0.200 0.0 0.0.0.255 0.5 255.255.255.255 0.5 255.255.255.220 
    1.0]
]

== make gob! [offset: 566x379 size: 148x42 alpha: 0 text: "REBOL: 
untitled"]


>> view [p: hpanel [button do [print mold get-facet p 'material]]]
container-groove

== make gob! [offset: 566x379 size: 148x42 alpha: 0 text: "REBOL: 
untitled"]
Why does following does not work? I try to set the panel to the 'plain 
mode, but calling 'show crashes the code:


>> view [p: hpanel 200x200 [button do [set-facet p 'draw-mode 'plain 
show p]]]


So - how do I refresh/redraw the panel? Should I somehow call the 
'on-update actor?
Henrik
12-Feb-2011
[5925]
does the panel style have a draw-mode 'plain?
Pekr
12-Feb-2011
[5926x2]
yes, an empty block :-)
What is the correct way to call an actor? do-style face 'on-update?
Henrik
12-Feb-2011
[5928]
shouldn't it have an argument?
Pekr
12-Feb-2011
[5929]
how can I recognise, what arguments particular actors should obtain, 
if not in the comments? :-)
Henrik
12-Feb-2011
[5930]
I believe that is a problem that is yet to be solved.
Pekr
13-Feb-2011
[5931x4]
How can I properly attach scroller to progress bar? Following code 
shows scroller at 100% value. Scroller accepts some initial size 
parameter, but not sure how to utilise it either ....

view [prog: progress sbar: scroller attach 'prog]
Why text utilising rich-text does not work either?
'drawing style has not effect too:  view [drawing [pen black circle 
50x50 30]]
I really wonder, if R3 GUI sees ANY regular development? ;-) Half 
the styles don't work or don't work as expected :-) Recent R3 GUI 
status is, that it is not usable for more than simple dialog box 
:-) I hope that we can see some quick fixes? :-)
Henrik
13-Feb-2011
[5935]
There are still many things to solve, so there are bound to be many 
regressions until we reach a point where no more features are needed 
for now.
Pekr
13-Feb-2011
[5936]
I know Henrik - but I thought that there is someone actually working 
on styles? Possible Bolek? I was about to "port" rewrite demo, not 
to redo styles (which is beyond my capabilities :-) Most of things 
I mention here are obvious by very simple examples, so I wonder if 
someone tested them, or what is the "action plan" towards the GUI 
progress?
Henrik
13-Feb-2011
[5937x2]
Bolek is working full time on styles, particularly tables.
The plan is to do styles on priority with needs with the SCRUM tool, 
that's why tables are being worked on right now. Also continual design 
reviews are necessary to make sure we won't run into design dead-ends. 
That's why there may be regressions.
Pekr
13-Feb-2011
[5939]
tables - nice, and good to know ...