World: r3wp
[I'm new] Ask any question, and a helpful person will try to answer.
older newer | first last |
mhinson 16-May-2009 [2622x2] | Is there a document that describes each feature in view and all the options etch please? e.g. for slider So far I can find tutorials that mention some aspects of slider, but nothing complete. |
etch=etc. | |
Henrik 16-May-2009 [2624x2] | First, there needs to be a distinction between VID and View. View is the basic display engine, faces, feel. (lower level). VID is the layout dialect, styles, etc. (higher level) |
With that in mind: http://www.rebol.com/docs/view-system.html | |
mhinson 16-May-2009 [2626] | so slider is part of VID? |
Henrik 16-May-2009 [2627] | yes and no. it's a VID face, which is a more complicated version of a face. You would typically lay it out with VID and you would use and manipulate it with View functions. |
mhinson 16-May-2009 [2628] | ok |
Henrik 16-May-2009 [2629x2] | You could create and manage a layout with View alone, but it would be a lot harder, since you have to specify faces manually. That's why VID was created. |
? face will show you a basic face. ? system/view/vid/vid-face will show you a VID face. | |
mhinson 16-May-2009 [2631] | I have not quite understood what a face is yet. I quite like learning by going through command descriptions, but it seems tricky to find them with Rebol. Perhaps I should try & write the ones I need in the Wiki? It seems strange that slider is not documented anywhere. |
Henrik 16-May-2009 [2632x5] | Then there is also DRAW, which is another engine used in conjunction with View. In REBOL 2 it works as a slap-on solution to more complex drawing with anti-aliasing, etc. It also has a separate font rendering engine, but DRAW is close to useless for layout. It's best for pretty drawings, that do very little. REBOL 2 generally suffers here with multiple overlapping solutions for slightly different purposes, so it can be a bit confusing. View and VID is probably the most hacked part of REBOL. In REBOL 3, DRAW is the only engine combined with the concept of GOBs: Light weight graphical objects. There are now 3 wholly separate parts and that concept is much less confusing. |
VID (and slider) is not very well documented. | |
If you do: ? face you'll see that a face is a simple object. If you do something like: f: make face [] view f It'll display a gray area in the upper left corner of your screen. View simply takes that object and converts it into graphics. | |
With the above example, you are using View alone without VID. | |
That's about as fundamental you can get. Now, a more complex layout consists of many faces and this works by grouping them in a tree of objects. In the FACE object, there is an entry called PARENT-FACE, which is how faces are grouped together in a tree. PARENT-FACE can be another face object or a block of face objects. This is fundamentally how a typical View layout works, and you can build a layout like this by hand, by creating each face, setting position and size, color, text, etc. for each face, and put them together in a tree and display them with View. | |
mhinson 16-May-2009 [2637] | I see the grey square... and I probed f too to see how the object is made.. |
Henrik 16-May-2009 [2638] | I'm sure you can now figure out, that if you did something like: f: make face [offset: 100x100 size: 200x200] You can figure out what happens. :-) |
mhinson 16-May-2009 [2639x3] | I can guess, but I need to know how to know for sure. |
I think I can work it out | |
? f shows offest & ? f/offset shows F/OFFSET is a pair of value: 479x202 I guess that is as much as I can find out about offset? | |
Henrik 16-May-2009 [2642] | yes, offset is just a pair which positions the upper left corner of the face. nothing else. |
mhinson 16-May-2009 [2643] | so I suppose the slider must have some exposed face I could find if I keep hunting |
Henrik 16-May-2009 [2644x2] | it's jumping a little far, but essentially the face tree I talked about is where the slider would be. |
if you make a layout with VID, a set-word! would allow you to reference a single face: view layout [ button field s: slider ] escape to console ? s brings up the slider face. | |
mhinson 16-May-2009 [2646x2] | is there a list of documented featurs so I can try to avoid using the undocumented ones like Slider please? |
Or is the graphics stuff really an experimental addon? | |
Henrik 16-May-2009 [2648] | It's not experimental, but just not very well documented. I suggest you try the VID style tree in the REBOL desktop under REBOL/REBOL Tools. |
mhinson 16-May-2009 [2649] | It dosnt work. it just says missing file http://www.codeconscious.com/rebsite/vid-ancestry.r |
Henrik 16-May-2009 [2650x2] | It works fine here in REBOL/View 2.7.6. |
are you connected in the lower left corner? | |
mhinson 16-May-2009 [2652x2] | REBOL/View 2.7.6.3.1 |
it says local. | |
Henrik 16-May-2009 [2654x2] | Click the "local" text and it will connect and allow you to download the script. |
In that script you can see the style tree, all styles available in VID. Click on the style will give you the source code for that style. | |
mhinson 16-May-2009 [2656] | That is very good... I was wondering if there was a tree type view of some of the functions in Rebol. |
Henrik 16-May-2009 [2657] | After this, probably go to Demos and Easy VID, for a simple VID tutorial (unfortunately it was never completed, but it has good parts) |
mhinson 16-May-2009 [2658x2] | Thanks for your help again :-) I can see I could spend hours looking at the tree view alone... I had a quick look at the view top when I first instaleld it, but it was all too advance for me then, and then I forgot that it existed. |
I have studied all the information about VID that I can find, for 2 hours mostly trying to find out how to use a slider that is shown horizontaly, rather than verticaly but I cant find where this is described. Have deliberatly not asked how I do this because I want to learn how to find the answers to these sorts of questions myself.. Without telling me the answer directly, can anyone suggest how I should learn to find this information for myself please? | |
Maxim 16-May-2009 [2660x7] | there is another VID base doc, simpler, might help you start. http://www.rebol.com/docs/view-guide.html honestly, I literaly learned all of the VID tricks my doing this: |
probe face | |
where face is any face you have setup in a layout. | |
ex: layout [ my-btn: btn "ok" ] probe my-btn | |
I still use this quite often. | |
I'd say learning to build new styles with the stylesheet system is the first big boost in productivity. this will inevitably leed to you wondering how you can change this or that, and then by probing the face and looking at its code, you see that some values are being reset in the event handler... which is quite annoying. the seconf big boost is to try and understand the event system. the view reference link that henrik gave you earlier is the best resource online. | |
and rebol, as a language is extremely easy to search on the net... you start any search on google with the word REBOL and you'll end up with mailing list chats, altme pages, scripts on rebol.org, etc. | |
mhinson 16-May-2009 [2667] | It seems too complex to get started... the examples seem to jump from childishly simple, right to very hard, with no middle ground. |
Maxim 16-May-2009 [2668x2] | did you look at the view guide? |
(not the reference) | |
mhinson 16-May-2009 [2670] | which one was that? I am confused by so many sources of information. |
Maxim 16-May-2009 [2671] | http://www.rebol.com/docs/view-guide.html |
older newer | first last |