| demos\outlook\application.sdf |
1 Application { 2 name: "SageOutlookDemo" 3 lookAndFeel: "default" [style="office2003"] 4 5 /** 6 * Customize some environment-wide UI properties that will be set into the UIManager. 7 * Using an inline URL in-lieu of and external file 8 */ 9 lookAndFeelPropertiesURL:<< 10 defaultBackground=ColorShade|#E8E8E8 11 Sage.control=Color|defaultBackground 12 13 Sage.radiobutton.icon=Icon|lib:images/radiobutton.png 14 Sage.radiobutton.selectedIcon=Icon|lib:images/radiobutton_selected.png 15 Sage.radiobutton.disabledIcon=Icon|lib:images/radiobutton_disabled.png 16 Sage.radiobutton.disabledSelectedIcon=Icon|lib:images/radiobutton_disabled_selected.png 17 Sage.radiobutton.rolloverIcon=Icon|lib:images/radiobutton_rollover.png 18 Sage.radiobutton.rolloverSelectedIcon=Icon|lib:images/radiobutton_rollover_selected.png 19 20 linkColor=Color|textHighlight 21 >> [ inline="true" ] 22 23 /** 24 * Define some application level icons that can 25 * be accessed via window.getIcon(iconName). The 'lib' URL 26 * identifies the icons as residing is some jar in the class path 27 */ 28 resourceIconsURL:<< 29 pim.icon.followup=lib:images/followup.png 30 pim.icon.checkbox=lib:images/checkbox.png 31 pim.icon.mail=lib:images/email.png 32 pim.icon.mail24=lib:images/email24.png 33 pim.icon.deleted=lib:images/mail_deleted.png 34 pim.icon.inbox=lib:images/mail_inbox.png 35 pim.icon.dynamic_folder=lib:images/dynamic_folder.png 36 pim.icon.outbox=lib:images/mail_outbox.png 37 pim.icon.personal=lib:images/mail_personal.png 38 pim.icon.sent=lib:images/mail_sent.png 39 pim.icon.junk=lib:images/mail_junk.png 40 pim.icon.yellowball=lib:images/yellowball.png 41 pim.icon.drafts=lib:images/mail_drafts.png 42 pim.icon.notes=lib:images/notes.png 43 pim.icon.notes24=lib:images/notes24.png 44 pim.icon.contacts=lib:images/contacts.png 45 pim.icon.contacts24=lib:images/contacts24.png 46 pim.icon.tasks=lib:images/tasks.png 47 pim.icon.tasks24=lib:images/tasks24.png 48 pim.icon.calendar=lib:images/calendar.png 49 pim.icon.calendar24=lib:images/calendar24.png 50 pim.icon.reply=lib:images/reply.png 51 pim.icon.replytoall=lib:images/replytoall.png 52 pim.icon.new_mail=lib:images/new_mail.png 53 pim.icon.moveto=lib:images/moveto.png 54 pim.icon.find=lib:images/find.png 55 pim.icon.read=lib:images/read.png 56 pim.icon.unread=lib:images/unread.png 57 pim.icon.forward=lib:images/forward.png 58 pim.icon.help=lib:images/help.png 59 pim.icon.important=lib:images/important.png 60 pim.icon.not_important=lib:images/not_important.png 61 pim.icon.normal=lib:images/normal.png 62 pim.icon.attachment=lib:images/attachment.png 63 pim.icon.send_recieve=lib:images/send_recieve.png 64 pim.icon.create_rule=lib:images/create_rule.png 65 pim.icon.address_book=lib:images/address_book.png 66 pim.icon.calendar_1day=lib:images/calendar_1day.png 67 pim.icon.calendar_5day=lib:images/calendar_5day.png 68 pim.icon.calendar_7day=lib:images/calendar_7day.png 69 pim.icon.calendar_1month=lib:images/calendar_1month.png 70 pim.icon.outlook=lib:images/outlook.png 71 pim.icon.view.actual_size=lib:images/view_actual_size.png 72 pim.icon.view.zoom_out=lib:images/view_zoom_out.png 73 pim.icon.view.zoom_in=lib:images/view_zoom_in.png 74 >> [ inline="true" ] 75 76 /** 77 * Specify supplemental jars that will be downloaded at runtime. 78 * The only jar is the one that contains this applicationÂ’s icons 79 */ 80 supplementalJars { "../jars/outlook-images.jar" } 81 82 /** 83 * Define a set of reusable actions that can be used on menus or buttons 84 * or invoked programmatically 85 */ 86 actionItemsURL:<< Set{ 87 { 88 name: "pim_new_message" 89 value: "Mail Message" 90 icon: "resource:pim.icon.mail" 91 } 92 {name: "pim_new_note"; value: "Note"; icon: "resource:pim.icon.notes" } 93 { 94 name: "pim_new_contact" 95 value: "Contact" 96 icon: "resource:pim.icon.contacts" 97 } 98 {name: "pim_new_task"; value: "Task"; icon: "resource:pim.icon.tasks" } 99 { 100 name: "pim_new_appointment" 101 value: "Appointment" 102 icon: "resource:pim.icon.calendar" 103 } 104 { 105 name: "pim_print" 106 value: "Print" 107 icon: "resource:Sage.icon.print" 108 enabledIfHasValueOnly: "true" 109 } 110 { 111 name: "pim_moveto" 112 value: "Move To Folder" 113 icon: "resource:pim.icon.moveto" 114 enabledIfHasValueOnly: "true" 115 } 116 { 117 name: "pim_delete" 118 value: "Delete" 119 icon: "resource:Sage.icon.delete" 120 enabledIfHasValueOnly: "true" 121 } 122 { 123 name: "pim_find"; value: "F&ind"; 124 icon: "resource:pim.icon.find" 125 } 126 { 127 name: "pim_help" 128 value: "Microsoft Office Outlook Help" 129 icon: "resource:pim.icon.help" 130 } 131 { 132 name: "pim_mail_reply" 133 value: "&Reply" 134 icon: "resource:pim.icon.reply" 135 enabledIfHasValueOnly: "true" 136 } 137 { 138 name: "pim_mail_replytoall" 139 value: "Reply to A&ll" 140 icon: "resource:pim.icon.replytoall" 141 enabledIfHasValueOnly: "true" 142 } 143 { 144 name: "pim_mail_forward" 145 value: "For&ward" 146 icon: "resource:pim.icon.forward" 147 enabledIfHasValueOnly: "true" 148 } 149 { 150 name: "pim_mail_send_recieve" 151 value: "Send/Re&cieve" 152 icon: "resource:pim.icon.send_recieve" 153 } 154 { 155 name: "pim_mail_create_rule" 156 value: "Create Rule" 157 icon: "resource:pim.icon.create_rule" 158 enabledIfHasValueOnly: "true" 159 } 160 { 161 name: "pim_mail_address_book" 162 value: "Address Book" 163 icon: "resource:pim.icon.address_book" 164 } 165 { 166 name: "pim.action.increaseFontSize" 167 value: "Larger Text" 168 icon: "resource:pim.icon.view.zoom_in" 169 shortcutKeystroke: "ctrl PLUS" 170 }[onAction="increaseFontSize()"] 171 { 172 name: "pim.action.decreaseFontSize" 173 value: "Smaller Text" 174 icon: "resource:pim.icon.view.zoom_out" 175 shortcutKeystroke: "ctrl MINUS" 176 }[onAction="decreaseFontSize()"] 177 { 178 name: "pim.action.resetFontSize" 179 value: "Normal Text Size" 180 shortcutKeystroke: "ctrl 0" 181 icon: "resource:Sage.icon.empty" 182 }[onAction="resetFontSize()"] 183 } 184 >> [inline=true] 185 186 /** 187 * A custom painter for list type selections 188 */ 189 selectionPainter { 190 bgColor: "white@50,textHighlight@50" 191 borders { 192 "line" [ color="textHighlight"] 193 } 194 } [ foreground="textText" ] 195 196 /** 197 * A custom painter for list type selections 198 * when the widget looses focus 199 */ 200 lostFocusSelectionPainter { 201 bgColor: "white@50,gray@50" 202 borders { 203 "line" [ color="gray"] 204 } 205 } [ foreground="textText" ] 206 207 /** 208 * A custom painter for tooltips 209 */ 210 tooltipPainter { 211 bgColor: "white,#cccccc" 212 borders { 213 "line" [ color="gray", cornerArc="4" ] 214 "empty" [ insets="2,2,2,2" ] 215 } 216 } [ foreground="textText" ] 217 treeNodeLineType: "none" 218 scaleIconsWithFont: true [scaling="bicubic_cached"] 219 /** 220 * Define the main window for the application 221 */ 222 mainWindow { 223 templateURL: "template.sdf" [ cache="true" ] //application level template to use to under-skin widgets 224 font { size: 13 } 225 bounds { width: "500dlu"; height: "550dlu" } 226 viewer{}[url="content.sdf"] //define a viewer using the url attribute to specify the location of the viewer's definition 227 scriptURL: "pim.js" 228 title: "Sage - Microsoft Outlook Demo" 229 menuBar { title: "Outlook"; dataURL: "menu.sdf" } 230 frames { 231 { 232 location: "west" 233 bounds { width: "110dlu" } 234 dataURL:"navigator.sdf" 235 titleCell { 236 bgColor: "controlShadow,controlShadow-15" 237 } [foreground="white"] 238 name: "navigator" 239 //set info for mail so the title and icon are initially populated 240 title: "Mail" 241 icon: "resource:pim.icon.mail24" 242 titleFont { size: "+3"; style: bold} 243 hideable:false 244 rearrangeable: false 245 } 246 } 247 frameStyle { 248 resizingAllowed: "true" 249 rearrangingAllowed: "false" 250 undockingAllowed: "false" 251 } 252 icon: "resource:pim.icon.outlook" 253 /** 254 * Define a tray icon that will be placed in the desktop's system tray 255 * The icon will support a popup menu and a double-click action 256 */ 257 trayIcon { 258 icon: "resource:pim.icon.outlook" 259 tooltip: "Sage - Microsoft Outlook Demo" 260 popupMenu { 261 { 262 value: "Open Sage - Outlook Demo" 263 } [ onAction="trayIconAction()" ] 264 { 265 value: "Hide when minimized" 266 checkbox: "true" 267 } [ onAction="hideWhenMinized=window.nativeEvent.source.isSelected()" ] 268 {} 269 {name: "Sage.action.exit" } 270 } 271 } [ onAction="trayIconAction()" ] 272 statusBar { 273 } [onConfigure="if(sage.isMac()){widget.addAsWindowDragger(window)}"] 274 275 keystrokeMappings: << 276 ctrl ADD=action:pim.action.increaseFontSize, 277 ctrl EQUALS=action:pim.action.increaseFontSize, 278 ctrl SUBTRACT=action:pim.action.decreaseFontSize, 279 ctrl NUMPAD0=action:pim.action.resetFontSize 280 >> [allWindows="true"] 281 } [ onHasCollapsed="windowMinimized()",onFocus="mainWindow_onFocus()",onBlur="mainWindow_onBlur()",onCreated="if(window.appContext.isApplet()){ window.nativeEvent.data.font.size.value=11}" ] 282 } 283 284