[linux-audio-dev] ladspa xml gui

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] ladspa xml gui
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Wed Dec 06 2000 - 16:24:54 EET


>agreed, and i realize that my first proposal was terribly simple. (just to
>say that there was Qt terms, where you have vbox, hbox and grid. I assume
>only Grid/table is really needed. HBOX and VBOX is just syntactic sugar ,
>thus irrelevant here.

well, when I did the first pass with hbox/vbox, it seemed to me that
one could just condense this to:

    <box orientation="vertical">
    <box orientation="horizontal">

but when i tried writing some example GUI specs, this seemed way to
wordy. yes, hbox and vbox are syntactic sugar, but based on how i use
GTK's hbox/vbox/table elements, the frequency with which one would use
the box elements suggests to that the sugar is worth it. i agree that
from a theoretical point of view, we could do without it, but i think
it will make things a lot nicer if we keep vbox and hbox.

as for the grid, we have now:

----------------------------------------------------------------------

<!-- a grid is a 2-dimensional array, with coordinates
     that begin at 0 and extend to row-1 in the horizontal
     direction and column-1 in the vertical direction.

     a grid element may be attached to the grid, and can cover any
     rectangular portion of the grid.

     the vertically-homogenous attribute specifies whether or not all
     elements will be packed together with space padding that gives
     them all the same height. this only has an effect if the elements
     pad and or expand options are set to true.
     
     the horizontal-homogenous attribute is analogous to the
     vertically-homogenous attribute, but operates
     horizontally.

     the spacing between each (possibly space-padded) element is
     controlled by the vertical-spacing and
     horizontal-spacing attributes, which have units of pixels.

     the border-width attribute specifies in pixels the space that
     will surround the aggregated elements.
 -->

<!ELEMENT grid (grid-element+)>
<!ATTLIST grid
        rows CDATA #REQUIRED
        columns CDATA #REQUIRED
        vertically-homogenous (true|false) "true"
        horizontally-homogenous (true|false) "true"
        vertical-spacing CDATA #IMPLIED
        horizontal-spacing CDATA #IMPLIED
        border-width CDATA #IMPLIED
>

<!-- a grid-element can be attached to a grid. the attachment points
     are specified by two coordindates, given as the *-row, *-col
     attributes. these coordindates are zero-based, as indicated
     in the description of the grid element itself.

     the other attributes operate as for a box-element, except
     that because of the 2D nature of a grid, both vertical
     and horizontal attributes are possible.
-->

<!ELEMENT grid-element (widget)>
<!ATTLIST grid-element
        upper-left-row CDATA #REQUIRED
        upper-left-col CDATA #REQUIRED
        lower-right-row CDATA #REQUIRED
        lower-right-col CDATA #REQUIRED
        vertical-padding CDATA #IMPLIED
        horizontal-padding CDATA #IMPLIED
        vertical-pad (true|false) "true"
        vertical-expand (true|false) "true"
        horizontal-pad (true|false) "true"
        horizontal-expand (true|false) "true"
>

----------------------------------------------------------------------

This more or less covers your suggestions, except that we could adopt
the perhaps-easier-to-use:

<!ELEMENT grid-element (widget)>
<!ATTLIST grid-element
        upper-left-row CDATA #REQUIRED
        upper-left-col CDATA #REQUIRED
        nrows CDATA #IMPLIED <!-- default is 1 -->
        ncols CDATA #IMPLIED <!-- default is 1 -->
        vertical-padding CDATA #IMPLIED
        horizontal-padding CDATA #IMPLIED
        vertical-pad (true|false) "true"
        vertical-expand (true|false) "true"
        horizontal-pad (true|false) "true"
        horizontal-expand (true|false) "true"
>

>row/column indexes are relative to each other

i don't like this. it means that you can't easily reorder the widget
list.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Dec 06 2000 - 17:22:04 EET