|  | HTML |  |
|  | Splash! |  |
|  | PostScript |  |
| Template Toolkit Examples: Splash! Library: Buttons |

| icon
|  | button |  |
bar |
# Buttons The splash/button template provides one of the fundamental components of the Splash! library - a coloured box with rounded corners. It can be used as a menu button, title bar, panel frame, and so on.
Source #1:
    [% INCLUDE splash/button
        content="Hello World"
    %]
| Output #1:
| Hello World |
Source #2:
    [% WRAPPER splash/button
        style=splash.style.select -%]
    Hello World
    [%- END %]
| Output #2:
| Hello World |
Source #3:
    [% WRAPPER splash/button
        col   = 'grey75'
        align = 'right'
        width = '50%'
    -%]
    Hello World
    [%- END %]
| Output #3:
| Hello World |
Source #4:
    [% col   = 'grey75'
       bgcol = 'grey50'
    %]

    <table border=0 cellpadding=8
           bgcolor="[% splash.rgb.$bgcol %]">
    <tr>
      <td>
        [% INCLUDE splash/button content="Hello World" %]
      </td>
    </tr>
    </table>
| Output #4:
| Hello World |
Source #5:
    [% WRAPPER splash/button + splash/text
         style = splash.style.select
         link  = 'http://www.tt2.org/'
    -%]
    Hello World
    [% END %]
| Output #5:
| Hello World |
Source #6:
    [% WRAPPER splash/button
    	   style = splash.style.select;
    %]

    [% WRAPPER splash/text
               style = splash.style.select
    	   size  = '+1'
    -%]
    Hello World
    [% END %]

    [% WRAPPER splash/button + splash/text
    	   style = splash.style.default
    	   bgcol = splash.style.select.col.fore
    	   bold  = 1
    -%]
    Choosing a Language for your Project
    [% END %]

    [% END %]
| Output #6:
| Hello World
| Choosing a Language for your Project |
Source #7:
    [% WRAPPER splash/button + splash/text
               width = '70%'
    	   style = splash.style.select
    %]
    The Poetry of the Language
    [% END %]

    [% WRAPPER splash/button
    	   width = "70%"
               align = 'left'
    %]
    Finally, a note of caution.  This language, like
    English, can be a medium for prose, or a medium
    for poetry.  The difference between prose and
    poetry is not that different languages are used,
    but that the same language is used, differently.
    [% END %]
| Output #7:
| The Poetry of the Language |
| Finally, a note of caution. This language, like English, can be a medium for prose, or a medium for poetry. The difference between prose and poetry is not that different languages are used, but that the same language is used, differently. |