demos\covergirls\application.sdf
  1 Application {
  2   name: "covergirls"
  3   lookAndFeelPropertiesURL:<<
  4     Sage.unifiedMacTitleBar=Boolean|true
  5   >>[inline=true]
  6   resourceIconsURL:<< 
  7     icon_checkbox=lib:images/checkbox.png
  8     icon_checkbox_checked=lib:images/checkbox_checked.png
  9     icon_playing=lib:images/playing.png
 10     icon_window_controls_norm=lib:images/window_controls.png
 11     icon_window_controls_min=lib:images/window_controls_min.png
 12     icon_window_controls_max=lib:images/window_controls_max.png
 13     icon_window_controls_close=lib:images/window_controls_close.png
 14     icon_window_controls_max_norm=lib:images/window_controls_max_norm.png
 15     icon_window_controls_max_min=lib:images/window_controls_max_min.png
 16     icon_window_controls_max_max=lib:images/window_controls_max_max.png
 17     icon_window_controls_max_close=lib:images/window_controls_max_close.png
 18     icon_window_controls_mac=lib:images/window_controls_mac.png
 19     icon_window_controls_mac_hover=lib:images/window_controls_mac_hover.png
 20     icon_missing_artwork=lib:images/missing.jpg
 21     icon_play=lib:images/play.png
 22     icon_play_pressed=lib:images/play_pressed.png
 23     icon_pause=lib:images/pause.png
 24     icon_pause_pressed=lib:images/pause_pressed.png
 25     icon_create_playlist=lib:images/create_playlist.png
 26     icon_shuffle_off=lib:images/shuffle_off.png
 27     icon_shuffle_on=lib:images/shuffle_on.png
 28     icon_repeat_off=lib:images/repeat_off.png
 29     icon_repeat_on=lib:images/repeat_on.png
 30     icon_show_artwork=lib:images/show_artwork.png
 31     icon_hide_artwork=lib:images/hide_artwork.png
 32     icon_play_album=lib:images/icon_play_album.png
 33   
 34 >> [ inline="true" ]
 35 
 36   /**
 37    * Specify supplemental jars that will be downloaded at runtime.
 38    * The only jar is the one that contains this application’s icons
 39    */
 40   supplementalJars {
 41     "../jars/covergirls-images.jar"
 42   }
 43 
 44 
 45   /**
 46    * A custom painter for list type selections
 47    */
 48   selectionPainter {
 49     bgColor: "textHighlight@50,textHighlight"
 50     borders {
 51       matte [ color="controlShadow", insets="1,0,1,0" ]
 52     }
 53   } [ foreground="textText" ]
 54   /**
 55    * A custom painter for list type selections
 56    * when the widget looses focus
 57    */
 58   lostFocusSelectionPainter {
 59     bgColor: "white@50,controlShadow@50"
 60     borders {
 61       matte [ color="controlShadow", insets="1,0,1,0" ]
 62     }
 63   } [ foreground="textText" ]
 64 
 65   /**
 66    * A custom painter for tooltips
 67    */
 68   tooltipPainter {
 69     bgColor: "white,#aaaaaa"
 70     borders {
 71       line [ color="darkGray", cornerArc="8" ]
 72     }
 73   } [ foreground="textText" ]
 74   mainWindow {
 75     title: "sTunes"
 76     icon: "lib:images/stunes16.png,lib:images/stunes24.png"
 77     scriptURL: "covergirls.js"
 78     bounds {
 79       width: "600dlu"
 80       height: "-200"
 81     }
 82     decorated: false
 83     windowPainter {
 84       borders {
 85         line [ thickness=2, cornerArc="4", color="controlShadow",padForArc=false]
 86       }
 87     }
 88     viewer {
 89       GridPane {
 90         borders {
 91           none
 92         }
 93         rows: 3
 94         rowSpacing: 0
 95         regions {
 96           {
 97             x: "0"
 98             y: "0"
 99             name: "header"
100             horizontalFill: maximum
101             verticalFill: preferred
102             dataURL: "header.sdf"
103           }
104           {
105             x: "0"
106             y: "1"
107             horizontalFill: maximum
108             verticalFill: maximum
109             viewer {
110               SplitPane {
111                 bgColor: "black"
112                 splitOrientation: left_to_right
113                 showGripper: false
114                 dividerSize: 1
115                 splitProportions {
116                   .23
117                 }
118                 regions {
119                   {
120                     dataURL: "navigator.sdf"
121                   }
122                   {
123                     dataURL: "views.sdf"
124                   }
125                 }
126               }
127             }
128           }
129           {
130             x: "0"
131             y: "2"
132             name: "footer"
133             verticalFill: preferred
134             viewer {
135               Form {
136                 borders {
137                   matte [ color="darkGray", insets="1,0,0,0" ]
138                 }
139                 layout: forms
140                 rows: "2px,d,2px"
141                 columns: "d,d,d,d,d,d,d:g,d,d,d,2dlu,d,2dlu"
142                 cellPainters{}
143                 widgets {
144                   {
145                     Label {
146                       name: "statusLabel"
147                       bounds {
148                         x: "6"
149                         y: "1"
150                         width: "-1"
151                       }
152                       value: " "
153                     }
154                   }
155                   {
156                     PushButton {
157                       bounds {
158                         x: "9"
159                         y: "1"
160                       }
161                       enabled: false
162                       tooltip: "Create a CD from this play list."
163                       value: "Burn Disc"
164                     }
165                   }
166                   {
167                     Navigator {
168                       bgColor: "#fcfcfc, #b1b1b1"
169                       bounds {
170                         x: "1"
171                         y: "1"
172                       }
173                       type: option
174                       actions {
175                         {
176                           tooltip: "Create a playlist."
177                           icon: "resource:icon_create_playlist"
178                         }
179                         {
180                           tooltip: "Turn shuffle on or off"
181                           icon: "resource:icon_shuffle_off"
182                           selectedIcon: "resource:icon_shuffle_on"
183                         }
184                         {
185                           tooltip: "Play playlist once, repeat playlist, or repeat item."
186                           icon: "resource:icon_repeat_off"
187                           selectedIcon: "resource:icon_repeat_on"
188                         }
189                         {
190                           tooltip: "Show or hide item artwork and video viewer."
191                           icon: "resource:icon_show_artwork"
192                           selectedIcon: "resource:icon_hide_artwork"
193                         }
194                       }
195                     }
196                   }
197                   {
198                     WidgetPane {
199                       rowSpan: 1
200                       bounds {
201                         x: "11"
202                         y: "1"
203                         width: "20"
204                         height: "32"
205                       }
206                     } [ onConfigure="makeResizeCorner()" ]
207                   }
208                 }
209               } [ onConfigure="if(!sage.isUnix()) {window.addWindowDragger(widget.dataComponent)}" ]
210             }
211           }
212         }
213       }
214     }
215   }[onCreated="window_onCreated()",onConfigure="window_onConfigure()",manager="simple"]
216 }
217 
218