Damon Chaplin wrote: > On Sat, 2006-04-22 at 19:10 -0500, Juan Carlos Orozco wrote: > >> Hello all, >> >> I developed an application for process visualization or Human Machine >> Interface called hmi_gtk2 that is part of the MatPLC open source project >> (http://mat.sf.net). This application uses glade as the visual interface >> builder. >> >> One common way that this interfaces are built is by placing an image >> representing a diagram of the machine or a drawing of the machine as a >> background and place the widgets using fixed positions over it. Glade >> does have fixed position placing for the widgets but I can not define a >> background image. Is there a way to do this? >> >> I can add an Image widget and place it as background but is easy to >> select it while building the interface and this hides the other widgets. >> An easy way to achieve this would be if I could have an option to >> disable the Image widget so that it will appear as background but it >> will not get selected while building the visual interface. Other way of >> doing this is having options like send to back for the widgets common >> in drawing applications. I know this is not a drawing application but it >> seems to be so close to achieving what my application needs. >> > > I think if you use a GtkLayout widget instead of a GtkFixed widget it > won't raise the children when you click on them. Maybe that is enough > for you. > Thanks Damon, that does help. I may be pushing my luck here, but the only problem remaining is that after placing the Image widget that is used as background, one needs to place the other widgets outside the Image area and then drag them into their final position over the background Image area. It is not possible to place the other widgets over the background Image area directly. > Though I'd also take a patch that didn't raise the widgets > automatically, but had "Raise"/"Lower" context menu commands instead. > This sounds like more versatile because in the use case of my application the user would not necessarily need to place the background Image as its first widget.
I can imagine other interesting combinations of images and control widgets that could find this feature (placing widgets over an Image widget) also useful. Think of an audio application that presents itself as a car stereo image with control widgets over it. This is becoming a common way of GUI in modern systems. Of course we also need things like images with transparency for the control widgets like buttons, text entry, etc. This last part may be more related to GTK than Glade. BTW the label widget does have a transparent background and it can be used as a button but without "pressed" feedback or we could use images for the buttons that blend with the background, this is just more work but it looks the same. Regards, Juan Carlos Orozco ACElab Automation http://www.acelab.com _______________________________________________ Glade-devel maillist - [email protected] http://lists.ximian.com/mailman/listinfo/glade-devel
