<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Th30z - Coding on the Fly &#187; Cocoa</title>
	<atom:link href="http://th30z.netsons.org/tag/cocoa/feed/" rel="self" type="application/rss+xml" />
	<link>http://th30z.netsons.org</link>
	<description>Matteo Bertozzi, Objective-C, Cocoa, C, C++, Qt4, iPhone, Mac OS X, Open Moko, Matteo Bertozzi Development</description>
	<lastBuildDate>Sun, 22 Nov 2009 09:47:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Qt/Cocoa DataStream (Binary Communication)</title>
		<link>http://th30z.netsons.org/2009/04/qtcocoa-datastream-binary-communication/</link>
		<comments>http://th30z.netsons.org/2009/04/qtcocoa-datastream-binary-communication/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 17:55:47 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Qt4]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=732</guid>
		<description><![CDATA[In a time of REST protocols&#8230; I still love the Binary Communication. I don&#8217;t have much ideas this period, I need to find a different job (C# doesn&#8217;t fit my code necessity). The Example Source code, contains two Folder. One is the Qt4 TcpServer the second one is the ugly application that you can see [...]]]></description>
			<content:encoded><![CDATA[<p>In a time of REST protocols&#8230; I still love the Binary Communication. I don&#8217;t have much ideas this period, I need to find a different job (C# doesn&#8217;t fit my code necessity). The Example Source code, contains two Folder. One is the Qt4 TcpServer the second one is the ugly application that you can see below <img src='http://th30z.netsons.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><em>Note: This example doesn&#8217;t have anything related to the Qt 4.5 Cocoa Support.</em></p>
<p>Run the Qt4 Server, and the Cocoa Application (Remember to change the SERVER_HOST in AppController.m) and try to send some binary data. The Qt Server will receive this data it will resend you. Protocol is Very easy 1 byte of Data Type (Int8, Int16, ..) and Data. Remember that Intel arch is Little Endian.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/qtcocoadatastream.png"><img class="aligncenter size-full wp-image-731" title="Qt Cocoa DataStream" src="http://th30z.netsons.org/wp-content/uploads/qtcocoadatastream.png" alt="Qt Cocoa DataStream" width="560" height="462" /></a></p>
<p>Note: This is just a &#8220;Draft&#8221; a &#8220;non complete&#8221; example only to give the idea on how it works.</p>
<p>The Source Code is available here: <a title="Qt/Cocoa DataStream Source Code" href="http://th30z.netsons.org/wp-content/uploads/qtcocoadatastream.zip">Qt/Cocoa DataStream Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/04/qtcocoa-datastream-binary-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa: Sidebar with Badges, Take 2</title>
		<link>http://th30z.netsons.org/2009/03/cocoa-sidebar-with-badges-take-2/</link>
		<comments>http://th30z.netsons.org/2009/03/cocoa-sidebar-with-badges-take-2/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 15:13:42 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=588</guid>
		<description><![CDATA[Do you remember the Cocoa Sidebar? No, Take a Look at this post Cocoa Sidebar with Badges.
Joel asked me to revise the Sidebar, allowing to add/remove and do other operation at any time.
I&#8217;ve rewritten all the code of the Sidebar, and I&#8217;ve added a couple of new features, like the default action handler and obviously the ability [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-sidebar.png"><img class="size-medium wp-image-403 alignleft" title="Cocoa Sidebar" src="http://th30z.netsons.org/wp-content/uploads/cocoa-sidebar-237x350.png" alt="Cocoa Sidebar" width="166" height="245" /></a>Do you remember the Cocoa Sidebar? No, Take a Look at this post <a href="http://th30z.netsons.org/2008/12/cocoa-sidebar-with-badges/">Cocoa Sidebar with Badges</a><a>.</a></p>
<p>Joel asked me to revise the Sidebar, allowing to add/remove and do other operation at any time.</p>
<p>I&#8217;ve rewritten all the code of the Sidebar, and I&#8217;ve added a couple of new features, like the default action handler and obviously the ability to add, remove items and badges at any time.</p>
<p>All the past features, like Drag &amp; Drop are still present, but there&#8217;s something else to do to improve it. If You&#8217;ve suggestions, patches or something else post a comment or send me a mail!</p>
<p>The Source Code is Available Here: <a href="http://th30z.netsons.org/wp-content/uploads/cocoa-sidebar2.zip">Cocoa Sidebar 2 Source Code</a>.</p>
<p><em>Update 10 March 2008 &#8211; Source Updated with Fixes.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/03/cocoa-sidebar-with-badges-take-2/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Cocoa: Drag &amp; Drop</title>
		<link>http://th30z.netsons.org/2009/02/cocoa-drag-drop/</link>
		<comments>http://th30z.netsons.org/2009/02/cocoa-drag-drop/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 10:58:37 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Drag & Drop]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NSView]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=554</guid>
		<description><![CDATA[Today a simple example of Drag &#38; Drop with Cocoa and NSView. The screenshot below shows two groups. In the first one, you can drop the photos on your filesystem, taken from Desktop or Finder. In the second group, you can only drop the first group image.

You can find the source code here: Drag &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Today a simple example of Drag &amp; Drop with Cocoa and NSView. The screenshot below shows two groups. In the first one, you can drop the photos on your filesystem, taken from Desktop or Finder. In the second group, you can only drop the first group image.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-draganddrop.png"><img class="aligncenter size-medium wp-image-555" title="Cocoa Drag &amp; Drop Test App" src="http://th30z.netsons.org/wp-content/uploads/cocoa-draganddrop-350x175.png" alt="Cocoa Drag &amp; Drop Test App" width="350" height="175" /></a></p>
<p>You can find the source code here: <a href="http://th30z.netsons.org/wp-content/uploads/cocoa-draganddroptest.zip">Drag &amp; Drop Test Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/02/cocoa-drag-drop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebKit: Google Maps</title>
		<link>http://th30z.netsons.org/2009/02/webkit-google-maps/</link>
		<comments>http://th30z.netsons.org/2009/02/webkit-google-maps/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 17:12:51 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=512</guid>
		<description><![CDATA[Following the Google StreetView post, another example on How Cocoa Application can Interact with Google. Today the WebKit shows Google Maps.

Like iPhoto &#8216;09 you can select you Map Type (Terrain, Satellite, Hybrid) and you can Zoom In or Zoom Out using controls of your Application.

You can Find the Source Code Here: Cocoa Google Maps.
]]></description>
			<content:encoded><![CDATA[<p>Following the <a href="http://th30z.netsons.org/2009/01/webkit-google-streetview/">Google StreetView</a> post, another example on How Cocoa Application can Interact with Google. Today the WebKit shows Google Maps.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-alisoviejo.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-alisoviejo-350x265.png" alt="Cocoa Google Maps - Aliso Viejo" title="Cocoa Google Maps - Aliso Viejo" width="350" height="265" class="aligncenter size-medium wp-image-513" /></a><br />
Like iPhoto &#8216;09 you can select you Map Type (Terrain, Satellite, Hybrid) and you can Zoom In or Zoom Out using controls of your Application.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-redwood.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-redwood-350x276.png" alt="Cocoa Google Maps - Red Wood" title="Cocoa Google Maps - Red Wood" width="350" height="276" class="aligncenter size-medium wp-image-514" /></a><br />
You can Find the Source Code Here: <a href='http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps.zip'>Cocoa Google Maps</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/02/webkit-google-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebKit: Google StreetView</title>
		<link>http://th30z.netsons.org/2009/01/webkit-google-streetview/</link>
		<comments>http://th30z.netsons.org/2009/01/webkit-google-streetview/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 08:56:38 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[StreetView]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=469</guid>
		<description><![CDATA[Last iPhoto &#8216;09 presented at MacWorld contains a couple of interesting Features: Faces and Places. Today, I&#8217;ve a little bit of free time to play with my Mac, and the topic is How to embed Google StreetView into a Cocoa Application.

The Solution is using WebKit and Google Maps API. We&#8217;ve a simple HTML file that [...]]]></description>
			<content:encoded><![CDATA[<p>Last <a href="http://www.apple.com/ilife/iphoto/">iPhoto</a> &#8216;09 presented at MacWorld contains a couple of interesting Features: Faces and Places. Today, I&#8217;ve a little bit of free time to play with my Mac, and the topic is How to embed <a href="http://maps.google.com/help/maps/streetview/">Google StreetView</a> into a Cocoa Application.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-cuppertino.png"><img class="aligncenter size-medium wp-image-466" title="Cocoa Streetview Cuppertino" src="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-cuppertino-350x276.png" alt="Cocoa Streetview Cuppertino" width="350" height="276" /></a><br />
The Solution is using WebKit and <a href="http://code.google.com/apis/maps/">Google Maps API</a>. We&#8217;ve a simple HTML file that contains StreetView &#8220;Canvas&#8221; and a couple of javascript methods that interact with GStreetviewPanorama Object.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-sanfrancisco.png"><img class="aligncenter size-medium wp-image-467" title="Cocoa Streetview San Francisco" src="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-sanfrancisco-350x276.png" alt="Cocoa Streetview San Francisco" width="350" height="276" /></a><br />
The Source Code is Available Here: <a href='http://th30z.netsons.org/wp-content/uploads/googlestreetview.zip'>Cocoa StreetView Source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/01/webkit-google-streetview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebKit: Dynamic Content</title>
		<link>http://th30z.netsons.org/2008/12/webkit-dynamic-content/</link>
		<comments>http://th30z.netsons.org/2008/12/webkit-dynamic-content/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 10:42:57 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=427</guid>
		<description><![CDATA[Today I&#8217;ve played a bit with WebKit. I Want do something like Cocoa VBox View and NSScrollView but with more flexibility. Below you can see the example result.

The interesting part of this example is How to manage WebKit content,  and how to add something dynamically.
I use webView:decidePolicyForNavigationAction:request:frame:decisionListener: of WebPolicyDelegate Protocol to handle my custom [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve played a bit with <strong>WebKit</strong>. I Want do something like <a href="http://th30z.netsons.org/2008/11/cocoa-vbox-view-and-nsscrollview/">Cocoa VBox View and NSScrollView</a> but with more flexibility. Below you can see the example result.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/webkitdynamiccontent.png"  title="WebKit Dynamic Content"><img src="http://th30z.netsons.org/wp-content/uploads/webkitdynamiccontent.png" alt="WebKit Dynamic Content" title="WebKit Dynamic Content" width="597" height="394" class="aligncenter size-full wp-image-424" /></a></p>
<p>The interesting part of this example is How to manage WebKit content,  and how to add something dynamically.</p>
<p>I use <em>webView:decidePolicyForNavigationAction:request:frame:decisionListener:</em> of <strong>WebPolicyDelegate Protocol</strong> to handle my custom requests, in this way&#8230;</p>
<pre>
- (void)webView:(WebView *)sender
    decidePolicyForNavigationAction:(NSDictionary *)actionInformation
   request:(NSURLRequest *)request frame:(WebFrame *)frame
   decisionListener:(id)listener
{
    if ([[[request URL] path] isEqualToString:@"PATH to Handle"]) {
        [listener ignore];
        // Handle Request
    } else {
         [listener use];
    }
}
</pre>
<p>&#8230;Then with a little bit of JavaScript I&#8217;ll set my dynamic content loaded from Database or somewhere else.</p>
<pre>
NSArray *args = [NSArray arrayWithObjects:@"Item1Content",
                                  @"Hi, I'm Test 1 Content", nil];
[[webKit windowScriptObject] callWebScriptMethod:@"fillElement"
                               withArguments:args];
</pre>
<p>The <strong>fillElement</strong> method is a simple JS function like this <em>document.getElementById(elem).innerHTML = data;</em></p>
<p>Here you can find the <a href="http://th30z.netsons.org/wp-content/uploads/testwebkit.zip">Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/12/webkit-dynamic-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa: Sidebar with Badges</title>
		<link>http://th30z.netsons.org/2008/12/cocoa-sidebar-with-badges/</link>
		<comments>http://th30z.netsons.org/2008/12/cocoa-sidebar-with-badges/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 05:31:11 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=402</guid>
		<description><![CDATA[Yesterday, I&#8217;ve written a simple Sidebar controller that can saves you some time and trouble with Cocoa Source List. Nodes and Folders can be drag and dropped into other folders or near other items and you can easily set badges on nodes.
/p>
You can find the example Source Code Here.
And below you can see hot to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I&#8217;ve written a simple Sidebar controller that can saves you some time and trouble with Cocoa Source List. Nodes and Folders can be drag and dropped into other folders or near other items and you can easily set badges on nodes.<br />
<div id="attachment_403" class="wp-caption aligncenter" style="width: 284px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-sidebar.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoa-sidebar.png" alt="Cocoa Sidebar" title="Cocoa Sidebar" width="274" height="403" class="size-full wp-image-403" /></a><p class="wp-caption-text">Cocoa Sidebar</p></div></p>
<p>You can find the example <a href="http://th30z.netsons.org/wp-content/uploads/cocoa-sidebar.zip">Source Code</a> Here.</p>
<p>And below you can see hot to add folders, nodes and set badges.</p>
<pre>
- (void)populateOutlineContents:(id)inObject {
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

  [sidebar addRootFolder:@"1" name:@"DEVICES"];
  [sidebar addChild:@"1.1" name:@"Machintosh HD"
               icon:[NSImage imageNamed:NSImageNameComputer]
             action:@selector(buttonPres:) target:self];

  [sidebar addRootFolder:@"2" name:@"PLACES"];
  [sidebar addChild:@"2.1"
                url:NSHomeDirectory()
             action:@selector(buttonPres:) target:self];

  [sidebar addRootFolder:@"3" name:@"OTHER."];
  [sidebar addChild:@"3.1" name:@"Bonjour"
               icon:[NSImage imageNamed:NSImageNameBonjour]
             action:@selector(buttonPres:) target:self];
  [sidebar addChild:@"3.2" name:@"Users"
               icon:[NSImage imageNamed:NSImageNameUserGroup]
             action:@selector(buttonPres:) target:self];

  [sidebar clearSelection];

  // Add Badge to Node with Key
  [sidebar setBadge:@"2.1" count:5];
  [sidebar setBadge:@"3.2" count:7];

  [pool release];
}

- (void)buttonPres:(id)sender {
  NSLog(@"Button Press %@", [sender nodeTitle]);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/12/cocoa-sidebar-with-badges/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Cocoa: VBox View and NSScrollView</title>
		<link>http://th30z.netsons.org/2008/11/cocoa-vbox-view-and-nsscrollview/</link>
		<comments>http://th30z.netsons.org/2008/11/cocoa-vbox-view-and-nsscrollview/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 09:19:11 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NSScrollView]]></category>
		<category><![CDATA[NSView]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=299</guid>
		<description><![CDATA[Following the post of yesterday, today I&#8217;ve implemented a simple VBoxView (Vertical Box Layout) that allow you to lines up NSViews vertically.
br />
Here you can find the example Source Code.
]]></description>
			<content:encoded><![CDATA[<p>Following the post of yesterday, today I&#8217;ve implemented a simple VBoxView (Vertical Box Layout) that allow you to lines up NSViews vertically.<br />
<div id="attachment_300" class="wp-caption aligncenter" style="width: 567px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoascrollablensview.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoascrollablensview.png" alt="Cocoa Scrollable NSViews VBox" title="Cocoa Scrollable NSViews VBox" width="557" height="329" class="size-full wp-image-300" /></a><p class="wp-caption-text">Cocoa Scrollable NSViews VBox</p></div><br />
Here you can find the example <a href="http://th30z.netsons.org/wp-content/uploads/cocoavboxscrollview.zip">Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/cocoa-vbox-view-and-nsscrollview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cocoa: Drawing Images, Texts and Shadows</title>
		<link>http://th30z.netsons.org/2008/11/cocoa-drawing-images-texts-and-shadows/</link>
		<comments>http://th30z.netsons.org/2008/11/cocoa-drawing-images-texts-and-shadows/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 10:23:17 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NSView]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=286</guid>
		<description><![CDATA[Today I&#8217;m playing a bit with Quartz and Cocoa Drawing system (that is based on Quartz).
I&#8217;ve made a simple example that you can see below where I&#8217;ve used custom NSView that draws an Image and a Bezier Path with some text inside, and around the Bezier Path there&#8217;s a Shadow.
&#8230;And this is the drawRect method [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m playing a bit with Quartz and Cocoa Drawing system (that is based on Quartz).</p>
<p>I&#8217;ve made a simple example that you can see below where I&#8217;ve used custom NSView that draws an Image and a Bezier Path with some text inside, and around the Bezier Path there&#8217;s a Shadow.</p>
<div id="attachment_287" class="wp-caption aligncenter" style="width: 577px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoansviewdrawings.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoansviewdrawings.png" alt="Cocoa Drawing Example" title="Cocoa Drawing Example" width="567" height="243" class="size-full wp-image-287" /></a><p class="wp-caption-text">Cocoa Drawing Example</p></div>
<p>&#8230;And this is the drawRect method source code of the custom NSView.</p>
<pre>
- (void)drawRect:(NSRect)frameRect {
  [NSGraphicsContext saveGraphicsState];

  [[NSColor colorWithCalibratedRed:0.64 green:0.66 blue:0.71 alpha:1.0] set];
  NSRectFill(frameRect);

  /* Draw Shadow */
  NSShadow *shadow = [[NSShadow alloc] init];
  [shadow setShadowColor:[[NSColor blackColor] colorWithAlphaComponent:0.5]];
  [shadow setShadowOffset:NSMakeSize(4.0, -4.0)];
  [shadow setShadowBlurRadius:3.0];
  [shadow set];

  /* Draw Control */
  NSRect myRect = NSMakeRect(80, 50, frameRect.size.width - 120, 60);
  NSBezierPath *path = [NSBezierPath bezierPath];
  [path setLineJoinStyle:NSRoundLineJoinStyle];
  [path appendBezierPathWithRoundedRect:myRect xRadius:8.0 yRadius:8.0];    

  [path moveToPoint:NSMakePoint(80, 75)];
  [path lineToPoint:NSMakePoint(65, 85)];
  [path lineToPoint:NSMakePoint(80, 95)];

  NSColor *startingColor = [NSColor colorWithCalibratedRed:0.90
                                             green:0.92 blue:0.85 alpha:1.0];
  NSColor *endingColor = [NSColor colorWithCalibratedRed:0.81
                                           green:0.83 blue:0.76 alpha:1.0];
  NSGradient *gradient = [[[NSGradient alloc] initWithStartingColor:startingColor
                                 endingColor:endingColor] autorelease];
  [path fill];
  [gradient drawInBezierPath:path angle:90];

  [NSGraphicsContext restoreGraphicsState];

  [shadow release];

  NSImage *image = [NSImage imageNamed:NSImageNameUser];
  [image drawInRect:NSMakeRect(15, 50, 50, 50) fromRect:NSZeroRect
                operation:NSCompositeSourceOver fraction:1.0];

  NSString *string = [NSString stringWithString:@"Text\nMore Text"];
  [string drawInRect:NSMakeRect(90, 60, frameRect.size.width - 140, 45)
                        withAttributes:nil];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/cocoa-drawing-images-texts-and-shadows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa: Filterbar Control</title>
		<link>http://th30z.netsons.org/2008/11/cocoa-filterbar-control/</link>
		<comments>http://th30z.netsons.org/2008/11/cocoa-filterbar-control/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 19:30:10 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NSView]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=273</guid>
		<description><![CDATA[This morning I&#8217;ve created this FilterBar (take a look at the picture below). You can add custom NSView and you can manage you groups with delegates.
Below, I&#8217;ve added a movie&#8230; but it doesn&#8217;t [sizeToFit] the page&#8230; so here is the link of Cocoa Filterbar Demo. And here you can find the Cocoa Filterbar Souce.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_cocoafilterbardemo_1618324027"
			class="flashmovie"
			width="400"
			height="100%">
	<param name="movie" value="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.swf"
			name="fm_cocoafilterbardemo_1618324027"
			width="400"
			height="100%">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>]]></description>
			<content:encoded><![CDATA[<p>This morning I&#8217;ve created this <strong>FilterBar</strong> (take a look at the picture below). You can add custom NSView and you can manage you groups with delegates.</p>
<div id="attachment_274" class="wp-caption aligncenter" style="width: 510px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.png"><img class="size-full wp-image-274" title="Cocoa Filterbar Demo" src="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.png" alt="Cocoa Filterbar Demo" width="500" height="134" /></a><p class="wp-caption-text">Cocoa Filterbar Demo</p></div>
<p>Below, I&#8217;ve added a movie&#8230; but it doesn&#8217;t [sizeToFit] the page&#8230; so here is the link of <a href="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.swf">Cocoa Filterbar Demo</a>. And here you can find the <a href="http://th30z.netsons.org/wp-content/uploads/cocoafilterbar.zip">Cocoa Filterbar Souce</a>.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_cocoafilterbardemo_1074239254"
			class="flashmovie"
			width="100%"
			height="100%">
	<param name="movie" value="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://th30z.netsons.org/wp-content/uploads/cocoafilterbardemo.swf"
			name="fm_cocoafilterbardemo_1074239254"
			width="100%"
			height="100%">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/cocoa-filterbar-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa: Horizontal Box</title>
		<link>http://th30z.netsons.org/2008/11/cocoa-horizontal-box/</link>
		<comments>http://th30z.netsons.org/2008/11/cocoa-horizontal-box/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 17:43:24 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NSView]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=264</guid>
		<description><![CDATA[It&#8217;s a couple of days that I&#8217;m searching for something like QHBoxLayout (Qt Horizonal Box Layout) in Cocoa. There&#8217;s NSMatrix that do something like this&#8230; but it uses NSCell and it sets the same size for all the cells, so this is not what I want. My solution is a simple NSView subclass&#8230;

This is the [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a couple of days that I&#8217;m searching for something like QHBoxLayout (Qt Horizonal Box Layout) in Cocoa. There&#8217;s <em>NSMatrix</em> that do something like this&#8230; but it uses <em>NSCell</em> and it sets the same size for all the cells, so this is not what I want. My solution is a simple <em>NSView subclass</em>&#8230;</p>
<div id="attachment_265" class="wp-caption aligncenter" style="width: 510px"><a href="http://th30z.netsons.org/wp-content/uploads/testcocoahbox.png"><img class="size-full wp-image-265" title="Cocoa Horizontal Box" src="http://th30z.netsons.org/wp-content/uploads/testcocoahbox.png" alt="Example: Cocoa Horizontal Box" width="500" height="185" /></a><p class="wp-caption-text">Example: Cocoa Horizontal Box</p></div>
<p><span id="more-264"></span><br />
This is the HBox Source&#8230;</p>
<pre>@interface HBox : NSView {
    NSUInteger hspace;
}

@property (readwrite, assign) NSUInteger space;

- (id)initWithFrame:(NSRect)frameRect;

- (void)clearItems;

- (void)addItem:(NSControl *)itemView;
- (void)removeItemAtIndex:(NSUInteger)index;

- (void)moveItem:(NSView *)view space:(NSInteger)space;
- (void)moveItems:(NSInteger) space fromIndex:(NSUInteger)index;
@end</pre>
<pre>@implementation HBox

@synthesize space = hspace;

- (id)initWithFrame:(NSRect)frameRect {
    if ((self = [super initWithFrame:frameRect])) {
        hspace = 4;
    }
    return self;
}

- (void)dealloc {
    [super dealloc];
}

- (void)clearItems {
    NSArray *subviewArray = [self subviews];
    NSUInteger subviewCount = [subviewArray count];

    while (subviewCount-- &gt; 0) {
        NSView *view = [subviewArray objectAtIndex:0];
        [view removeFromSuperview];
        [view release];
    }

    [self setNeedsDisplay:YES];
}

- (void)removeItemAtIndex:(NSUInteger)index {
    NSView *view = [[self subviews] objectAtIndex:index];
    int viewWidth = -1 * [view frame].size.width - hspace;
    [view removeFromSuperview];
    [view release];

    [self moveItems:viewWidth fromIndex:index];
    [self setNeedsDisplay:YES];
}

- (void)moveItem:(NSView *)view space:(NSInteger)space {
    NSRect rect = [view frame];
    rect.origin.x += space;
    [view setFrame:rect];
}

- (void)moveItems:(NSInteger) space fromIndex:(NSUInteger)index {
    NSArray *subviewArray = [self subviews];
    NSUInteger subviewCount = [subviewArray count];

    for (; index &lt; subviewCount; ++index)
        [self moveItem:[subviewArray objectAtIndex:index] space:space];
}

- (void)addItem:(NSControl *)itemView {
    [itemView sizeToFit];

    NSRect itemFrame = [itemView frame];
    NSView *lastView = [[self subviews] lastObject];
    if (lastView != nil) {
        itemFrame.origin.x = [lastView frame].origin.x +
                             [lastView frame].size.width +
                             hspace;
    } else {
        itemFrame.origin.x = [self bounds].origin.x + hspace;
    }
    itemFrame.origin.y = [self bounds].origin.y;
    [itemView setFrame:itemFrame];

    [self addSubview:itemView];
    [self setNeedsDisplay:YES];
}

@end</pre>
<p>And This is a simple &#8220;Main&#8221; to test the HBox.</p>
<pre>
- (NSTextField *)createTextField:(NSString *)text {
    NSTextField *field = [[NSTextField alloc] init];
    [field setStringValue:text];
    return [field retain];
}

- (NSButton *)createButton:(NSString *)caption {
    NSButton *button = [[NSButton alloc] init];
    [button setBezelStyle:NSRecessedBezelStyle];
    [button setButtonType:NSPushOnPushOffButton];
    [[button cell] setHighlightsBy:(NSCellIsBordered | NSCellIsInsetButton)];
    [button setShowsBorderOnlyWhileMouseInside:YES];
    [button setButtonType:NSOnOffButton];
    [button setTitle:caption];

    return [button retain];
}

- (void)awakeFromNib {
    [box addItem:[self createTextField:@"Label 1"]];
    [box addItem:[self createButton:@"Button 1"]];
    [box removeItemAtIndex:0];
    [box addItem:[self createTextField:@"Label 2"]];
    [box addItem:[self createButton:@"Say"]];
}
</pre>
<p>Download Here the <a href='http://th30z.netsons.org/wp-content/uploads/testcocoahbox.zip'>Test Cocoa HBox Source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/cocoa-horizontal-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Look: Look before you launch</title>
		<link>http://th30z.netsons.org/2008/11/quick-look-look-before-you-launch/</link>
		<comments>http://th30z.netsons.org/2008/11/quick-look-look-before-you-launch/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 14:10:37 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[QuickLook]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=254</guid>
		<description><![CDATA[Quick Look is a technology introduced in Mac OS X version 10.5 that enables client applications, such as Spotlight and the Finder, to display thumbnail images and full-size previews of documents.
Here you can Find the source code example: TestQuickLook.zip
]]></description>
			<content:encoded><![CDATA[<p>Quick Look is a technology introduced in Mac OS X version 10.5 that enables client applications, such as Spotlight and the Finder, to display thumbnail images and full-size previews of documents.</p>
<div id="attachment_255" class="wp-caption aligncenter" style="width: 510px"><a href="http://th30z.netsons.org/wp-content/uploads/picture-7.png"><img class="size-full wp-image-255" title="Quick Look Example" src="http://th30z.netsons.org/wp-content/uploads/picture-7.png" alt="Quick Look Example" width="500" height="379" /></a><p class="wp-caption-text">Quick Look Example</p></div>
<p>Here you can Find the source code example: <a title="TestQuickLook.zip" href="http://th30z.netsons.org/wp-content/uploads/TestQuickLook.zip">TestQuickLook.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/quick-look-look-before-you-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa: Controls Gallery</title>
		<link>http://th30z.netsons.org/2008/11/cocoa-controls-gallery/</link>
		<comments>http://th30z.netsons.org/2008/11/cocoa-controls-gallery/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 10:38:20 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=245</guid>
		<description><![CDATA[Today I don&#8217;t have inspiration&#8230;
So, I don&#8217;t have some code to publish now, but i&#8217;ve made a couple of screenshots that contain some of Cocoa&#8217;s Controls.

Ok&#8230; thanks for this Gallery, but it will be helpful have olso Objects Type&#8230;.
And&#8230; last thing, different types of Windows.
]]></description>
			<content:encoded><![CDATA[<p>Today I don&#8217;t have inspiration&#8230;</p>
<p>So, I don&#8217;t have some code to publish now, but i&#8217;ve made a couple of screenshots that contain some of Cocoa&#8217;s Controls.</p>
<div id="attachment_244" class="wp-caption aligncenter" style="width: 510px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-controls-105.png"><img class="size-full wp-image-244" title="Cocoa Controls" src="http://th30z.netsons.org/wp-content/uploads/cocoa-controls-105.png" alt="Cocoa Controls" width="500" height="419" /></a><p class="wp-caption-text">Cocoa Controls</p></div>
<p><span id="more-245"></span></p>
<p>Ok&#8230; thanks for this Gallery, but it will be helpful have olso Objects Type&#8230;.</p>
<div id="attachment_250" class="wp-caption aligncenter" style="width: 300px"><a href="http://th30z.netsons.org/wp-content/uploads/ib-cocoa-controls-105.png"><img class="size-medium wp-image-250" title="Cocoa Controls - Interface Builder" src="http://th30z.netsons.org/wp-content/uploads/ib-cocoa-controls-105-290x350.png" alt="Cocoa Controls - Interface Builder" width="290" height="350" /></a><p class="wp-caption-text">Cocoa Controls - Interface Builder</p></div>
<p>And&#8230; last thing, different types of Windows.</p>
<div id="attachment_249" class="wp-caption aligncenter" style="width: 510px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-windows-105.png"><img class="size-full wp-image-249" title="Cocoa (Hud, Textured, Panel) Window" src="http://th30z.netsons.org/wp-content/uploads/cocoa-windows-105.png" alt="Cocoa (Hud, Textured, Panel) Window" width="500" height="228" /></a><p class="wp-caption-text">Cocoa (HUD, Textured, Panel) Window</p></div>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/cocoa-controls-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocoa: System StatusBar Item (Aka TrayBar)</title>
		<link>http://th30z.netsons.org/2008/10/cocoa-system-statusbar-item-aka-traybar/</link>
		<comments>http://th30z.netsons.org/2008/10/cocoa-system-statusbar-item-aka-traybar/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 08:38:38 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=226</guid>
		<description><![CDATA[Today&#8217;s example is &#8220;How to add your own Item inside System Status Bar&#8220;. It&#8217;s really easy but the Apple OS X Human Interface Guidelines discourage it, at the end of the post you can find the Apple HIG notes.
Something about Names&#8230; Apple HIG call this MenuBar part &#8220;MenuBar Extra&#8221; (See Apple HIG Part III &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s example is &#8220;<em>How to add your own Item inside System Status Bar</em>&#8220;. It&#8217;s really easy but the <em>Apple OS X Human Interface Guidelines discourage it</em>, at the end of the post you can find the Apple HIG notes.</p>
<div id="attachment_227" class="wp-caption aligncenter" style="width: 370px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-tray-test1.png"><img class="size-full wp-image-227" title="Cocoa System Status Bar" src="http://th30z.netsons.org/wp-content/uploads/cocoa-tray-test1.png" alt="Cocoa System Status Bar" width="360" height="22" /></a><p class="wp-caption-text">Cocoa System Status Bar</p></div>
<p>Something about Names&#8230; Apple HIG call this MenuBar part &#8220;MenuBar Extra&#8221; (See Apple HIG Part III &#8211; The Menu Bar and Its Menus) using Cocoa you can get it from <em>NSStatusBar</em> <em>systemStatusBar</em>.</p>
<p><span id="more-226"></span></p>
<p>Now the Example. As you can see in the picture we&#8217;ve our icon &#8220;M&#8221; with a Menu that do something&#8230;</p>
<div id="attachment_228" class="wp-caption aligncenter" style="width: 370px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoa-traymenu-test1.png"><img class="size-full wp-image-228" title="Cocoa System Status Bar with Menu" src="http://th30z.netsons.org/wp-content/uploads/cocoa-traymenu-test1.png" alt="Cocoa System Status Bar with Menu" width="360" height="120" /></a><p class="wp-caption-text">Cocoa System Status Bar with Menu</p></div>
<p>When <em>applicationDidFinishLaunching</em> we initialize the NSStatusItem object we build the menu items and conntect with the related selector. In this example you can see the usage of NSWorkspace to run Application like finder and URL that will be opened with your default related app.</p>
<pre>@interface TrayMenu : NSObject {
    @private
        NSStatusItem *_statusItem;
}
@end</pre>
<pre>@implementation TrayMenu

- (void) openWebsite:(id)sender {
  NSURL *url = [NSURL URLWithString:@"http://th30z.netsons.org"];
  [[NSWorkspace sharedWorkspace] openURL:url];
  [url release];
}

- (void) openFinder:(id)sender {
  [[NSWorkspace sharedWorkspace] launchApplication:@"Finder"];
}

- (void) actionQuit:(id)sender {
  [NSApp terminate:sender];
}

- (NSMenu *) createMenu {
  NSZone *menuZone = [NSMenu menuZone];
  NSMenu *menu = [[NSMenu allocWithZone:menuZone] init];
  NSMenuItem *menuItem;

  // Add To Items
  menuItem = [menu addItemWithTitle:@"Open Website"
                      action:@selector(openWebsite:)
                      keyEquivalent:@""];
  [menuItem setTarget:self];

  menuItem = [menu addItemWithTitle:@"Open Finder"
                      action:@selector(openFinder:)
                      keyEquivalent:@""];
  [menuItem setTarget:self];

  // Add Separator
  [menu addItem:[NSMenuItem separatorItem]];

  // Add Quit Action
  menuItem = [menu addItemWithTitle:@"Quit"
                      action:@selector(actionQuit:)
                      keyEquivalent:@""];
  [menuItem setToolTip:@"Click to Quit this App"];
  [menuItem setTarget:self];

  return menu;
}

- (void) applicationDidFinishLaunching:(NSNotification *)notification {
  NSMenu *menu = [self createMenu];

  _statusItem = [[[NSStatusBar systemStatusBar]
                  statusItemWithLength:NSSquareStatusItemLength] retain];
  [_statusItem setMenu:menu];
  [_statusItem setHighlightMode:YES];
  [_statusItem setToolTip:@"Test Tray"];
  [_statusItem setImage:[NSImage imageNamed:@"trayIcon"]];

  [menu release];
}

@end</pre>
<pre>int main(int argc, char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    [NSApplication sharedApplication];

    TrayMenu *menu = [[TrayMenu alloc] init];
    [NSApp setDelegate:menu];
    [NSApp run];

    [pool release];
    return EXIT_SUCCESS;
}</pre>
<h2>Apple OS X Human Interface Guidelines</h2>
<p>Reserved<span> </span>for<span> </span>use<span> </span>by<span> </span>Apple,<span> </span>the<span> </span>right<span> </span>side<span> </span>of<span> </span>the<span> </span>menu<span> </span>bar<span> </span>may<span> </span>contain<span> </span>items<span> </span>that<span> </span>provide<span> </span>feedback<span> on<span> </span>and<span> </span>access<span> </span>to<span> </span>certain<span> </span>hardware<span> </span>or<span> </span>network<span> </span>settings.<span> </span>Menu<span> </span>bar<span> </span>extras<span> </span>display<span> </span>some<span> </span>type<span> </span>of<span> </span>status<span> in<span> </span>the<span> </span>menu<span> </span>bar<span> </span>and<span> </span>have<span> </span>a<span> </span>menu<span> </span>to<span> </span>change<span> </span>settings.<span> </span>The<span> </span>icon<span> </span>for<span> </span>the<span> </span>battery<span> </span>strength<span> </span>indicator,<span> </span>for<span> example,<span> </span>dynamically<span> </span>displays<span> </span>the<span> </span>current<span> </span>state<span> </span>of<span> </span>the<span> </span>battery<span> </span>for<span> </span>a<span> </span>portable<span> </span>computer,<span> </span>and<span> </span>the<span> </span>menu<span> has<span> </span>common<span> </span>battery<span> </span>settings.<span> </span>Users<span> </span>can<span> </span>display<span> </span>or<span> </span>hide<span> </span>a<span> </span>menu<span> </span>bar<span> </span>extra<span> </span>in<span> </span>the<span> </span>appropriate<span> </span>preferences<span> pane.<span> </span></span></span></span></span></span></p>
<p><strong>Important</strong>:<span> </span>Don’t<span> </span>create<span> </span>your<span> </span>own<span> </span>menu<span> </span>bar<span> </span>extras.<span> </span>Use<span> </span>the<span> </span>Dock<span> </span>menu<span> </span>functions<span> </span>to<span> </span>open<span> </span>a<span> </span>menu<span> from<span> </span>your<span> </span>application’s<span> </span>icon<span> </span>in<span> </span>the<span> </span>Dock.<span> </span></span></p>
<p><span><span>If<span> </span>there<span> </span>is<span> </span>not<span> </span>enough<span> </span>room<span> </span>in<span> </span>the<span> </span>menu<span> </span>bar<span> </span>to<span> </span>display<span> </span>all<span> </span>menus,<span> </span>menu<span> </span>bar<span> </span>extras<span> </span>are<span> </span>removed<span> automatically<span> </span>by<span> </span>Mac<span> </span>OS<span> </span>X<span> </span>to<span> </span>make<span> </span>room<span> </span>for<span> </span>application<span> </span>menus,<span> </span>which<span> </span>take<span> </span>precedence.<span> </span>Because<span> </span>of<span> this,<span> </span>and<span> </span>because<span> </span>users<span> </span>can<span> </span>choose<span> </span>to<span> </span>hide<span> </span>menu<span> </span>bar<span> </span>extras,<span> </span>you<span> </span>should<span> </span>not<span> </span>rely<span> </span>on<span> </span>their<span> </span>presence.<span> </span></span></span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/10/cocoa-system-statusbar-item-aka-traybar/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cocoa: Image Pattern as NSView Background</title>
		<link>http://th30z.netsons.org/2008/10/cocoa-image-pattern-as-nswindow-background/</link>
		<comments>http://th30z.netsons.org/2008/10/cocoa-image-pattern-as-nswindow-background/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 15:11:46 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[NSView]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=216</guid>
		<description><![CDATA[I Really like Apple Mail Note Editor, and today I&#8217;ve tried to do something like notes of Mail.app
Mail uses html and css loaded into a WebView (WebKit) to render the background of the window. I&#8217;ve used a simple NSView, I&#8217;ve Inherited from it and I&#8217;ve added a couple of feature to render an image as background [...]]]></description>
			<content:encoded><![CDATA[<p>I Really like Apple Mail Note Editor, and today I&#8217;ve tried to do something like notes of Mail.app</p>
<p>Mail uses html and css loaded into a WebView (WebKit) to render the background of the window. I&#8217;ve used a simple NSView, I&#8217;ve Inherited from it and I&#8217;ve added a couple of feature to render an image as background pattern. Below you can see the result and here you can <a href="http://th30z.netsons.org/wp-content/uploads/cocoa-winbgimg.zip">Download the Source</a>.</p>
<div id="attachment_215" class="wp-caption aligncenter" style="width: 443px"><a href="http://th30z.netsons.org/wp-content/uploads/cocoawindowbgimage.png"><img class="size-full wp-image-215" title="NSWindow with Image Pattern as Background" src="http://th30z.netsons.org/wp-content/uploads/cocoawindowbgimage.png" alt="NSWindow with Image Pattern as Background" width="433" height="298" /></a><p class="wp-caption-text">NSWindow with Image Pattern as Background</p></div>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/10/cocoa-image-pattern-as-nswindow-background/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
