Re: Bonobo UI XML



Archit Baweja wrote:
> 
> Hi
> 
> Here is a small example.
> 
> <Root>
>         <commands>
>                 <cmd name="FileExit" _label="E_xit" _tip="Exit the program" pixtype="stock" pixname="Quit" accel="*Control*q"/>
>                 <cmd name="Preferences" _label="_Preferences" _tip="Change preferences" pixtype="stock" pixname="Preferences"/>
>                 <cmd name="HelpAbout" _label="_About..." _tip="About this application"  pixtype="stock" pixname="About"/>
>         </commands>
> 
>         <menu>
>                 <submenu name="Game" _label="_Game">
>                          <placeholder/>
>                          <separator/>
>                          <menuitem name="FileExit" verb=""/>
>                 </submenu>
> 
>                 <submenu name="Settings" _label="_Settings">
>                          <placeholder/>
>                          <separator/>
>                          <menuitem name="Preferences" verb=""/>
>                 </submenu>
> 
>                 <submenu name="Help" _label="_Help">
>                          <menuitem name="HelpAbout" verb=""/>
>                 </submenu>
>         </menu>
> 
>         <dockitem name="Toolbar" relief="none" homogeneous="1" behavior="exclusive">
>                   <placeholder/>
>         </dockitem>
> </Root>
> 
> A simple explanation. Think of the Model/View concept. The <cmd> tags are like
> models. They hold the basic info for commands. If the "name" field of the
> menuitems is same as "name" field of a <cmd> tags, it becomes like a "view" of
> it. So you can have a toolbar icon for Open and a menuitem for Open. but
> since they call the same callback, there <cmd> tag will be same.
> 
> It maybe a lame way to explain things, but thats the best way I could put
> forward in a simple way. Read the ui-xml.txt files in bonobo/doc.

Thanks, that's very helpful.

Murray Cumming
www.murrayc.com
murrayc usa net




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