-
Notifications
You must be signed in to change notification settings - Fork 3
/
listing1.html
executable file
·675 lines (571 loc) · 27.2 KB
/
listing1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<!-- BEGIN META TAG INFO -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="home" href="http://developer.apple.com/">
<link rel="find" href="http://developer.apple.com/search/">
<link rel="stylesheet" type="text/css" href="../../documentation/css/adcstyle.css" title="fonts">
<script language="JavaScript" src="../../documentation/js/adc.js" type="text/javascript"></script>
<!-- END META TAG INFO -->
<!-- BEGIN TITLE -->
<title>HICustomLeftRightSwitch - /HICustomLeftRightSwitch.cp</title>
<!-- END TITLE -->
<script language="JavaScript">
function JumpToNewPage() {
window.location=document.scpopupmenu.gotop.value;
return true;
}
</script>
</head>
<!-- BEGIN BODY OPEN -->
<body>
<!--END BODY OPEN -->
<!-- START CENTER OPEN -->
<center>
<!-- END CENTER OPEN -->
<!-- BEGIN LOGO AND SEARCH -->
<!--#include virtual="/includes/adcnavbar"-->
<!-- END LOGO AND SEARCH -->
<!-- START BREADCRUMB -->
<div id="breadcrumb">
<table width="680" border="0" cellpadding="0" cellspacing="0">
<tr>
<td scope="row"><img width="340" height="10" src="images/1dot.gif" alt=""></td>
<td><img width="340" height="10" src="images/1dot.gif" alt=""></td>
</tr>
<tr valign="middle">
<td align="left" colspan="2">
<a href="http://developer.apple.com/">ADC Home</a> > <a href="../../referencelibrary/index.html">Reference Library</a> > <a href="../../samplecode/index.html">Sample Code</a> > <a href="../../samplecode/Carbon/index.html">Carbon</a> > <a href="../../samplecode/Carbon/idxHumanInterfaceToolbox-date.html">Human Interface Toolbox</a> > <A HREF="javascript:location.replace('index.html');">HICustomLeftRightSwitch</A> >
</td>
</tr>
<tr>
<td colspan="2" scope="row"><img width="680" height="35" src="images/1dot.gif" alt=""></td>
</tr>
</table>
</div>
<!-- END BREADCRUMB -->
<!-- START MAIN CONTENT -->
<!-- START TITLE GRAPHIC AND INTRO-->
<table width="680" border="0" cellpadding="0" cellspacing="0">
<tr align="left" valign="top">
<td><h1><div id="pagehead">HICustomLeftRightSwitch</div></h1></td>
</tr>
</table>
<!-- END TITLE GRAPHIC AND INTRO -->
<!-- START WIDE COLUMN -->
<table width="680" border="0" cellpadding="0" cellspacing="0">
<tr align="left" valign="top">
<td id="scdetails">
<h2>/HICustomLeftRightSwitch.cp</h2>
<form name="scpopupmenu" onSubmit="return false;" method=post>
<p><strong>View Source Code:</strong>
<select name="gotop" onChange="JumpToNewPage();" style="width:340px"><option selected value="ingnore">Select File</option>
<option value="listing1.html">/HICustomLeftRightSwitch.cp</option>
<option value="listing2.html">/HICustomLeftRightSwitch.h</option>
<option value="listing3.html">/TestHIView.cp</option>
<option value="listing4.html">/TestHIView.r</option></select>
</p>
</form>
<p><strong><a href="HICustomLeftRightSwitch.zip">Download Sample</a></strong> (“HICustomLeftRightSwitch.zip”, 65.3K)<BR>
<strong><a href="HICustomLeftRightSwitch.dmg">Download Sample</a></strong> (“HICustomLeftRightSwitch.dmg”, 125.9K)</p>
<!--
<p><strong><a href="#">Download Sample</a></strong> (“filename.sit”, 500K)</p>
-->
</td>
</tr>
<tr>
<td scope="row"><img width="680" height="10" src="images/1dot.gif" alt=""><br>
<img height="1" width="680" src="images/1dot_919699.gif" alt=""><br>
<img width="680" height="20" src="images/1dot.gif" alt=""></td>
</tr>
<tr>
<td scope="row">
<!--googleon: index -->
<pre class="sourcecodebox">/* File: HICustomLeftRightSwitch.cp Contains: Demonstrates creating a simple custom left/right switch using the HIView APIs. Version: 1.0.1 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright © 2002 Apple Computer, Inc., All Rights Reserved*/#include <Carbon/Carbon.h>#include "HICustomLeftRightSwitch.h"// structure in which we hold our custom push button's datatypedef struct { HIViewRef view; // the HIViewRef for our button HIViewRef leftLabelText; // 2 statict text controls for my labels HIViewRef rightLabelText; }CustomLeftRightSwitchData;#define kCustomLeftRightWidth 60#define kCustomLeftRightMargin 6#define kCustomLeftRightThumbWidth 8OSStatus CreateLabelSubButton(CustomLeftRightSwitchData* myData, ControlPartCode partCode);pascal OSStatus ViewHandler(EventHandlerCallRef inCaller, EventRef inEvent, void* inRefcon);CFStringRef GetCustomLeftRightSwitchClass();/* * HICreateCustomLeftRightSwitch() * * Summary: * Creates a left right switch control. * * Parameters: * * boundsRect: * The bounding box of the control. * * leftLabel: * The text for the label at the left of the switch. Can be NULL. * * rightLabel: * The text for the label at the right of the switch. Can be NULL. * * allowMixedValue: * If false, then the switch has only a value of left or right. * If true, a mixed value "middle" is allowed. * The maximum value of the control is set to 1 if false, 2 if true. * * outCustomLeftRightSwitch: * On exit, contains the new control. * * Availability: * Mac OS X: in version 10.2 and later since it needs the HIView APIs * CarbonLib: not available * Non-Carbon CFM: not available */OSStatus HICreateCustomLeftRightSwitch( WindowRef theWind, const HIRect * boundsRect, CFStringRef leftLabel, /* can be NULL */ CFStringRef rightLabel, /* can be NULL */ Boolean allowMixedValue, HIViewRef * outCustomLeftRightSwitch) { HIObjectRef hiObject = NULL; OSStatus theStatus = HIObjectCreate(GetCustomLeftRightSwitchClass(), 0, &hiObject); if (theStatus != noErr) goto exitCreation; // place the view into the Window content view // we need to do this because CreateLabelSubButton needs a valid parent for our view. HIViewRef root, contentView; root = HIViewGetRoot(theWind); HIViewFindByID(root, kHIViewWindowContentID, &contentView); HIViewAddSubview(contentView, (HIViewRef)hiObject); // position the view theStatus = HIViewSetFrame((HIViewRef)hiObject, boundsRect); if (theStatus != noErr) goto exitCreation; // set the labels if (leftLabel != NULL) { theStatus = SetControlData((HIViewRef)hiObject, kControlUpButtonPart, kControlStaticTextCFStringTag, sizeof(leftLabel), &leftLabel); if (theStatus != noErr) goto exitCreation; } if (rightLabel != NULL) { theStatus = SetControlData((HIViewRef)hiObject, kControlDownButtonPart, kControlStaticTextCFStringTag, sizeof(rightLabel), &rightLabel); if (theStatus != noErr) goto exitCreation; } // do we allow a mixed setting? if yes, then do nothing (default), else set the maximun value to 1. if (!allowMixedValue) SetControlMaximum((HIViewRef)hiObject, 1); exitCreation: *outCustomLeftRightSwitch = (HIViewRef)hiObject; return theStatus; }/*----------------------------------------------------------------------------------------------------------*/// * CreateLabelSubButton// Creates and initializes either left or right label "static Text" button (same UI as radios or checks)./*----------------------------------------------------------------------------------------------------------*/OSStatus CreateLabelSubButton(CustomLeftRightSwitchData* myData, ControlPartCode partCode) { OSStatus result; ControlRef theLabel; Rect frame = {10, 10, 20, 20}; ControlFontStyleRec theStyle; theStyle.flags = kControlUseJustMask; theStyle.just = (partCode == kControlUpButtonPart)?teJustRight:teJustLeft; result = CreateStaticTextControl(NULL, &frame, NULL, &theStyle, &theLabel); if (result == paramErr) { // most likely we got the 10.2, 10.2.1 bug where we can't // call CreateStaticTextControl with a NULL window parameter // let's create it in the window instead and move it later. result = CreateStaticTextControl(GetControlOwner(myData->view), &frame, NULL, &theStyle, &theLabel); } if (theLabel == NULL) result = paramErr; if (result != noErr) return result; // adding our Static Text to our view's parent, thus making it our sibling result = HIViewAddSubview(HIViewGetSuperview(myData->view), theLabel); if (partCode == kControlUpButtonPart) myData->leftLabelText = theLabel; else myData->rightLabelText = theLabel; // the main view has to be first because static text don't handle ciicks // or in other words, the main view has to be the first sibling HIViewSetZOrder(myData->view, kHIViewZOrderAbove, NULL); return result; }/*----------------------------------------------------------------------------------------------------------*/// * GetCustomLeftRightSwitchClass// Registers and returns an HIObject class for a custom left right switch button./*----------------------------------------------------------------------------------------------------------*/CFStringRef GetCustomLeftRightSwitchClass() { // following code is pretty much boiler plate. static HIObjectClassRef theClass; if (theClass == NULL) { static EventTypeSpec kFactoryEvents[] = { // the next 3 messages are boiler plate { kEventClassHIObject, kEventHIObjectConstruct }, { kEventClassHIObject, kEventHIObjectDestruct }, { kEventClassHIObject, kEventHIObjectInitialize }, // the next messages are the actual minimum messages you need to // implement a simple custom left right switch button: // // kEventControlHitTest has to be implemented so that you can // verify that the point passed in parameter is indeed in // an active part of your control. // Note: contrary to what you might think and what the name suggests // (HitTest), this message can be sent even when the mouse button // is not down. Do not assume that you just got a click. // The Control Manager is just asking you to verify if a point // is in a part of your control, nothing more. // // kEventControlHiliteChanged, you get this message if the user just clicked // in your control, or has left the scope of your control while the // button is still down. In each case, that means a change of hilite. // most of the time, we should just react by asking for a redraw. // // kEventControlHit, we need to change the value of our control when we // detect a succesful track. // // kEventControlValueFieldChanged, the control value has changed. either after // a succesful track detected by kEventControlHit or because our client // called SetControlValue, we should just react by asking for a redraw. // // kEventControlDraw, you need to draw your control (or part of it), // according to its state. // // kEventControlSetData, we need to override this message in order to be able // to setup/modify our left and right labels. // // kEventControlBoundsChanged, we need to override this message in order to be // able to move our left and right labesl along with our widget. { kEventClassControl, kEventControlHitTest }, { kEventClassControl, kEventControlHit }, { kEventClassControl, kEventControlHiliteChanged }, { kEventClassControl, kEventControlValueFieldChanged }, { kEventClassControl, kEventControlDraw }, { kEventClassControl, kEventControlSetData }, { kEventClassControl, kEventControlBoundsChanged } }; HIObjectRegisterSubclass(kCustomLeftRightSwitchClassID, kHIViewClassID, 0, ViewHandler, GetEventTypeCount(kFactoryEvents), kFactoryEvents, 0, &theClass); } return kCustomLeftRightSwitchClassID; }/*----------------------------------------------------------------------------------------------------------*/// * ViewHandler// Event handler that implements our custom left right switch button./*----------------------------------------------------------------------------------------------------------*/pascal OSStatus ViewHandler(EventHandlerCallRef inCaller, EventRef inEvent, void* inRefcon) { OSStatus result = eventNotHandledErr; CustomLeftRightSwitchData* myData = (CustomLeftRightSwitchData*)inRefcon; switch (GetEventClass(inEvent)) { case kEventClassHIObject: switch (GetEventKind(inEvent)) { case kEventHIObjectConstruct: { // allocate some instance data CustomLeftRightSwitchData* myData = (CustomLeftRightSwitchData*) calloc(1, sizeof(CustomLeftRightSwitchData)); // get our superclass instance HIViewRef epView; GetEventParameter(inEvent, kEventParamHIObjectInstance, typeHIObjectRef, NULL, sizeof(epView), NULL, &epView); // remember our superclass in our instance data and initialize other fields myData->view = epView; myData->leftLabelText = NULL; myData->rightLabelText = NULL; // store our instance data into the event result = SetEventParameter(inEvent, kEventParamHIObjectInstance, typeVoidPtr, sizeof(myData), &myData); break; } case kEventHIObjectDestruct: { free(myData); result = noErr; break; } case kEventHIObjectInitialize: { // always begin kEventHIObjectInitialize by calling through to the previous handler result = CallNextEventHandler(inCaller, inEvent); // if that succeeded, do our own initialization if (result == noErr) { SetControlMinimum(myData->view, 0); // default behavior is to allow mixed setting SetControlMaximum(myData->view, 2); } break; } default: break; } break; case kEventClassControl: switch (GetEventKind(inEvent)) { // Draw the view. case kEventControlDraw: { CGContextRef context; HIRect bounds; result = GetEventParameter(inEvent, kEventParamCGContextRef, typeCGContextRef, NULL, sizeof(context), NULL, &context); if (result != noErr) {DebugStr("\pGetEventParameter failed for kEventControlDraw"); break;} HIViewGetBounds(myData->view, &bounds); // compute widget bounds bounds.origin.x += (bounds.size.width - kCustomLeftRightWidth) / 2; bounds.origin.x += kCustomLeftRightMargin; bounds.size.width = kCustomLeftRightWidth - kCustomLeftRightMargin - kCustomLeftRightMargin; // and draw the widget according to hilite state if ((!IsControlHilited(myData->view)) || (!IsControlActive(myData->view))) CGContextSetGrayFillColor(context, 0.5, 0.3); else CGContextSetRGBFillColor(context, 0.1, 0.1, 1.0, 0.3); CGContextFillRect(context, bounds); // compute the "thumb" widget bounds using the current value SInt16 curVal = GetControlValue(myData->view); if (curVal == 0) bounds.origin.x += kCustomLeftRightMargin; else if (curVal == 1) bounds.origin.x += (bounds.size.width - kCustomLeftRightThumbWidth - kCustomLeftRightMargin); else bounds.origin.x += (kCustomLeftRightWidth - kCustomLeftRightMargin - kCustomLeftRightMargin - kCustomLeftRightThumbWidth) / 2; bounds.size.width = kCustomLeftRightThumbWidth; bounds.origin.y += kCustomLeftRightThumbWidth / 2; bounds.size.height -= kCustomLeftRightThumbWidth; // and draw the "thumb" widget CGContextSetRGBFillColor(context, 0.1, 0.1, 0.1, 0.3); CGContextFillRect(context, bounds); result = noErr; break; } // Determine if a point is in the view. case kEventControlHitTest: { HIPoint pt; HIRect bounds; // the point parameter is in view-local coords. GetEventParameter(inEvent, kEventParamMouseLocation, typeHIPoint, NULL, sizeof(pt), NULL, &pt); HIViewGetBounds(myData->view, &bounds); // compute our part bounds and test if (CGRectContainsPoint(bounds, pt)) { ControlPartCode part; HIRect labelBounds = bounds; labelBounds.size.width -= kCustomLeftRightWidth; labelBounds.size.width /= 2; if (CGRectContainsPoint(labelBounds, pt)) part = kControlUpButtonPart; else { labelBounds.origin.x += (bounds.size.width - labelBounds.size.width); if (CGRectContainsPoint(labelBounds, pt)) part = kControlDownButtonPart; else part = kControlCheckBoxPart; } SetEventParameter(inEvent, kEventParamControlPart, typeControlPartCode, sizeof(part), &part); result = noErr; } break; } // React to hilite changes by invalidating the view so that it will be redrawn. case kEventControlHiliteChanged: HIViewSetNeedsDisplay(myData->view, true); break; // React to value changes by invalidating the view so that it will be redrawn. case kEventControlValueFieldChanged: HIViewSetNeedsDisplay(myData->view, true); result = noErr; break; // We change the control value according to what happened and where. // We leave result set to eventNotHandledErr so that a hit event will // continue to be processed and the Control Manager eventually will send // the associated command ID to the command process hanler, except if we // detect that the value shouldn't change (ie. clicking on the "Right" // label when the thumb is already in the "Right" position, and then we // return noErr to stop the processing. case kEventControlHit: { ControlPartCode part; GetEventParameter(inEvent, kEventParamControlPart, typeControlPartCode, NULL, sizeof(part), NULL, &part); // click on our Left label? if (part == kControlUpButtonPart) { if (GetControlValue(myData->view) != 0) { SetControlValue(myData->view, 0); } else result = noErr; } // click on our Right label? else if (part == kControlDownButtonPart) { if (GetControlValue(myData->view) != 1) { SetControlValue(myData->view, 1); } else result = noErr; } // click on widget? else if (part == kControlCheckBoxPart) { SInt16 curVal = GetControlValue(myData->view); SetControlValue(myData->view, curVal+1); // Were we at maximum value already, whichever was allowed (1 or 2)? if (curVal == GetControlValue(myData->view)) // yes, so go back to 0. SetControlValue(myData->view, 0); } break; } // Needs to propagate the bounds changed message to our labels subcontrols. case kEventControlBoundsChanged: { // get the new bounds in HIRect format HIRect newHIBounds; GetEventParameter(inEvent, kEventParamCurrentBounds, typeHIRect, NULL, sizeof(newHIBounds), NULL, &newHIBounds); // compute our new bounds for our Left and Right labels HIRect leftLabelBounds = newHIBounds; leftLabelBounds.size.width -= kCustomLeftRightWidth; leftLabelBounds.size.width /= 2; HIRect rightLabelBounds = leftLabelBounds; rightLabelBounds.origin.x += (newHIBounds.size.width - leftLabelBounds.size.width); // if our StaticText labels are not instantiated yet, let's create them now result = noErr; if (myData->leftLabelText == NULL) result = CreateLabelSubButton(myData, kControlUpButtonPart); if (result == noErr) if (myData->rightLabelText == NULL) result = CreateLabelSubButton(myData, kControlDownButtonPart); if (result != noErr) break; // and set their frame to their new values HIViewSetFrame(myData->leftLabelText, &leftLabelBounds); HIViewSetFrame(myData->rightLabelText, &rightLabelBounds); // and ask for a redraw HIViewSetNeedsDisplay(myData->view, true); result = eventNotHandledErr; break; } // If the control part is kControlUpButtonPart or kControlDownButtonPart then absorb the message // else return eventNotHandledErr. case kEventControlSetData: { ControlPartCode partCode; GetEventParameter(inEvent, kEventParamControlPart, typeControlPartCode, NULL, sizeof(partCode), NULL, &partCode); // we're only interested in passing SetControlData info to our Left and Right labels if ((partCode == kControlUpButtonPart) || (partCode == kControlDownButtonPart)) { result = noErr; HIViewRef theLabel = (partCode == kControlUpButtonPart)?myData->leftLabelText:myData->rightLabelText; // if our StaticText labels are not instantiated yet, let's create them now if (theLabel == NULL) { result = CreateLabelSubButton(myData, partCode); theLabel = (partCode == kControlUpButtonPart)?myData->leftLabelText:myData->rightLabelText; } if (theLabel == NULL) result = paramErr; if (result != noErr) break; // and extract the tag, size, and pointer parameters ResType theTag; Size theSize; void * theData; GetEventParameter(inEvent, kEventParamControlDataTag, typeEnumeration, NULL, sizeof(theTag), NULL, &theTag); GetEventParameter(inEvent, kEventParamControlDataBufferSize, typeLongInteger, NULL, sizeof(theSize), NULL, &theSize); GetEventParameter(inEvent, kEventParamControlDataBuffer, typePtr, NULL, sizeof(theData), NULL, &theData); // to pass them to our sub control result = SetControlData(theLabel, kControlEntireControl, theTag, theSize, theData); HIViewSetNeedsDisplay(myData->view, true); } else result = eventNotHandledErr; break; } default: break; } break; default: break; } return result; }</pre>
<!--googleoff: index -->
</td>
</tr>
</table>
<!-- END WIDE COLUMN -->
<!-- END MAIN CONTENT -->
<table width="680" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div style="width: 100%; height: 1px; background-color: #919699; margin-top: 5px; margin-bottom: 15px"></div></td>
</tr>
<tr>
<td align="center"><br/>
<table border="0" cellpadding="0" cellspacing="0" class="graybox">
<tr>
<th>Did this document help you?</th>
</tr>
<tr>
<td>
<div style="margin-bottom: 8px"><a href="http://developer.apple.com/feedback/?v=1&url=/samplecode/HICustomLeftRightSwitch/listing1.html%3Fid%3DDTS10000635-1.0&media=dvd" target=_new>Yes</a>: Tell us what works for you.</div>
<div style="margin-bottom: 8px"><a href="http://developer.apple.com/feedback/?v=2&url=/samplecode/HICustomLeftRightSwitch/listing1.html%3Fid%3DDTS10000635-1.0&media=dvd" target=_new>It’s good, but:</a> Report typos, inaccuracies, and so forth.</div>
<div><a href="http://developer.apple.com/feedback/?v=3&url=/samplecode/HICustomLeftRightSwitch/listing1.html%3Fid%3DDTS10000635-1.0&media=dvd" target=_new>It wasn’t helpful</a>: Tell us what would have helped.</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- START BOTTOM APPLE NAVIGATION -->
<!--#include virtual="/includes/footer"-->
<!-- END BOTTOM APPLE NAVIGATION -->
<!-- START CENTER CLOSE -->
</center>
<!-- END CENTER CLOSE -->
</body>
</html>