Re: [Plib-users] Floating Group with Frame
Brought to you by:
sjbaker
From: Sebastian U. <ud...@ha...> - 2002-01-20 11:24:17
|
On Sat, 19 Jan 2002, da...@mi... (dave) wrote: > Date: Sat, 19 Jan 2002 18:05:58 -0600 > To: plib-users <pli...@li...> > From: da...@mi... (dave) > Subject: [Plib-users] Floating Group with Frame > > Q1. > I was able to make a nice translucent group by creating a class that > inherits from puGroup. I set the floating flag, and was able to drag the > group around. In order to be able to see the group's abox I added a > Frame as the first widget and made it the same size as the group. This > is great, now I don't have to hunt and peck to find the group to do a > click. But, alas, with the new frame now I am unable to grab the group > to drag it. I had a discussion on this issue with John recently. The "floating" stuff has not been used for years and definately does not work correctly in some situations. However, since nobody seems to need it at the moment, nobody has fixed it :). > I suspect the Frame gets the hit before the group does, ie, the group is > behind the Frame. What do I do to get the hit passed on to the Group? No. Let's assume that group you created is not stacked in another group created by you, that's what happens: - Hit goes to the PUI live interface group - PUI live interface group passes the hit to your group - Your group passes the hit to the widget(s) Is your problem that the frame gets in front of the other widgets when you click upon the group ? If yes, than that's because of that puMoveToLast () stuff. We had long discussions about this issue, too. In the end, we realized that we need to do it for certain reasons, even if it can be nerve-killing in some situations. > Q2. Maybe I am going about this wrong. Maybe it would be better to give > the group itself a simple outside border without using a Frame but leave > the middle transparent? Hmmm. But isnt a Frame the way to do this > anyway? Then the same problem would occur. The group's abox is not drawn - but nobody prevents you from drawing it. Derive your own "draw" routine and have it look like this: void myGroup::draw ( int dx, dy ) { abox.draw ( dx, dy, style, colour, FALSE, border_thickness ) ; puGroup::draw ( dx, dy ) ; } This way the frame will always be behind tehe widgets. > Q3. What I really want to do is have the Group or Frame look like a > clear sheet of glass. Mostly only the edge of the sheet would be > visible. Maybe a striated reflection would delineate the surface of the > sheet much like a real glass sheet is detectable. I assume all this is > possible? If you see the movie Mission To Mars all the computer > terminals in the ship are essentially sheets of glass - thats the idea > here. Any tips on how to do this? As Steve said, that's impossible to do with PUI's styles. Derive your own draw routine and place some OpenGL code there. - Sebastian |