[Glade-devel] Scalable GtkImage for an HMI builder.



On Thu, 2004-02-19 at 02:04, Juan Carlos Orozco wrote:
Hello,

I implemented a HMI (Human Machine Interface) for the MatPLC project
http://mat.sf.net (an OSS project) that uses Glade as its graphical
builder. It is actually the official HMI editor for this project. There
is a type of HMI where one draws a representation of the machine and
then places widgets to view or control parts of the machine. There is a
library of standard parts of a machine like pipes, valves, etc. Using
the "Fixed Positions" type of layout one should be able to draw the
machine from the library images, the problem is that there is no way of
scaling the images. How difficult would it be to add a scaled toggle to
the Properties dialog of the GtkImage and to have the image scaled to
the whole widget size. When the widget gets rescaled the image will
reflect this.

Maybe this screenshots of an application built using glade and executed
using hmi_gtk and MatPLC can help visualize what is this all about.
http://www.ace-lab.com/jorozco/

We are upgrading the HMI_GTK module to glade2. In the glade1 version we
used GnomePixmap to do this. It did not scale to the widget size but
instead used two parameters "scaled width" and "scaled height". This is
not very practical but it worked, also this is deprecated widget and
when we use libglade-convert this widget gets converted to a GtkImage.
So we would prefer to use GtkImage if only we could scale the images and
see a feedback of it.

GtkImage doesn't support scaling the image, so we can't really support
it in Glade.

I think you'll have to use a custom widget to do this. (You could use
some of the old GnomePixmap code.)


BTW, I am also interested in custom widgets with visual feedback, this
is that one can see the custom widget in the design window in its real
form. I am thinking something similar to the way a graphical java bean
is represented in a IDE tool. Is something like this planned in the new
Glade3 development? Bonobo components perhaps? I know there is a custom
widget in Glade2 but it gets drawed as a plain square. I am pushing my
luck here, but it would be great if this custom widgets could be placed
in a palette.

It is planned in Glade3. Bonobo components are partially supported in
Glade2, though I'm not sure how well they work.

Damon






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]