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

World: r3wp

[!REBOL3 GUI]

Maxim
25-Oct-2010
[4067x4]
might even be that the gui which manages the effect cannot be re-opened... 
ex photoshop.


and yes the data has to be stored somehow... another thing the undo 
"actions" are able to manage better/
they might know how to store things in diff mode, but only it can 
know based on current state, when its remembering.
also, there is a tricky thing to redoing in that its often more like 
a complement than an inverse of an undo... especially when storing 
diff data.
so the undo data and the redo-data aren't necessarily the same   
:-(  


my best system was using dataflow nodes.   but it requires a dataflow 
dataset.
Kaj
25-Oct-2010
[4071]
I'm pleased with this discussion. Undo journaling is sorely lacking 
from many systems
Gregg
25-Oct-2010
[4072]
The standard design pattern applied to undo/redo is the Command pattern, 
which implies that everything you want to undo or redo is a command 
that knows what it means to perform an action and apply its inverse, 
and the target of the action.
Maxim
26-Oct-2010
[4073x2]
yep... what I call actions above.
also most undo/redo tie-in commands with macros and/or actual gui 
buttons and menus... sort of like the internal API for the lower-level 
stuff.


each of these commands/actions puts itself on the undo stack  and 
usually has a counter command...  add-text/remove-text, edit-record/restore-record, 
etc.
shadwolf
26-Oct-2010
[4075x11]
only  edit face needs the undo/redo stuff ... and mostly Area where 
you can input large text for text field it doesn't matter and could 
bring a security breach ... If you ca recall the previous password 
and user entrered in a login window for example.
efficient undo/redo have to be face based. The need for other face 
to access it is irrelevant as  it's a temporary buffer  and that 
this buffer main fonction is to keep tracks of the changes. Wider 
you keep the tracks heavier is the syttème. If that systeme could 
be arguments passed to configure and tune it that would be top.
where undo/redo starts to be challenging is when you don't deal with 
pure texte anymore but that you have to deal with formated text.
with only keeping full tracks for the "actions" into an Area type 
face the undo/redo statcks could be on big documents really heavy 
in memory.
some kind of binary labelling for action is then  needed to keep 
memory use to the minimum. You have to keep record fo the postion 
elements within the text too...
another optimisation is that when you create a document you will 
obviously do alot of insert action so the idea is to regroupe the 
insert actions betwin  insert space
For example:


insert "a", insert "b"', insert "c"; insert " " -> trigger of the 
sorting algorithm insert "abc" [line1-:-0] (this optimisation can be 
seen in OpenOffice 3.2)
 

Would be better if instead of registery the action done by the user 
you register the mirror action to be apply to reverse it
then you have

delete "a", delete "b", delete "c"; delete " " -> trigger concatenation 
algorythm delete "abc"@line1:0, delete "space"@line1:3 (position 
here is set as line number followed by the caracters to pass in the 
line before reaching the character can speed up rendering if you 
are able to use remove index stuff in my opinion)
anyway good luck in this hudge task you could write a book only on 
the undo/redo functionnality ;).
there is so many to say about undo/redo functionnality that it can 
be the subject of a book of it's own easyly....  (sorry previous 
sentence wasn't pretty understandable)
undo/redo works as a LIFO pile.
you have to keep the deletions active in you record

lets say the user does:

insert "a", insert "b", insert "e", backspace "e", insert "c" then 
the concataining algorythm have to merge insert "a" and insert "b" 
into insert "ab", but need to keep record of the actions insert "e", 
backspace "e", insert "c" in order to unpile it properly.
otherwhile you loose information or better say course of actions.
Gregg
26-Oct-2010
[4086]
You could write a lot about it for sure, but it's worth looking at 
for the general case beyond simple char-by-char text edits. Consider 
fwd/back navigation and breadcrumb trails. The trick is to leverage 
the generality and use it to make things easier, rather than making 
more complex.
Henrik
26-Oct-2010
[4087]
it's potentially a rat's nest to stick our fingers into, but from 
a simple developer's starting point, it should work without doing 
anything to the style or the layout. that's where I think the design 
should start.
Gregg
26-Oct-2010
[4088x3]
Yes. The style needs to interface to the engine without user intervention.
Style writers are the people doing the work for the rest of us.
And the engine should make it easy for style writiers. :-)
Henrik
27-Oct-2010
[4091]
New r3-gui.r3 available at:

http://94.145.78.91/files/r3/gui/r3-gui.r3

No changes to other components.
Maxim
27-Oct-2010
[4092]
thx.
Pekr
27-Oct-2010
[4093]
and changes to gui itself? at least in brief?
Rebolek
27-Oct-2010
[4094]
mainly fixes
Henrik
29-Oct-2010
[4095]
New r3-gui.r3 released at above location.


New feature: Now allows reactors to be run after a specific actor 
in the style. If your style runs ON-DRAG, a block of reactors after 
an ON-DRAG keyword will be run afterwards. This opens up a lot of 
new possibilities.

view [field on-drag [do [probe 'dragging]]]

This needs a lot of testing.
Henrik
2-Nov-2010
[4096]
Unofficial A110 available:

http://94.145.78.91/files/r3/gui/r3.exe
http://94.145.78.91/files/r3/gui/r3lib.dll
Henrik
3-Nov-2010
[4097]
http://94.145.78.91/files/r3/gui/247.png


Tab boxes now support drag and drop. I'll provide a built version 
tomorrow as I found a build problem tonight, so you can try it out.
Gregg
3-Nov-2010
[4098]
So now you can drag tabs to reorder them? Cool in any case.
Rebolek
3-Nov-2010
[4099x2]
Yes, exactly.
And there's also tab preview when you hover over tab button.
Gregg
3-Nov-2010
[4101]
Ooooh.
GiuseppeC
3-Nov-2010
[4102]
Very nice news but I still I havn't seend grids,  file requestors, 
requestors, listiviews, right-to-left support ad many more.
Hurry up, we are waiting !
.
.
.

:-) just joking. Fantastic work !
Pekr
3-Nov-2010
[4103]
Drag and drop - nice feature, about tab preview, I am not sure about 
that one. It felt a bit distracting last time I saw it. Can it be 
turned off as a feature?
Rebolek
4-Nov-2010
[4104x2]
Now it's always on but aking a switch to turn it off is easy.
aking=making
Henrik
4-Nov-2010
[4106]
Rebolek, architecturally, it may be a good idea to provide such thumbnails 
as part of the help system, when it comes along. The help system 
is what will allow us to use layouts and gobs as tool-tips for any 
face, so hopefully it will be possible to call up an image in 1-2 
lines of code.
GrahamC
4-Nov-2010
[4107x3]
Is that the current fashion .... bevelled tabs?  And not rounded 
tabs?
and would it be feasible to have tabs across multiple rows instead 
of having to use arrows to move the tabs across?
Most multi-tab apps I see spread across 3 or more rows
Henrik
4-Nov-2010
[4110]
style design is not really commentable, since it will be replaced, 
when the GUI is stable and near complete.
Rebolek
4-Nov-2010
[4111]
Tabs are not rounded, because there were some problems with ARC in 
SHAPE :)
GrahamC
4-Nov-2010
[4112]
Interesting ..
Rebolek
4-Nov-2010
[4113]
Tabs in multiple rows? I'll think about it.
GrahamC
4-Nov-2010
[4114]
I see windows uses square tabs
BrianH
4-Nov-2010
[4115]
With slightly rounded corners in most themes.
GrahamC
4-Nov-2010
[4116]
I was just checking out the advanced system properties in the control 
panel .. no rounded corners