World: r3wp
[View] discuss view related issues
older newer | first last |
Henrik 13-May-2009 [8712x2] | I've looked at the solution for a bit, and I don't think it's flexible enough. I would rather leave the event handling system untouched and then in the window-feel specify that we need to do something after the engage. Then there would be another event handler, which handles events generated by the original 'detect. Is it possible to generate events inside the detect, that can be handled by the window-feel after the engage? The problem would otherwise be that the event needs to be handled in every single engage function (dozens). |
Nevermind, maybe it works after all. | |
Maxim 13-May-2009 [8714] | there is no way that I know of to do code after the do events processes it, a part from adding oprations in the wake event. and the detect is the first part of that process, the inset event handlers are part of the detect phase, as I discovered yesterday. |
Henrik 13-May-2009 [8715] | now I need something else: making a face completely event transparent. |
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 |
older newer | first last |