[linux-audio-dev] proposed initial DTD for LADSPA-gui-xml

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

Subject: [linux-audio-dev] proposed initial DTD for LADSPA-gui-xml
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Sat Nov 25 2000 - 21:17:37 EET


Below is my first pass at an XML DTD for a LADSPA plugin
toolkit-neutral GUI specification. After it is a small example of what
a plugin GUI specification might look like.

The spec is based on the stuff I did with Quasimodo, stripped down,
and with "parameters" replaced by "ports".

The DTD allows for the use of custom pixmap sets for visual
controllers, state indicators and value displays, but also has
defaults for all those things. You can also control the overall
appearance of the "window" in which the GUI appears.

Please let me have questions, comments, suggestions. I have a backend
that is about 80% complete (taken from Quasimodo). It presents a
single function call: you hand it the XML specification as a file or a
buffer, and it gives you have a Gtk::Fixed widget (i.e. Gtk--) with
the GUI constructed from the specification.

To answer the obvious question "why Gtk-- and not GTK+ ?": there is no
support in GTK+ for the widgets needed for the visual appearance that
i consider appropriate, and until someone writes them, i'll stick to
code that i know works. But please note: that has *nothing* to do with
the DTD. Somebody else could implement the same backend with GTK+, Qt,
Motif or Python-whatever if they wanted to.

And no, I don't have any idea right now what "height" should do ... :)

--p

--- ladspa-gui.dtd --------------

<!ELEMENT interface
    (label,
          (connector |
           controller |
           pushbutton |
         multiway |
         value_display
         )*
     )>
<!ATTLIST interface
        height CDATA "2"
>

<!ELEMENT graphics_context EMPTY>
<!ATTLIST graphics_context
        foreground CDATA #IMPLIED
        background CDATA #IMPLIED
        bg_pixmap CDATA #IMPLIED
        font CDATA #IMPLIED
>

<!ELEMENT label (graphics_context? #PCDATA)>
<!ATTLIST label
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
>

<!ELEMENT controller (graphics_context?)>
<!ATTLIST controller
        port CDATA #REQUIRED
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        type (knob | hslider | vslider | spinner | image) "knob"
        images CDATA #IMPLIED
>

<!ELEMENT state EMPTY>
<!ATTLIST state
        value CDATA "0"
        text CDATA #IMPLIED
        image CDATA #IMPLIED
>

<!ELEMENT pushbutton (state+)>
<!ATTLIST pushbutton
        port CDATA #REQUIRED
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        trigger CDATA #FIXED "restart"
>

<!ELEMENT multiway (state+)>
<!ATTLIST multiway
        port CDATA #REQUIRED
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        trigger CDATA #FIXED "restart"
>

<!ELEMENT connector EMPTY>
<!ATTLIST connector
        port CDATA #REQUIRED
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        trigger (true | false) "false"
        direction (input | output) "input"
>

<!ELEMENT value_display EMPTY>
<!ATTLIST value_display
        port CDATA #REQUIRED
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        style (hmeter | vmeter | custom) "vmeter"
        images CDATA #IMPLIED
>

----- example.xml ---------

<interface height="2">

<label xpos="2.0" ypos="5.0">FreeVerb</label>

<controller
        port="0"
        xpos="15.0"
        ypos="2.0"
        type="knob"
        label="Room Size"
        label_position="top"
>
   <graphics_context bg_pixmap="foo"/>
</controller>

<pushbutton
        port="1"
        xpos="70.0"
        ypos="5.0"
        label="Freeze Mode"
        label_position="top"
>
     <state value="0" text="off"/>
     <state value="1" image="on-pixmap.xpm"/>
</pushbutton>

<value_display
        port="3"
        xpos="85.0"
        ypos="13.2"
        label="Label"
        label_position="top"
/>

<connector
        port="4"
        xpos="62.3"
        ypos="14"
        label="wet\nout"
        direction="output"
/>

</interface>


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

This archive was generated by hypermail 2b28 : Sat Nov 25 2000 - 22:06:09 EET