World: r3wp
[View] discuss view related issues
older newer | first last |
Maxim 13-May-2009 [8716x2] | event transparent? |
like face/feel: none | |
Henrik 13-May-2009 [8718x3] | I tried that without success. |
I will try it again though, just to see if I did something wrong. | |
Nope, it doesn't work. | |
Maxim 13-May-2009 [8721x2] | the problem, is that some init blocks of some faces might create the feel on the fly, so for best effect, append the face/feel: none to the init block. |
the window feel, for example is recreated anytime you unview/show window. | |
Henrik 13-May-2009 [8723] | Well, I've already looked at the feel block for the face after the layout is created and shown and it still says none!. If it works correctly, it should be possible to click with the mouse through that face, shouldn't it? |
Maxim 13-May-2009 [8724x2] | yes. |
I create dynamic faces all the time, which are basically neutralized by face/feel none. | |
Henrik 13-May-2009 [8726x2] | if the face is the last one in the window pane, that shouldn't have any effect on feel being none, should it? |
I'm just trying to create a simple floating rectangle. | |
Maxim 13-May-2009 [8728] | no, you are saying the window event does not receive mouse events, for example, if the rectangle is within the window? |
Henrik 13-May-2009 [8729] | If I hover it above a text field, I can type text in the field, but I can't click on the field to mark up text with the mouse. |
Maxim 13-May-2009 [8730] | do you a small example you can post ? |
Henrik 13-May-2009 [8731] | view layout [at 0x0 field at 0x0 box with [feel: none]] |
Maxim 13-May-2009 [8732x3] | strange... you've got me puzzeled!! |
I'm am sensing a few minutes of lost time ahead ;-) | |
well, it seems that the do event handling really is not great. I've tried all I know and it really looks like: if a face from a diffrent branch is over another face, it blocks all events to underlying faces. only child faces can pass events to their parents... this is pretty evil. You could use Anton's do event simulator lib, and hack it so it allows this. :-( you'd have to remember that a face has required/handled the event (in its detect) and stop looking amongst further pane branches. | |
Henrik 13-May-2009 [8735x2] | I think I'll do something else, which is pretty clumsy, but I think it can work. |
Thanks for the help. | |
Maxim 13-May-2009 [8737] | Its also possible that Anton, Gabriele or Cyphre have found a trick. I'd be interesed to know in any case, cause this could be a problem for me in the future too. |
Henrik 13-May-2009 [8738] | yes, even this fix is rather expensive. one face for each side instead of one, but maybe it will speed up redrawing big faces a bit. |
Henrik 14-May-2009 [8739x2] | Maxim, do you know how the iterated faces function is used in View? I'm stuck in a situation where the index is sometimes returned as none. |
never mind, I think I got it. | |
Anton 14-May-2009 [8741] | You can't do event-transparent faces. I figured out a huge hack (simulating DO EVENT) which was not quite able to go the whole way. :-( |
Steeve 14-May-2009 [8742] | your transparent face can throw back the events to the underllying faces, you just have to locate them with the offset of the events, i used this trick several times |
Anton 14-May-2009 [8743] | Can I see a demo of your technique, Steeve? I wanted transparent events along with transparent regions of a face (eg. a face with rounded corners, the events should pass through the corner regions, but the rest should land on the face). It just couldn't be done properly - see my file http://anton.wildit.net.au/rebol/gui/transparent-events.r |
Steeve 14-May-2009 [8744] | even in R3 Carl use the same trick |
Anton 14-May-2009 [8745x4] | Try click on the button at the left and drag to the right. |
I want to see code. (But got to go - I'll check back later.) | |
(My stuff all relates to R2, by the way.) | |
(and not at all to R3) | |
Steeve 14-May-2009 [8749] | Hmm Anton, you can't do like that, you must hack the global event handler with insert-event-function |
Steeve 15-May-2009 [8750x2] | Hmm what you are trying to do anton is tricky, i never did that, i always had the transparent area covering the whole unerlying faces. It was much simple than your use case. |
I don't use VID styles as underlying faces but my owns to discard the default dispatch of events (no feel object). But in your case, you'll have to translate all move events comming from the global handler into OVER, AWAY events depending of the sub-face. Lot of work... | |
Anton 15-May-2009 [8752] | Yes, what I tried was a definitive solution. But after working on it for a very long time, I found it can't be done completely. (At least, I am 99% certain.) |
Maxim 15-May-2009 [8753] | well, it allowed you to build skewed windows, which isn't a small feat within windows :-) |
Anton 15-May-2009 [8754] | Well, yes, but it still wasn't a complete solution. |
amacleod 15-May-2009 [8755x2] | Is there a delay with view when working with internal values? For example if I change the offset of a scroll-panel after showing it it reverts to the changed value but if I put a wait of .1 the offset viewed remains as expected and does not show the new value. Am I making sense? |
the wait is after show but before the offset value is changed... | |
Steeve 15-May-2009 [8757] | the function SHOW, pushes a new show event in the events stack,but is not dispatched until your program enter in a wait loop. So it's normal. |
amacleod 15-May-2009 [8758] | Thanks steeve. I thought I was loosing it..again. |
Steeve 15-May-2009 [8759] | It's the main difference between procedural programming and event-driven programming. When you develop event-driven applications, you must use a different flow in your code |
amacleod 15-May-2009 [8760] | Don't exactly get that but I will keep it mind, thanks. |
Steeve 15-May-2009 [8761] | Eheh, you have no choice, when you are programming a visual interface with Rebol, it's an event-driven flow |
Anton 16-May-2009 [8762x2] | amacleod, doesn't make sense to me. Are we talking about R2? |
Which scroll-panel are you using ? | |
Maxim 16-May-2009 [8764x2] | anyone interested in an SCP based file copy software? this uses SSH port, so no need for ftp on the server :-) I've already got file browsing working. |
this is view based client. | |
older newer | first last |