<klip>
   <identity>
      <title>
         API: Tab
      </title>
   </identity>
   <locations>
      <contentsource>
         http://support.klipfolio.com/files/demo/demo.xml
      </contentsource>
      <icon>
         http://www.klipfolio.com/static/klips/klipfolio/sample_icon.png
      </icon>
      <banner>
         http://www.klipfolio.com/static/klips/klipfolio/sample_banner.png   
      </banner>
   </locations>
   <style>
      alert {
         type: item;
      }

      sender {
         itemcol: 2;
         noterow: 1;

         label: 'Sender';

         emphasis: strong;
      }


      summary {
         itemcol: 3;
         noterow: 4;

         wrap: false;

         notelabel: false;
      }

      date {
         itemcol: 4;
         noterow: 2;

         label: 'Date';
      }

      category {
         noterow: 3;

         label: 'Category';
      }


      level {
         itemcol: 1;
         noterow: 5;
         notelabel: false;
         
         type: image;
      }

      url {
         type: link;
      }
            
      id {
         key: override;
      }
   </style>
   <klipscript>
   <![CDATA[

var button;

function onLoad() {

    // Create a new tab
    var tab = Setup.addTab( "New Tab" );

    //
    // tab is a Tab object that points to the first tab
    //
    
    tab.addText( "Welcome to Klipfolio Dashboard.");
    tab.addSpacer( true );				// we reference this with Setup[0][1]
    tab.addText( "Klipfolio Dashboard, the desktop dashboard for business.");
    tab.addSpacer( false );
    button = tab.addButton( "Klipfolio Inc." );
    button.url = "http://www.klipfolio.com/";
    
    trace( "URL for button: " + button.url + "\r\n" );

	// You can reference individual tab by using Setup[] as an array.
	// For example, Setup[0] is first tab and Setup[0][0] is UI component 
	// in the first tab.

    // trace( "What is the URL: " + Setup[0][4].url + "\r\n" );
}

function onRefresh()
{
	return Engines.Data.process( Prefs.contentsource );
}
  
   ]]>
   </klipscript>
</klip>

