Difference between revisions of "IBookAuthor: A Skeleton Widget"

From dftwiki3
Jump to: navigation, search
(PNG Files)
(PNG Files)
 
(9 intermediate revisions by the same user not shown)
Line 19: Line 19:
 
=Files=
 
=Files=
  
==PNG Files==
+
* main.html
* Default.png<br />[[Image:iBookWidget_Default.png|frame|150px|right]]
 
<br />
 
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 
  
* Default@2x.png<br />[[Image:iBookWidget_Default2x.png|frame|150px|right]]
 
 
<br />
 
<br />
<br /><br /><br /><br /><br /><br /><br /><br /><br />
+
The widget will simply display "Hello World" when clicked on inside the iBook.
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 
<br />
 
* main.html
 
 
<br />
 
<br />
 
<code><pre>
 
<code><pre>
Line 36: Line 29:
 
<head>
 
<head>
 
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
 
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="main.css">
 
 
</head>
 
</head>
 
<body>
 
<body>
Line 79: Line 71:
 
</pre></code>
 
</pre></code>
 
<br />
 
<br />
 +
==PNG Files==
 +
* Default.png<br />[[Image:iBookWidget_Default.png|frame|150px|right]]
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
 +
* Default@2x.png: this is the double resolution version of Default.png for Retina display iPads:<br />[[Image:iBookWidget_Default2x.png|frame|right|150px]]
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br /><br /><br /><br /><br /><br /><br /><br /><br />
 +
<br />
 +
[[Category:iBook Author]][[Category:iBook Widgets]][[Category:IBook Widget]]

Latest revision as of 10:34, 28 January 2013

--D. Thiebaut 13:38, 27 January 2013 (EST)


Reference

The main reference for creating Dashboard widgets is Apple's own page on the subject, titled About HTML Widget Creation. This page, in some ways, is the true definition of a skeleton widget.

Hierarchy

skeleton.wdgt
skeleton.wdgt/Default.png
skeleton.wdgt/Default@2x.png
skeleton.wdgt/Info.plist
skeleton.wdgt/main.html

Files

  • main.html


The widget will simply display "Hello World" when clicked on inside the iBook.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<center> <h1>Hello World!</h1></center>
</body>
</html>


  • Info.plist


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleDisplayName</key>
	<string>skeleton2</string>
	<key>CFBundleIdentifier</key>
	<string>com.thiebaut.widget.Untitled</string>
	<key>CFBundleName</key>
	<string>skeleton2</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>CloseBoxInsetX</key>
	<integer>15</integer>
	<key>CloseBoxInsetY</key>
	<integer>15</integer>
	<key>Height</key>
	<integer>380</integer>
	<key>MainHTML</key>
	<string>main.html</string>
	<key>Width</key>
	<integer>280</integer>
</dict>
</plist>


PNG Files

  • Default.png
    IBookWidget Default.png





























  • Default@2x.png: this is the double resolution version of Default.png for Retina display iPads:
    IBookWidget Default2x.png