Merge pull request #1570 from aradabaugh/cpbutton-types

Enable additional button types for CPButton
This commit is contained in:
Alexander Ljungberg
2012-06-25 15:40:23 +01:00
9 changed files with 418 additions and 85 deletions
+33 -11
View File
@@ -55,8 +55,8 @@ CPRadioButton = 4; // Deprecated, use CPRadio instead.
CPMomentaryChangeButton = 5;
CPOnOffButton = 6;
CPMomentaryPushInButton = 7;
CPMomentaryPushButton = 0;
CPMomentaryLight = 7;
CPMomentaryPushButton = 0; // Deprecated, use CPMomentaryLightButton instead.
CPMomentaryLight = 7; // Deprecated, use CPMomentaryPushInButton instead.
CPNoButtonMask = 0;
CPContentsButtonMask = 1;
@@ -170,6 +170,10 @@ CPButtonImageOffset = 3.0;
{
_controlSize = CPRegularControlSize;
// Set defaults
_highlightsBy = CPChangeBackgroundCellMask;
_showsStateBy = CPNoCellMask;
_keyEquivalent = @"";
_keyEquivalentModifierMask = 0;
@@ -416,7 +420,7 @@ CPButtonImageOffset = 3.0;
[self setShowsStateBy:CPNoCellMask];
break;
case CPMomentaryChangeButton: [self setHighlightsBy:CPContentsCellMask];
case CPMomentaryChangeButton: [self setHighlightsBy:CPChangeGrayCellMask | CPContentsCellMask];
[self setShowsStateBy:CPNoCellMask];
break;
@@ -428,7 +432,7 @@ CPButtonImageOffset = 3.0;
[self setShowsStateBy:CPChangeBackgroundCellMask];
break;
case CPToggleButton: [self setHighlightsBy:CPPushInCellMask | CPContentsCellMask];
case CPToggleButton: [self setHighlightsBy:CPPushInCellMask];
[self setShowsStateBy:CPContentsCellMask];
break;
@@ -496,20 +500,22 @@ CPButtonImageOffset = 3.0;
- (BOOL)startTrackingAt:(CGPoint)aPoint
{
[self highlight:YES];
return [super startTrackingAt:aPoint];
}
- (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp
{
[self highlight:NO];
[self invalidateTimers];
[super stopTracking:lastPoint at:aPoint mouseIsUp:mouseIsUp];
if (mouseIsUp && CGRectContainsPoint([self bounds], aPoint))
[self setNextState];
// Keep highlight YES for CPOnState for CPOnOffButton type
var maskCheck = CPPushInCellMask | CPChangeGrayCellMask;
if (_highlightsBy == maskCheck && [self state] != CPOffState)
mouseIsUp = NO;
[super stopTracking:lastPoint at:aPoint mouseIsUp:mouseIsUp];
}
- (void)invalidateTimers
@@ -639,11 +645,27 @@ CPButtonImageOffset = 3.0;
var contentView = [self layoutEphemeralSubviewNamed:@"content-view"
positioned:CPWindowAbove
relativeToEphemeralSubviewNamed:@"bezel-view"];
relativeToEphemeralSubviewNamed:@"bezel-view"],
displayTitle = _title;
if (_alternateTitle)
{
switch (_highlightsBy)
{
case CPToggleButton:
displayTitle = ([self state] == CPOnState) ? _alternateTitle : _title;
break;
case CPMomentaryChangeButton:
case CPPushOnPushOffButton:
case CPOnOffButton:
displayTitle = ([self hasThemeState:CPThemeStateHighlighted]) ? _alternateTitle : _title;
break;
}
}
if (contentView)
{
[contentView setText:([self hasThemeState:CPThemeStateHighlighted] && _alternateTitle) ? _alternateTitle : _title];
[contentView setText:displayTitle];
[contentView setImage:[self currentValueForThemeAttribute:@"image"]];
[contentView setImageOffset:[self currentValueForThemeAttribute:@"image-offset"]];
+6 -3
View File
@@ -391,7 +391,10 @@ var CPControlBlackColor = [CPColor blackColor];
- (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp
{
[self highlight:NO];
if (mouseIsUp)
[self highlight:NO];
else
[self highlight:YES];
}
- (void)mouseDown:(CPEvent)anEvent
@@ -872,9 +875,9 @@ var CPControlValueKey = "CPControlValueKey",
CPControlActionKey = "CPControlActionKey",
CPControlSendActionOnKey = "CPControlSendActionOnKey",
CPControlSendsActionOnEndEditingKey = "CPControlSendsActionOnEndEditingKey";
CPControlSendsActionOnEndEditingKey = "CPControlSendsActionOnEndEditingKey",
var __Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
__Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
@implementation CPControl (CPCoding)
+13
View File
@@ -17,6 +17,10 @@ CPLogRegister(CPLogConsole);
@outlet CPButton button;
@outlet CPButton imageButton;
@outlet CPButton imageDisabledButton;
@outlet CPButton pushInButton;
@outlet CPButton pushOnOffButton;
@outlet CPButton toggleButton;
@outlet CPButton momentaryChangeButton;
@outlet CPCheckBox checkbox;
@outlet CPCheckBox multiCheckbox;
@outlet CPRadio radio1;
@@ -60,6 +64,15 @@ CPLogRegister(CPLogConsole);
[[radio1 radioGroup] setTarget:self];
[[radio1 radioGroup] setAction:@selector(radioGroupClicked:)];
[multiCheckbox setState:CPMixedState];
[pushInButton setButtonType:CPMomentaryLightButton];
[pushOnOffButton setButtonType:CPPushOnPushOffButton];
[toggleButton setButtonType:CPToggleButton];
[momentaryChangeButton setButtonType:CPMomentaryChangeButton];
[pushInButton setAlternateTitle:@"Should Not See Me"];
[toggleButton setAlternateTitle:@"Alternate Title For Toggle"];
[momentaryChangeButton setAlternateTitle:@"Changed!"];
}
- (void)setImagePosition:(id)sender
+4 -6
View File
@@ -2,11 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>CPButtonImageTest</string>
<key>CPPrincipalClass</key>
<string>CPApplication</string>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>CPButton</string>
</dict>
</plist>
File diff suppressed because one or more lines are too long
@@ -45,7 +45,7 @@
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{106, 672}, {380, 253}}</string>
<string key="NSWindowRect">{{71, 534}, {380, 253}}</string>
<int key="NSWTFlags">1954021376</int>
<string key="NSWindowTitle">CPButton Image Test</string>
<string key="NSWindowClass">NSWindow</string>
@@ -477,7 +477,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="65589413"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
@@ -487,7 +487,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSWindowTemplate" id="82286685">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{554, 742}, {318, 85}}</string>
<string key="NSWindowRect">{{97, 377}, {318, 85}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">Continuous Button Test</string>
<string key="NSWindowClass">NSWindow</string>
@@ -583,7 +583,127 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="443079749"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSWindowTemplate" id="1058741522">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{518, 603}, {271, 156}}</string>
<int key="NSWTFlags">611845120</int>
<string key="NSWindowTitle">CPButton Button Type Test</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="491587447">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="996741385">
<reference key="NSNextResponder" ref="491587447"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{25, 108}, {220, 32}}</string>
<reference key="NSSuperview" ref="491587447"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="381830375"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="925605870">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Momentary Push In (Normal)</string>
<reference key="NSSupport" ref="688777490"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="996741385"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="381830375">
<reference key="NSNextResponder" ref="491587447"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{25, 76}, {220, 32}}</string>
<reference key="NSSuperview" ref="491587447"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="405627061"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="55333648">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Push On / Push Off</string>
<reference key="NSSupport" ref="688777490"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="381830375"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="405627061">
<reference key="NSNextResponder" ref="491587447"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{25, 44}, {220, 32}}</string>
<reference key="NSSuperview" ref="491587447"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="387695629"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="87368337">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Toggle</string>
<reference key="NSSupport" ref="688777490"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="405627061"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="387695629">
<reference key="NSNextResponder" ref="491587447"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{25, 12}, {220, 32}}</string>
<reference key="NSSuperview" ref="491587447"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="723211816">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Momentary Change</string>
<reference key="NSSupport" ref="688777490"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="387695629"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</array>
<string key="NSFrameSize">{271, 156}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="996741385"/>
<string key="NSReuseIdentifierKey">_NS:20</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
@@ -710,6 +830,38 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">1209</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">pushOnOffButton</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="381830375"/>
</object>
<int key="connectionID">1220</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">pushInButton</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="996741385"/>
</object>
<int key="connectionID">1221</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">toggleButton</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="405627061"/>
</object>
<int key="connectionID">1222</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">momentaryChangeButton</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="387695629"/>
</object>
<int key="connectionID">1223</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -1026,6 +1178,77 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="object" ref="161380532"/>
<reference key="parent" ref="94523546"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1210</int>
<reference key="object" ref="1058741522"/>
<array class="NSMutableArray" key="children">
<reference ref="491587447"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1211</int>
<reference key="object" ref="491587447"/>
<array class="NSMutableArray" key="children">
<reference ref="996741385"/>
<reference ref="381830375"/>
<reference ref="405627061"/>
<reference ref="387695629"/>
</array>
<reference key="parent" ref="1058741522"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1212</int>
<reference key="object" ref="996741385"/>
<array class="NSMutableArray" key="children">
<reference ref="925605870"/>
</array>
<reference key="parent" ref="491587447"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1213</int>
<reference key="object" ref="925605870"/>
<reference key="parent" ref="996741385"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1214</int>
<reference key="object" ref="381830375"/>
<array class="NSMutableArray" key="children">
<reference ref="55333648"/>
</array>
<reference key="parent" ref="491587447"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1215</int>
<reference key="object" ref="55333648"/>
<reference key="parent" ref="381830375"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1216</int>
<reference key="object" ref="405627061"/>
<array class="NSMutableArray" key="children">
<reference ref="87368337"/>
</array>
<reference key="parent" ref="491587447"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1217</int>
<reference key="object" ref="87368337"/>
<reference key="parent" ref="405627061"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1218</int>
<reference key="object" ref="387695629"/>
<array class="NSMutableArray" key="children">
<reference ref="723211816"/>
</array>
<reference key="parent" ref="491587447"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1219</int>
<reference key="object" ref="723211816"/>
<reference key="parent" ref="387695629"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -1074,6 +1297,17 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="1197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1207.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1208.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="1210.NSWindowTemplate.visibleAtLaunch"/>
<string key="1211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1214.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1215.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1218.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1219.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="371.IBNSWindowAutoPositionCentersHorizontal"/>
<boolean value="NO" key="371.IBNSWindowAutoPositionCentersVertical"/>
<string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1086,7 +1320,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">1209</int>
<int key="maxID">1223</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1118,10 +1352,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="clickCount">NSTextField</string>
<string key="imageButton">NSButton</string>
<string key="imageDisabledButton">NSButton</string>
<string key="momentaryChangeButton">NSButton</string>
<string key="multiCheckbox">CPCheckBox</string>
<string key="positionMenu">NSPopUpButton</string>
<string key="pushInButton">NSButton</string>
<string key="pushOnOffButton">NSButton</string>
<string key="radio1">CPRadio</string>
<string key="radio2">CPRadio</string>
<string key="toggleButton">NSButton</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="button">
@@ -1144,6 +1382,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="name">imageDisabledButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="momentaryChangeButton">
<string key="name">momentaryChangeButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="multiCheckbox">
<string key="name">multiCheckbox</string>
<string key="candidateClassName">CPCheckBox</string>
@@ -1152,6 +1394,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="name">positionMenu</string>
<string key="candidateClassName">NSPopUpButton</string>
</object>
<object class="IBToOneOutletInfo" key="pushInButton">
<string key="name">pushInButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="pushOnOffButton">
<string key="name">pushOnOffButton</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo" key="radio1">
<string key="name">radio1</string>
<string key="candidateClassName">CPRadio</string>
@@ -1160,6 +1410,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="name">radio2</string>
<string key="candidateClassName">CPRadio</string>
</object>
<object class="IBToOneOutletInfo" key="toggleButton">
<string key="name">toggleButton</string>
<string key="candidateClassName">NSButton</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
+63 -29
View File
@@ -1,28 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
TableCibTest
CPButton
Created by Francisco Tolmasky on July 5, 2009.
Copyright 2009, 280 North, Inc. All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<title>CPButton Image Test</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type = "text/javascript">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="Resources/icon.png" />
<link rel="apple-touch-startup-image" href="Resources/default.png" />
<title>CPButton</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</script>
<script src = "Frameworks/Debug/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type = "text/css">
<script type="text/javascript">
objj_msgSend_reset();
// DEBUG OPTIONS:
// Uncomment to enable printing of backtraces on exceptions:
//objj_msgSend_decorate(objj_backtrace_decorator);
// Uncomment to supress exceptions that take place inside a message
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
// Uncomment to enable runtime type checking:
//objj_msgSend_decorate(objj_typecheck_decorator);
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
@@ -40,29 +72,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPButton Image Test...</p></div>");
</script>
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPButton...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
+38 -29
View File
@@ -1,27 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
TableCibTest
CPButton
Created by Francisco Tolmasky on July 5, 2009.
Copyright 2009, 280 North, Inc. All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<title>CPButton Image Test</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type = "text/javascript">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="Resources/icon.png" />
<link rel="apple-touch-startup-image" href="Resources/default.png" />
<title>CPButton</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type = "text/css">
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
@@ -39,29 +46,31 @@
</head>
<body style="">
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type = "text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPButton Image Test...</p></div>");
</script>
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading CPButton...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</noscript>
</noscript>
</div>
</div>
</body>
Executable → Regular
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* AppController.j
* TableCibTest
* CPButton
*
* Created by Francisco Tolmasky on July 5, 2009.
* Copyright 2009, 280 North, Inc. All rights reserved.