Help - Search - Members - Calendar
Full Version: Idea for a PanelsUI-Replacement using XML for the design
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
beetFreeQ
Hi there!

First I want to apologize for my somewhat bad english, especially when writing about technical stuff like this. As I'm german, I hope, my English is good enough to give you an idea of what I have in mind.

While PanelsUI isn't working in the latest foobar versions any more, many people would love to see a new component to take it's place and add some nice skinning support to foobar again. Well, there's that Japanese guy with his Panel Stack Splitter, but I think that component goes in the same wrong direction as PanelsUI did with using title formatting for designing the skins. Also it's not that advanced yet and I never heard anything if there will be better versions in the future.

As far as I know, there's no other component, that allows to skin foobar the way PanelsUI did. Because of that, I tried to work out a little concept, how such a component could work using something else than title formatting. Unfortunately I have no experience in programming with C++ (I'm just starting some C#), so I decided to share this idea whit you in the hope to find someone with the knowledge and time, who would like to code that component.

The idea is as follows:

The component should be an extension of ColumnsUI and can use it's panels. To design a skin with it, a special XML syntax could be used. It should be possible to do all the positioning of panels, text formatting, drawing rectangles, images etc with it. Also it should have buttons, some variables, that will be safed when foobar is closed and the possibility to have if-else constructs and also per-track and per-second settings. It should also have an own seek bar and volume bar panel to add.

The syntax could look something like this:

CODE

<theme name='testtheme' version='1.1' url='http:\\test'>
  <var name='showpanel1' type=boolean default='true'/>
  <var name='fullscreenmode' type=boolean default='false'/>

  <stdpanel
    name='test'
    width='%width%-10'
    height='%height%-10'
    color='#ffffff00'
    border='ffffff00'>

    <if condition='@showpanel1@'>
      <cuipanel
        type='elplaylist'
        name='playlist'
        width='500'
        height='300' />                
      <else>
      </else>
    </if>

    <pertrack>
      <text
        value='%artist%'
        showempty=true
        font-face='Arial'
        font-size='12'
        font-bold=true
        font-italics=true
        font-smallcaps=true
        color='#aaaaaaaa'
        x=100
        y=100
        width=200
        height=11 />

      <font
        face='Arial'
        size='12'
        bold=true
        italics=true
        smallcaps=true
        color='#aabbccdd'>
            
        <text value='%title%' width=200 height=10 />
                
      </font>

      <image src='%image%' width= height=100 x=10 y=10 opacity=100 behaviour='cutout center center' />

      <rectangle width=200 height=50 x=1 y=1 bgcolor='#00000000' gradcolor='#ffffffff' bordercolor='#00000000' border=2 gradtype='linear' />
        
      <button action='playlist:play'>
        <normalstate>
          <image> <text> etc.
        </normalstate>
        <hoverstate></hoverstate>
      </button>
        
      <bar type='volume / seek' imgleft='' imgcenter='' imgright='' imgselector='' width=200 height=10 x=11 y=11 />
        
    </pertrack>
        
    <persecond>
    </persecond>
        
  </stdpanel>
</theme>


This is just a very simple and not very useful example, but I think it will demonstrate, what I have in mind. If somebody is interested to develop such a component, I would love to contribute to it and define the complete XML syntax and also XSD validation.

I think, using XML it's possible to give the user a simple and effective way to skin foobar and should be simple to parse with C++ and draw everything on the screen.

Well, that should be all at the moment. What do you think? Would you like to see a component like that for foobar? Could anybody imaging to develop it? Would be great to hear some comments from you!
Keikonium
Yes, I had a similar idea back when Panels UI started getting the foobar devs upset in the way it was using TF. I don't really know XML, so I couldn't explain my idea like you have done here.

I think using XML is a great idea since it looks like HTML, and the learning curve for HTML isn't that hard. XML looks even easier because it looks almost like basic English with a bunch of < and > tossed in.

So yeah I think this would be a great way to construct a layout, and if someone made a component like this, that would be amazing.
PhenX
I think this is a great idea for a component, but unfortunately I have no experience in C++ and programming in general either, so I can't help.. but I definitely would give it a try to create a nice skin with it ;-)

In a next step, a similar XML design for a playlist view would be nice. Currently I'm using SCPL and am quite content with it while ELplaylist ist way too slow for me when displaying > 10000 songs. But unfortunately SCPL seems not to be developed any more, so an alternative would be nice.
TomBarlow
Sounds like a great idea to me. What about using XUL, the user interface language firefox uses? (It stands for XML User interface Language- or Extensible Markup Language User Interface Language!) I think it's open source so it might be usable.
Nickoladze
If there were any complete C# wrappers for foobar, I would have started on an interface like this a long time ago. Unfortunately, there's only 2 wrapper I know of and they're not all that great. Since I don't ever plan on learning C++, there's nothing I can do.
Zao
Eew, XML. That's about as human-readable as titleformatting script.
It could be feasible if you had a good editor to generate and manipulate it, but that's a rather major undertaking.

If I were to pick a language to serialize my themes into I would pick either YAML or inventing my own small DSL.
DarkBlackCorner
ooo, that's MUCH easier to understand than titleformatting. Hope someone gives this a try.

I'm still on good ol' panelsUI smile.gif
ojdo
I like the idea of a "cleaner" approach for a visual markup, too. But I think instead of a columns ui panel, a standard ui element with functionality similar to foo_uie_trackinfo_mod offered for displaying text and images would be great. The new default user interface is useful enough for most users I think, so an additional "eye candy view" would offer enough customisability without sacrificing all the usability from the very good default UI.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.