World: r3wp
[View] discuss view related issues
older newer | first last |
Maxim 10-Jul-2009 [9011] | but my current version has a display bug in the button looks when pressed... I keep changing the looks for every application, so it doesn't get fixed in the main lib. |
Henrik 10-Jul-2009 [9012x2] | A quick search on "rebol glayout" reveals the rebol.org version, the docs for REBOL's own LAYOUT and some mailing list posts about glayout. |
There is a single link to STEEL which gives me a 404. | |
Maxim 10-Jul-2009 [9014x6] | which is why it hasn't been updated for a while. the one on rebol.org is the last official release. |
its just old, but works with the rebol demo, (also on rebol.org) | |
it works well, it just doesn't have some of the latest features and very specific layout fixes. | |
rebol demo I meant "glayout demo" | |
if you download the glayout demo, it will download the glayout and slim, for you.. | |
(when you run it, of course) | |
Henrik 10-Jul-2009 [9020x2] | Anton, I think I tried that, but that screws up other things: Parent-face in LAYOUT is set to none for some reason, and I'm betting it's because VIEW does something here. Anyhow, setting parent-face separately works perfectly, so I'm keeping that for a while. |
Maxim, does glayout.r contain a complete style set or is it separate? | |
Maxim 10-Jul-2009 [9022x4] | it includes many of the basic VID styles as default... near the end of the file, you will will see a big style block. which basically adds the glayout framework on top of the previous master VID stylesheet. |
it has group styles, including scrollpane which automatically adds V/H scrollbars for nested content. | |
you will be amazed at how similar it is to R3 view... (by what I have seen of it.) | |
if not in looks, in layout engine capabilities. | |
Anton 10-Jul-2009 [9026x2] | Henrik, oh well. But I figured out a clever hack you can place in init to set parent-face. |
window: layout [my-face: box with [append init [parent-face: does [parent-face: does [get last second :layout] none] none]]] my-face/parent-face = window ;== true | |
amacleod 10-Jul-2009 [9028] | maxim, Are you close to revealing your new website? |
Henrik 11-Jul-2009 [9029x2] | Anton, it looks like I'll have to try setting parent-face again. I have another situation with the resize engine that really requires init to have parent-face set. Grr... |
nope... no good. reverted to different strategy. it gives more overhead, but it will have to do. | |
Anton 11-Jul-2009 [9031] | Henrik, what strategy are you using? I was thinking you could redefine layout, since you have collected a fair few GUI functions and styles together. When it comes down to it, it layout doesn't do what you want, redefine it. (And I am guilty of not doing this for so many years too.) |
Henrik 11-Jul-2009 [9032] | Anton, I've not had the energy to take a look at what can be changed with LAYOUT, so what I do is try to stay within reasonable limits of what it can do and stay away from radical changes. One thing to change, if it were, would be that INIT would be less limited, if it was run as a separate pass after initial layout instead of right when the face is created, but this may cause problems for styles that use INIT to alter the size and offset for the face, as well as produce subfaces that need to be initialized first. Also LAYOUT is not recursive and INIT may be run at very different times. At this time, INIT is limited, but you have a pretty good idea of when it's run. In VID3.4 this is not a problem, since there is both an init and post-init action possible, so if I were to get rid of this problem in the right way, I might end up rewriting over 100 kb of well-functioning code. |
Anton 12-Jul-2009 [9033x2] | Hmm.. well why not add a post-init to layout ? This would not affect any existing code, so you could migrate to it at your leisure. |
(Why don't I add it myself ? Well, I might just do that.) | |
Henrik 12-Jul-2009 [9035] | well why not add a post-init to layout you can't add it to layout. it has to be done after all layout is done. |
Anton 12-Jul-2009 [9036] | Ah.. I'll have to think about that. |
Maxim 15-Jul-2009 [9037] | amacleod: unfortunately life has been throwing fast balls at me for the last several weeks ... things like recurring water problems on my home, making all of my life really complicated and time consuming. I also tried something with remark which hasn't lead to useable code yet... so I am about backtrack to earlier versions and use that while I work on the next generation stuff. the next gen stuff is closer to Research than Development than I had predicted. I thought it was much easier to leverage the technology within the web site/page cycle... but efficiency and elegence principles (in form and function) are hard to get right when merging persistent and volatile systems. |
amacleod 15-Jul-2009 [9038] | That seems to be the way of software dev.. I've been two weeks away from release of my project for about 5 months now... |
Anton 25-Jul-2009 [9039] | I got this working this last night. Modeled somewhat on Openoffice Writer / Insert Special Character dialog. do http://anton.wildit.net.au/rebol/util/character-map.r |
Henrik 25-Jul-2009 [9040] | Pretty good. :-) |
Graham 26-Jul-2009 [9041] | Has anyone written a tree based object browser ? Anamonitor is the only object browser I know of ... |
Henrik 26-Jul-2009 [9042x2] | I was actually thinking about writing an object browser, but not directly a tree-based one. |
is there a way around having to focus a face in order to use the scroll wheel above it? | |
Anton 26-Jul-2009 [9044x5] | Graham, a generic object browser should not be limited to hierarchic tree structure. Will you have any circular references? |
Henrik, scroll-wheel: yes there is. See my scroll-wheel-handler: do http://anton.wildit.net.au/rebol/gui/demo-scroll-wheel-handler.r | |
Basically, I make an event handling function, called 'scroll-wheel-handler, open a window, then insert-event-func :scroll-wheel-handler do-events remove-event-func :scroll-wheel-handler | |
The event handler captures scroll-wheel events, looks where the mouse is, finds the face which it is over (a recursive function), determines if it is scrollable, and sends the scroll-wheel events to the that face's engage, just as if it had been focused. | |
(Complicated, huh? But I'm proud.) | |
Henrik 26-Jul-2009 [9049] | Thanks |
Gregg 26-Jul-2009 [9050] | Graham, I worked on one a long time ago, with Ammon Johnson. We did it like Smalltalk, or the OS X Finder, rather than a tree. |
Graham 26-Jul-2009 [9051x3] | Gregg .. was it ever published? |
Anton .. no circular references | |
Basically these are XML files that are being turned into Rebol objects that I wish to browse. | |
Gregg 26-Jul-2009 [9054] | I think we put it out on one of the IOS servers, Developer maybe, but not sure where else. I can dust it off and send it to you if you want. |
Graham 26-Jul-2009 [9055] | Sure ... or post it to rebol.org ? |
Anton 27-Jul-2009 [9056x2] | I made something quite similar recently; an expanding/collapsing dir-tree viewer, like the dir panel of a file browser. Each directory/file has to be an object, because I store some state along with it, like collapsed/expanded, and other interesting attributes can be stored in there in future, when I get around to collecting the info. The purpose of the app is basically to create an image of a directory structure, which can be saved to disk, viewed magnified etc. to give an overview of directory structure. |
I'll clean it up to publish later. | |
Graham 27-Jul-2009 [9058] | So, you modify the object you're viewing to keep states? |
Anton 27-Jul-2009 [9059x2] | No, as I scan the filesystem, I build the dir/file structure and an "associated info" object alongside each one, so it looks like this: dir-attrs: context [...] ; <-- All associated directory info goes here. file-attrs: context [...] ; <-- All associated file info goes here. file-structure: [ (make dir-attrs [...]) %subdir/ [ (make file-attrs [...]) %bfile (make file-attrs [...]) %cfile ] (make file-attrs [...]) %afile ] |
So we can see the top level has one subdirectory and one file, and the subdirectory contains two more files. | |
older newer | first last |