Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Dynamic face positioning

 [1/7] from: coussement:c:js:mil:be at: 25-Jun-2001 11:55


Hi list: A little trick I just found out ;-) Because I've to develop some GUI for my project, and it's sometimes tricky to place all your faces on your background - you known ... set offset, run, modify offset, run, modify again ... - I thought it should be great doing that on a more "intuitive" way ... like drag&drop . So I hacked my code by using the *engage* func like in this example:
<snip>
move: [ engage: func [face action event][ if action = 'down [start: event/offset] if find [over away] action [ face/offset: face/offset + event/offset - start print face/offset show face ] ] ] lay: layout/size [ box 50x50 "Hello" red feel move ;<<<<< slider 10x100 feel move ;<<<<< ] 200x200 view lay </snip> Because of the *print face/offset*, I can read the current pos of the face I'm moving. When I'm happy with it, I just note that and set the object static by an *at* or *offset* or whatever. When all is OK, I just remove the *feel move* code. It's handy, easy, and I win A LOT of time ! BTW, I should perhaps propose this for the next /Zine. What do you think ? Hopes this helps somebody ;-)) chr==

 [2/7] from: gchiu::compkarori::co::nz at: 25-Jun-2001 22:20


> When all is OK, I just remove the *feel move* code. > > It's handy, easy, and I win A LOT of time !
Very neat. BTW, have you seen Carl's GUI design tool for VID layouts? -- Graham Chiu

 [3/7] from: coussement:c:js:mil:be at: 25-Jun-2001 15:24


I'm afraid I've pass this one :-( What's its name ? Where can I find it ? Thx, chr==

 [4/7] from: gchiu:compkarori at: 26-Jun-2001 8:05


On Mon, 25 Jun 2001 15:24:08 +0200 "CRS - Psy Sel/SPO, COUSSEMENT, Christophe, CPN" <[COUSSEMENT--C--js--mil--be]> wrote:
> I'm afraid I've pass this one :-( > > What's its name ? Where can I find it ? >
Sorry, but I can't remember. It was included as an example when View was first released but I haven't seen it since. Perhaps someone else remembers ... -- Graham Chiu

 [5/7] from: philb:upnaway at: 26-Jun-2001 7:47


Hi Christophe I have a copy of layout15.r which I which I believe is what graham was referring to. It is 30K so I wont post it to the ML. I can mail it to you off list if you want a copy. I havent used it much and I believe there are still some bugs in it. I can't see it in the library ..... there is a much smaller example in the library .... see http://www.reboltech.com/library/scripts/layed.r .... but is not as complete. Cheers Phil On Mon, 25 Jun 2001 15:24:08 +0200 "CRS - Psy Sel/SPO, COUSSEMENT, Christophe, CPN" <[COUSSEMENT--C--js--mil--be]> wrote:
> I'm afraid I've pass this one :-( > > What's its name ? Where can I find it ? >
Sorry, but I can't remember. It was included as an example when View was first released but I haven't seen it since. Perhaps someone else remembers ... -- Graham Chiu

 [6/7] from: john:schuhr at: 2-Jul-2001 16:53


It's still hosted on the rebol.com site, but doesn't like anyone's touched it in quite a while. http://www.rebol.com/view/reb/layout.r At 08:05 AM 6/26/2001 +1200, you wrote:

 [7/7] from: coussement:c:js:mil:be at: 5-Jul-2001 10:02


thx chr==