[Glade-users] Abusing Glade? :-)



Hi All,

For those that may have built their own widgets and added them to Glade
I'd like to ask a question.  

I want to use the Glade machinery to allow users to build what I call
constraint definitions against a well defined reference model.  There
will only be about 30 or so widgets and most of them are simply
adaptations of existing widgets.  Containers, trees, lists, text boxes,
etc. but of course all the properties/constraints are different
(actually simpler than in Glade).

So I would like to hide/remove the existing Glade widgets and leave only
my two libraries visible.  Then in the XML I will write the names of the
classes from the reference model as well as modify all the property
settings according to each class as needed.   

So why do this?  Well, it gives me a great starting point for people
without knowledge of a complex system to be able to put components
together in a way that makes sense to them in their domain.  Gives me a
generic XML output that I can use to build classes for a variety of
programming languages that can be executed against this reference model
in each of those languages.

Here is a (non-sensical) modified XML file just showing how I envision
the object (class) names being changed to match the reference model.  I
didn't bother with the property names but you can imaging that they will
be modified extensively as well.

I would appreciate any thoughts/commets/feedback on this approach.

Cheers,
Tim

*****************************************
<?xml version="1.0"?>
<!-- namespace def stuff defined here -->
<condef>
  <requires lib="gtk+" version="2.16"/>
  <!-- interface-naming-policy project-wide -->
  <object class="OBSERVATION" id="Observation1">
    <child>
      <object class="DvTable" id="table1">
        <property name="visible">True</property>
        <property name="n_rows">3</property>
        <property name="n_columns">3</property>
        <child>
          <placeholder/>
        </child>
        <child>
          <placeholder/>
        </child>
        <child>
          <placeholder/>
        </child>
        <child>
          <placeholder/>
        </child>
        <child>
          <placeholder/>
        </child>
        <child>
          <placeholder/>
        </child>
        <child>
          <object class="DvCheckButton" id="checkbutton1">
            <property name="label"
translatable="yes">checkbutton</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">False</property>
            <property name="draw_indicator">True</property>
          </object>
          <packing>
            <property name="left_attach">2</property>
            <property name="right_attach">3</property>
            <property name="top_attach">1</property>
            <property name="bottom_attach">2</property>
          </packing>
        </child>
        <child>
          <object class="DvRadioButton" id="radiobutton1">
            <property name="label"
translatable="yes">radiobutton</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">False</property>
            <property name="active">True</property>
            <property name="draw_indicator">True</property>
          </object>
          <packing>
            <property name="left_attach">2</property>
            <property name="right_attach">3</property>
            <property name="top_attach">2</property>
            <property name="bottom_attach">3</property>
          </packing>
        </child>
        <child>
          <object class="DvText" id="textview1">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
          </object>
          <packing>
            <property name="top_attach">2</property>
            <property name="bottom_attach">3</property>
          </packing>
        </child>
      </object>
    </child>
    <object class="DvList" id="liststore1"/>
    <object class="DvText" id="textbuffer1"/>
  </object>
</condef>
*****************************************




-- 
***************************************************************
Timothy Cook, MSc

LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == (upon request)
Academic.Edu Profile: http://uff.academia.edu/TimothyCook

You may get my Public GPG key from  popular keyservers or    
from this link http://timothywayne.cook.googlepages.com/home 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/glade-users/attachments/20091116/02f9c4eb/attachment.bin 




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