Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

initial commit - project structure

  • Loading branch information...
commit 37ef0bc875f8c65c3ce14e380e88b4baee9b17e4 0 parents
Anthony Decena Mindelusions authored

Showing 1,285 changed files with 41,197 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  CHANGELOG.txt
  2. +219 0 LICENSE
  3. +1 0  LICENSE.txt
  4. +14 0 README
  5. BIN  Resources/android/appicon.png
  6. BIN  Resources/android/default.png
  7. BIN  Resources/android/images/res-long-land-hdpi/default.png
  8. BIN  Resources/android/images/res-long-land-ldpi/default.png
  9. BIN  Resources/android/images/res-long-port-hdpi/default.png
  10. BIN  Resources/android/images/res-long-port-ldpi/default.png
  11. BIN  Resources/android/images/res-notlong-land-hdpi/default.png
  12. BIN  Resources/android/images/res-notlong-land-ldpi/default.png
  13. BIN  Resources/android/images/res-notlong-land-mdpi/default.png
  14. BIN  Resources/android/images/res-notlong-port-hdpi/default.png
  15. BIN  Resources/android/images/res-notlong-port-ldpi/default.png
  16. BIN  Resources/android/images/res-notlong-port-mdpi/default.png
  17. +50 0 Resources/app.js
  18. +17 0 Resources/app.jss
  19. +4 0 Resources/common.jss
  20. BIN  Resources/images/tabs/KS_bg.png
  21. BIN  Resources/images/tabs/KS_nav_mashup.png
  22. BIN  Resources/images/tabs/KS_nav_phone.png
  23. BIN  Resources/images/tabs/KS_nav_platform.png
  24. BIN  Resources/images/tabs/KS_nav_ui.png
  25. BIN  Resources/images/tabs/KS_nav_views.png
  26. BIN  Resources/iphone/Default-Landscape.png
  27. BIN  Resources/iphone/Default-Portrait.png
  28. BIN  Resources/iphone/Default.png
  29. BIN  Resources/iphone/Default@2x.png
  30. BIN  Resources/iphone/appicon.png
  31. BIN  Resources/mobileweb/Default-Landscape.jpg
  32. BIN  Resources/mobileweb/Default-Landscape.png
  33. BIN  Resources/mobileweb/Default-Portrait.jpg
  34. BIN  Resources/mobileweb/Default-Portrait.png
  35. BIN  Resources/mobileweb/Default.jpg
  36. BIN  Resources/mobileweb/Default.png
  37. BIN  Resources/mobileweb/appicon.png
  38. +61 0 Resources/ui/common/ApplicationTabGroup.js
  39. +10 0 Resources/ui/common/BaseUIWindow.js
  40. +10 0 Resources/ui/common/ControlsWindow.js
  41. +10 0 Resources/ui/common/MashupsWindow.js
  42. +10 0 Resources/ui/common/PhoneWindow.js
  43. +10 0 Resources/ui/common/PlatformWindow.js
  44. +27 0 Resources/ui/handheld/android/ApplicationWindow.js
  45. +27 0 Resources/ui/handheld/ios/ApplicationWindow.js
  46. +27 0 Resources/ui/tablet/ApplicationWindow.js
  47. +8 0 build/android/.classpath
  48. +6 0 build/android/.gitignore
  49. +33 0 build/android/.project
  50. +22 0 build/android/default.properties
  51. +48 0 build/iphone/Classes/AFOpenFlow/AFItemView.h
  52. +97 0 build/iphone/Classes/AFOpenFlow/AFItemView.m
  53. +33 0 build/iphone/Classes/AFOpenFlow/AFOpenFlowConstants.h
  54. +87 0 build/iphone/Classes/AFOpenFlow/AFOpenFlowView.h
  55. +474 0 build/iphone/Classes/AFOpenFlow/AFOpenFlowView.m
  56. +37 0 build/iphone/Classes/AFOpenFlow/AFUIImageReflection.h
  57. +102 0 build/iphone/Classes/AFOpenFlow/AFUIImageReflection.m
  58. +38 0 build/iphone/Classes/AFOpenFlow/UIImageExtras.h
  59. +80 0 build/iphone/Classes/AFOpenFlow/UIImageExtras.m
  60. +19 0 build/iphone/Classes/APIModule.h
  61. +120 0 build/iphone/Classes/APIModule.m
  62. +104 0 build/iphone/Classes/AQRecorder.h
  63. +361 0 build/iphone/Classes/AQRecorder.mm
  64. +35 0 build/iphone/Classes/ASI/ASIAuthenticationDialog.h
  65. +487 0 build/iphone/Classes/ASI/ASIAuthenticationDialog.m
  66. +103 0 build/iphone/Classes/ASI/ASICacheDelegate.h
  67. +42 0 build/iphone/Classes/ASI/ASIDataCompressor.h
  68. +219 0 build/iphone/Classes/ASI/ASIDataCompressor.m
  69. +41 0 build/iphone/Classes/ASI/ASIDataDecompressor.h
  70. +218 0 build/iphone/Classes/ASI/ASIDataDecompressor.m
  71. +42 0 build/iphone/Classes/ASI/ASIDownloadCache.h
  72. +511 0 build/iphone/Classes/ASI/ASIDownloadCache.m
  73. +76 0 build/iphone/Classes/ASI/ASIFormDataRequest.h
  74. +361 0 build/iphone/Classes/ASI/ASIFormDataRequest.m
  75. +1,010 0 build/iphone/Classes/ASI/ASIHTTPRequest.h
  76. +5,124 0 build/iphone/Classes/ASI/ASIHTTPRequest.m
  77. +37 0 build/iphone/Classes/ASI/ASIHTTPRequestConfig.h
  78. +35 0 build/iphone/Classes/ASI/ASIHTTPRequestDelegate.h
  79. +26 0 build/iphone/Classes/ASI/ASIInputStream.h
  80. +136 0 build/iphone/Classes/ASI/ASIInputStream.m
  81. +108 0 build/iphone/Classes/ASI/ASINetworkQueue.h
  82. +343 0 build/iphone/Classes/ASI/ASINetworkQueue.m
  83. +38 0 build/iphone/Classes/ASI/ASIProgressDelegate.h
  84. +193 0 build/iphone/Classes/ASI/Reachability.h
  85. +817 0 build/iphone/Classes/ASI/Reachability.m
  86. +19 0 build/iphone/Classes/AccelerometerModule.h
  87. +48 0 build/iphone/Classes/AccelerometerModule.m
  88. +22 0 build/iphone/Classes/AnalyticsModule.h
  89. +710 0 build/iphone/Classes/AnalyticsModule.mm
  90. +53 0 build/iphone/Classes/AppModule.h
  91. +436 0 build/iphone/Classes/AppModule.m
  92. +17 0 build/iphone/Classes/ApplicationDefaults.h
  93. +20 0 build/iphone/Classes/ApplicationDefaults.m
  94. +11 0 build/iphone/Classes/ApplicationMods.h
  95. +15 0 build/iphone/Classes/ApplicationMods.m
  96. +10 0 build/iphone/Classes/ApplicationRouting.h
  97. +19 0 build/iphone/Classes/ApplicationRouting.m
  98. +690 0 build/iphone/Classes/AsyncSocket.h
  99. +4,368 0 build/iphone/Classes/AsyncSocket.m
  100. +366 0 build/iphone/Classes/AsyncUdpSocket.h
  101. +2,343 0 build/iphone/Classes/AsyncUdpSocket.m
  102. +138 0 build/iphone/Classes/AudioStreamer/AudioStreamer.h
  103. +181 0 build/iphone/Classes/AudioStreamer/AudioStreamer.m
  104. +87 0 build/iphone/Classes/AudioStreamer/AudioStreamerBC.h
  105. +1,534 0 build/iphone/Classes/AudioStreamer/AudioStreamerBC.m
  106. +108 0 build/iphone/Classes/AudioStreamer/AudioStreamerCUR.h
  107. +1,805 0 build/iphone/Classes/AudioStreamer/AudioStreamerCUR.m
  108. +232 0 build/iphone/Classes/Base64Transcoder.c
  109. +44 0 build/iphone/Classes/Base64Transcoder.h
  110. +36 0 build/iphone/Classes/Bridge.h
  111. +84 0 build/iphone/Classes/Bridge.m
  112. +94 0 build/iphone/Classes/CADebugMacros.cpp
  113. +443 0 build/iphone/Classes/CADebugMacros.h
  114. +74 0 build/iphone/Classes/CAMath.h
  115. +554 0 build/iphone/Classes/CAStreamBasicDescription.cpp
  116. +312 0 build/iphone/Classes/CAStreamBasicDescription.h
  117. +56 0 build/iphone/Classes/CAXException.cpp
  118. +218 0 build/iphone/Classes/CAXException.h
  119. +42 0 build/iphone/Classes/CodecModule.h
  120. +351 0 build/iphone/Classes/CodecModule.m
  121. +50 0 build/iphone/Classes/ContactsModule.h
  122. +458 0 build/iphone/Classes/ContactsModule.m
  123. +26 0 build/iphone/Classes/DatabaseModule.h
  124. +52 0 build/iphone/Classes/DatabaseModule.m
  125. +25 0 build/iphone/Classes/FBConnect/FBConnect.h
  126. +165 0 build/iphone/Classes/FBConnect/FBDialog.h
  127. +650 0 build/iphone/Classes/FBConnect/FBDialog.m
  128. +41 0 build/iphone/Classes/FBConnect/FBLoginButton.h
  129. +92 0 build/iphone/Classes/FBConnect/FBLoginButton.m
  130. +47 0 build/iphone/Classes/FBConnect/FBLoginDialog.h
  131. +115 0 build/iphone/Classes/FBConnect/FBLoginDialog.m
  132. +121 0 build/iphone/Classes/FBConnect/FBRequest.h
  133. +358 0 build/iphone/Classes/FBConnect/FBRequest.m
  134. +126 0 build/iphone/Classes/FBConnect/Facebook.h
  135. +660 0 build/iphone/Classes/FBConnect/Facebook.m
  136. +45 0 build/iphone/Classes/FacebookModule.h
  137. +646 0 build/iphone/Classes/FacebookModule.m
  138. +31 0 build/iphone/Classes/FilesystemModule.h
  139. +176 0 build/iphone/Classes/FilesystemModule.m
  140. +235 0 build/iphone/Classes/GDataXMLNode.h
  141. +1,938 0 build/iphone/Classes/GDataXMLNode.m
  142. +70 0 build/iphone/Classes/GeolocationModule.h
  143. +821 0 build/iphone/Classes/GeolocationModule.mm
  144. +30 0 build/iphone/Classes/GestureModule.h
  145. +115 0 build/iphone/Classes/GestureModule.m
  146. +84 0 build/iphone/Classes/ImageLoader.h
  147. +809 0 build/iphone/Classes/ImageLoader.m
  148. +49 0 build/iphone/Classes/JSON/JSON.h
  149. +8 0 build/iphone/Classes/JSON/MASS-TODO
  150. +70 0 build/iphone/Classes/JSON/NSObject+SBJSON.h
  151. +54 0 build/iphone/Classes/JSON/NSObject+SBJSON.m
  152. +59 0 build/iphone/Classes/JSON/NSString+SBJSON.h
  153. +56 0 build/iphone/Classes/JSON/NSString+SBJSON.m
  154. +76 0 build/iphone/Classes/JSON/SBJSON.h
  155. +213 0 build/iphone/Classes/JSON/SBJSON.m
  156. +87 0 build/iphone/Classes/JSON/SBJsonBase.h
  157. +79 0 build/iphone/Classes/JSON/SBJsonBase.m
  158. +87 0 build/iphone/Classes/JSON/SBJsonParser.h
  159. +476 0 build/iphone/Classes/JSON/SBJsonParser.m
  160. +129 0 build/iphone/Classes/JSON/SBJsonWriter.h
  161. +238 0 build/iphone/Classes/JSON/SBJsonWriter.m
  162. +73 0 build/iphone/Classes/KrollBridge.h
  163. +955 0 build/iphone/Classes/KrollBridge.mm
  164. +81 0 build/iphone/Classes/KrollCallback.h
  165. +249 0 build/iphone/Classes/KrollCallback.m
  166. +181 0 build/iphone/Classes/KrollContext.h
  167. +1,384 0 build/iphone/Classes/KrollContext.mm
  168. +69 0 build/iphone/Classes/KrollCoverage.h
  169. +293 0 build/iphone/Classes/KrollCoverage.m
  170. +52 0 build/iphone/Classes/KrollMethod.h
  171. +323 0 build/iphone/Classes/KrollMethod.m
  172. +26 0 build/iphone/Classes/KrollMethodDelegate.h
  173. +48 0 build/iphone/Classes/KrollMethodDelegate.m
  174. +87 0 build/iphone/Classes/KrollObject.h
Sorry, we could not display the entire diff because too many files (1,285) changed.
1  CHANGELOG.txt
... ... @@ -0,0 +1 @@
  1 +Place your change log text here. This file will be incorporated with your app at package time.
219 LICENSE
... ... @@ -0,0 +1,219 @@
  1 +Copyright 2009 Appcelerator, Inc.
  2 +
  3 + Licensed under the Apache License, Version 2.0 (the "License");
  4 + you may not use this file except in compliance with the License.
  5 + You may obtain a copy of the License at
  6 +
  7 + http://www.apache.org/licenses/LICENSE-2.0
  8 +
  9 + (or the full text of the license is below)
  10 +
  11 + Unless required by applicable law or agreed to in writing, software
  12 + distributed under the License is distributed on an "AS IS" BASIS,
  13 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 + See the License for the specific language governing permissions and
  15 + limitations under the License.
  16 +
  17 +
  18 +
  19 + Apache License
  20 + Version 2.0, January 2004
  21 + http://www.apache.org/licenses/
  22 +
  23 +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  24 +
  25 +1. Definitions.
  26 +
  27 + "License" shall mean the terms and conditions for use, reproduction,
  28 + and distribution as defined by Sections 1 through 9 of this document.
  29 +
  30 + "Licensor" shall mean the copyright owner or entity authorized by
  31 + the copyright owner that is granting the License.
  32 +
  33 + "Legal Entity" shall mean the union of the acting entity and all
  34 + other entities that control, are controlled by, or are under common
  35 + control with that entity. For the purposes of this definition,
  36 + "control" means (i) the power, direct or indirect, to cause the
  37 + direction or management of such entity, whether by contract or
  38 + otherwise, or (ii) ownership of fifty percent (50%) or more of the
  39 + outstanding shares, or (iii) beneficial ownership of such entity.
  40 +
  41 + "You" (or "Your") shall mean an individual or Legal Entity
  42 + exercising permissions granted by this License.
  43 +
  44 + "Source" form shall mean the preferred form for making modifications,
  45 + including but not limited to software source code, documentation
  46 + source, and configuration files.
  47 +
  48 + "Object" form shall mean any form resulting from mechanical
  49 + transformation or translation of a Source form, including but
  50 + not limited to compiled object code, generated documentation,
  51 + and conversions to other media types.
  52 +
  53 + "Work" shall mean the work of authorship, whether in Source or
  54 + Object form, made available under the License, as indicated by a
  55 + copyright notice that is included in or attached to the work
  56 + (an example is provided in the Appendix below).
  57 +
  58 + "Derivative Works" shall mean any work, whether in Source or Object
  59 + form, that is based on (or derived from) the Work and for which the
  60 + editorial revisions, annotations, elaborations, or other modifications
  61 + represent, as a whole, an original work of authorship. For the purposes
  62 + of this License, Derivative Works shall not include works that remain
  63 + separable from, or merely link (or bind by name) to the interfaces of,
  64 + the Work and Derivative Works thereof.
  65 +
  66 + "Contribution" shall mean any work of authorship, including
  67 + the original version of the Work and any modifications or additions
  68 + to that Work or Derivative Works thereof, that is intentionally
  69 + submitted to Licensor for inclusion in the Work by the copyright owner
  70 + or by an individual or Legal Entity authorized to submit on behalf of
  71 + the copyright owner. For the purposes of this definition, "submitted"
  72 + means any form of electronic, verbal, or written communication sent
  73 + to the Licensor or its representatives, including but not limited to
  74 + communication on electronic mailing lists, source code control systems,
  75 + and issue tracking systems that are managed by, or on behalf of, the
  76 + Licensor for the purpose of discussing and improving the Work, but
  77 + excluding communication that is conspicuously marked or otherwise
  78 + designated in writing by the copyright owner as "Not a Contribution."
  79 +
  80 + "Contributor" shall mean Licensor and any individual or Legal Entity
  81 + on behalf of whom a Contribution has been received by Licensor and
  82 + subsequently incorporated within the Work.
  83 +
  84 +2. Grant of Copyright License. Subject to the terms and conditions of
  85 + this License, each Contributor hereby grants to You a perpetual,
  86 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  87 + copyright license to reproduce, prepare Derivative Works of,
  88 + publicly display, publicly perform, sublicense, and distribute the
  89 + Work and such Derivative Works in Source or Object form.
  90 +
  91 +3. Grant of Patent License. Subject to the terms and conditions of
  92 + this License, each Contributor hereby grants to You a perpetual,
  93 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  94 + (except as stated in this section) patent license to make, have made,
  95 + use, offer to sell, sell, import, and otherwise transfer the Work,
  96 + where such license applies only to those patent claims licensable
  97 + by such Contributor that are necessarily infringed by their
  98 + Contribution(s) alone or by combination of their Contribution(s)
  99 + with the Work to which such Contribution(s) was submitted. If You
  100 + institute patent litigation against any entity (including a
  101 + cross-claim or counterclaim in a lawsuit) alleging that the Work
  102 + or a Contribution incorporated within the Work constitutes direct
  103 + or contributory patent infringement, then any patent licenses
  104 + granted to You under this License for that Work shall terminate
  105 + as of the date such litigation is filed.
  106 +
  107 +4. Redistribution. You may reproduce and distribute copies of the
  108 + Work or Derivative Works thereof in any medium, with or without
  109 + modifications, and in Source or Object form, provided that You
  110 + meet the following conditions:
  111 +
  112 + (a) You must give any other recipients of the Work or
  113 + Derivative Works a copy of this License; and
  114 +
  115 + (b) You must cause any modified files to carry prominent notices
  116 + stating that You changed the files; and
  117 +
  118 + (c) You must retain, in the Source form of any Derivative Works
  119 + that You distribute, all copyright, patent, trademark, and
  120 + attribution notices from the Source form of the Work,
  121 + excluding those notices that do not pertain to any part of
  122 + the Derivative Works; and
  123 +
  124 + (d) If the Work includes a "NOTICE" text file as part of its
  125 + distribution, then any Derivative Works that You distribute must
  126 + include a readable copy of the attribution notices contained
  127 + within such NOTICE file, excluding those notices that do not
  128 + pertain to any part of the Derivative Works, in at least one
  129 + of the following places: within a NOTICE text file distributed
  130 + as part of the Derivative Works; within the Source form or
  131 + documentation, if provided along with the Derivative Works; or,
  132 + within a display generated by the Derivative Works, if and
  133 + wherever such third-party notices normally appear. The contents
  134 + of the NOTICE file are for informational purposes only and
  135 + do not modify the License. You may add Your own attribution
  136 + notices within Derivative Works that You distribute, alongside
  137 + or as an addendum to the NOTICE text from the Work, provided
  138 + that such additional attribution notices cannot be construed
  139 + as modifying the License.
  140 +
  141 + You may add Your own copyright statement to Your modifications and
  142 + may provide additional or different license terms and conditions
  143 + for use, reproduction, or distribution of Your modifications, or
  144 + for any such Derivative Works as a whole, provided Your use,
  145 + reproduction, and distribution of the Work otherwise complies with
  146 + the conditions stated in this License.
  147 +
  148 +5. Submission of Contributions. Unless You explicitly state otherwise,
  149 + any Contribution intentionally submitted for inclusion in the Work
  150 + by You to the Licensor shall be under the terms and conditions of
  151 + this License, without any additional terms or conditions.
  152 + Notwithstanding the above, nothing herein shall supersede or modify
  153 + the terms of any separate license agreement you may have executed
  154 + with Licensor regarding such Contributions.
  155 +
  156 +6. Trademarks. This License does not grant permission to use the trade
  157 + names, trademarks, service marks, or product names of the Licensor,
  158 + except as required for reasonable and customary use in describing the
  159 + origin of the Work and reproducing the content of the NOTICE file.
  160 +
  161 +7. Disclaimer of Warranty. Unless required by applicable law or
  162 + agreed to in writing, Licensor provides the Work (and each
  163 + Contributor provides its Contributions) on an "AS IS" BASIS,
  164 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  165 + implied, including, without limitation, any warranties or conditions
  166 + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  167 + PARTICULAR PURPOSE. You are solely responsible for determining the
  168 + appropriateness of using or redistributing the Work and assume any
  169 + risks associated with Your exercise of permissions under this License.
  170 +
  171 +8. Limitation of Liability. In no event and under no legal theory,
  172 + whether in tort (including negligence), contract, or otherwise,
  173 + unless required by applicable law (such as deliberate and grossly
  174 + negligent acts) or agreed to in writing, shall any Contributor be
  175 + liable to You for damages, including any direct, indirect, special,
  176 + incidental, or consequential damages of any character arising as a
  177 + result of this License or out of the use or inability to use the
  178 + Work (including but not limited to damages for loss of goodwill,
  179 + work stoppage, computer failure or malfunction, or any and all
  180 + other commercial damages or losses), even if such Contributor
  181 + has been advised of the possibility of such damages.
  182 +
  183 +9. Accepting Warranty or Additional Liability. While redistributing
  184 + the Work or Derivative Works thereof, You may choose to offer,
  185 + and charge a fee for, acceptance of support, warranty, indemnity,
  186 + or other liability obligations and/or rights consistent with this
  187 + License. However, in accepting such obligations, You may act only
  188 + on Your own behalf and on Your sole responsibility, not on behalf
  189 + of any other Contributor, and only if You agree to indemnify,
  190 + defend, and hold each Contributor harmless for any liability
  191 + incurred by, or claims asserted against, such Contributor by reason
  192 + of your accepting any such warranty or additional liability.
  193 +
  194 +END OF TERMS AND CONDITIONS
  195 +
  196 +APPENDIX: How to apply the Apache License to your work.
  197 +
  198 + To apply the Apache License to your work, attach the following
  199 + boilerplate notice, with the fields enclosed by brackets "[]"
  200 + replaced with your own identifying information. (Don't include
  201 + the brackets!) The text should be enclosed in the appropriate
  202 + comment syntax for the file format. We also recommend that a
  203 + file or class name and description of purpose be included on the
  204 + same "printed page" as the copyright notice for easier
  205 + identification within third-party archives.
  206 +
  207 +Copyright [yyyy] [name of copyright owner]
  208 +
  209 +Licensed under the Apache License, Version 2.0 (the "License");
  210 +you may not use this file except in compliance with the License.
  211 +You may obtain a copy of the License at
  212 +
  213 + http://www.apache.org/licenses/LICENSE-2.0
  214 +
  215 +Unless required by applicable law or agreed to in writing, software
  216 +distributed under the License is distributed on an "AS IS" BASIS,
  217 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  218 +See the License for the specific language governing permissions and
  219 +limitations under the License.
1  LICENSE.txt
... ... @@ -0,0 +1 @@
  1 +Place your license text here. This file will be incorporated with your app at package time.
14 README
... ... @@ -0,0 +1,14 @@
  1 +Welcome to your Appcelerator Titanium Mobile Project
  2 +
  3 +This is tabbed application, consisting of multiple stacks of windows associated with tabs in a tab group. A starting point for tab-based application with multiple top-level windows. Requires Titanium Mobile SDK 1.8.0+.
  4 +
  5 +----------------------------------
  6 +Stuff our legal folk make us say:
  7 +
  8 +Appcelerator, Appcelerator Titanium and associated marks and logos are
  9 +trademarks of Appcelerator, Inc.
  10 +
  11 +Titanium is Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
  12 +
  13 +Titanium is licensed under the Apache Public License (Version 2). Please
  14 +see the LICENSE file for the full license.
BIN  Resources/android/appicon.png
0  Resources/android/appicon.png
BIN  Resources/android/default.png
0  Resources/android/default.png
BIN  Resources/android/images/res-long-land-hdpi/default.png
0  Resources/android/images/res-long-land-hdpi/default.png
BIN  Resources/android/images/res-long-land-ldpi/default.png
0  Resources/android/images/res-long-land-ldpi/default.png
0  Resources/android/images/res-long-port-hdpi/default.png
BIN  Resources/android/images/res-long-port-hdpi/default.png
BIN  Resources/android/images/res-long-port-ldpi/default.png
0  Resources/android/images/res-long-port-ldpi/default.png
BIN  Resources/android/images/res-notlong-land-hdpi/default.png
0  Resources/android/images/res-notlong-land-hdpi/default.png
0  Resources/android/images/res-notlong-land-ldpi/default.png
BIN  Resources/android/images/res-notlong-land-ldpi/default.png
BIN  Resources/android/images/res-notlong-land-mdpi/default.png
0  Resources/android/images/res-notlong-land-mdpi/default.png
BIN  Resources/android/images/res-notlong-port-hdpi/default.png
0  Resources/android/images/res-notlong-port-hdpi/default.png
BIN  Resources/android/images/res-notlong-port-ldpi/default.png
0  Resources/android/images/res-notlong-port-ldpi/default.png
0  Resources/android/images/res-notlong-port-mdpi/default.png
BIN  Resources/android/images/res-notlong-port-mdpi/default.png
50 Resources/app.js
... ... @@ -0,0 +1,50 @@
  1 +/*
  2 + * A tabbed application, consisting of multiple stacks of windows associated with tabs in a tab group.
  3 + * A starting point for tab-based application with multiple top-level windows.
  4 + * Requires Titanium Mobile SDK 1.8.0+.
  5 + *
  6 + * In app.js, we generally take care of a few things:
  7 + * - Bootstrap the application with any data we need
  8 + * - Check for dependencies like device type, platform version or network connection
  9 + * - Require and open our top-level UI component
  10 + *
  11 + */
  12 +
  13 +//bootstrap and check dependencies
  14 +if (Ti.version < 1.8 ) {
  15 + alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');
  16 +}
  17 +else if (Ti.Platform.osname === 'mobileweb') {
  18 + alert('Mobile web is not yet supported by this template');
  19 +}
  20 +
  21 +// This is a single context application with mutliple windows in a stack
  22 +(function() {
  23 + //determine platform and form factor and render approproate components
  24 + var osname = Ti.Platform.osname,
  25 + version = Ti.Platform.version,
  26 + height = Ti.Platform.displayCaps.platformHeight,
  27 + width = Ti.Platform.displayCaps.platformWidth;
  28 +
  29 + //considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide
  30 + //yourself what you consider a tablet form factor for android
  31 + var isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899));
  32 +
  33 + var Window;
  34 + if (isTablet) {
  35 + Window = require('ui/tablet/ApplicationWindow');
  36 + }
  37 + else {
  38 + // iPhone makes use of the platform-specific navigation controller,
  39 + // all other platforms follow a similar UI pattern
  40 + if (osname === 'iphone') {
  41 + Window = require('ui/handheld/ios/ApplicationWindow');
  42 + }
  43 + else {
  44 + Window = require('ui/handheld/android/ApplicationWindow');
  45 + }
  46 + }
  47 +
  48 + var ApplicationTabGroup = require('ui/common/ApplicationTabGroup');
  49 + new ApplicationTabGroup(Window).open();
  50 +})();
17 Resources/app.jss
... ... @@ -0,0 +1,17 @@
  1 +@import 'common.jss';
  2 +
  3 +#tabGroup1 {
  4 + barColor:#336699;
  5 +}
  6 +
  7 +.win1 {
  8 + url:'main_windows/base_ui.js';
  9 + titleid:'base_ui_title';
  10 + titleImage:'images/appcelerator_small.png';
  11 +}
  12 +
  13 +#tab1 {
  14 + icon:'images/tabs/KS_nav_views.png';
  15 + titleid:'base_ui_title';
  16 +}
  17 +
4 Resources/common.jss
... ... @@ -0,0 +1,4 @@
  1 +/**
  2 + * common stylesheet defines
  3 + */
  4 +
BIN  Resources/images/tabs/KS_bg.png
0  Resources/images/tabs/KS_bg.png
0  Resources/images/tabs/KS_nav_mashup.png
BIN  Resources/images/tabs/KS_nav_mashup.png
0  Resources/images/tabs/KS_nav_phone.png
BIN  Resources/images/tabs/KS_nav_phone.png
BIN  Resources/images/tabs/KS_nav_platform.png
0  Resources/images/tabs/KS_nav_platform.png
0  Resources/images/tabs/KS_nav_ui.png
BIN  Resources/images/tabs/KS_nav_ui.png
0  Resources/images/tabs/KS_nav_views.png
BIN  Resources/images/tabs/KS_nav_views.png
0  Resources/iphone/Default-Landscape.png
BIN  Resources/iphone/Default-Landscape.png
BIN  Resources/iphone/Default-Portrait.png
0  Resources/iphone/Default-Portrait.png
BIN  Resources/iphone/Default.png
0  Resources/iphone/Default.png
BIN  Resources/iphone/Default@2x.png
0  Resources/iphone/Default@2x.png
BIN  Resources/iphone/appicon.png
0  Resources/iphone/appicon.png
0  Resources/mobileweb/Default-Landscape.jpg
BIN  Resources/mobileweb/Default-Landscape.jpg
BIN  Resources/mobileweb/Default-Landscape.png
0  Resources/mobileweb/Default-Landscape.png
0  Resources/mobileweb/Default-Portrait.jpg
BIN  Resources/mobileweb/Default-Portrait.jpg
0  Resources/mobileweb/Default-Portrait.png
BIN  Resources/mobileweb/Default-Portrait.png
0  Resources/mobileweb/Default.jpg
BIN  Resources/mobileweb/Default.jpg
0  Resources/mobileweb/Default.png
BIN  Resources/mobileweb/Default.png
BIN  Resources/mobileweb/appicon.png
0  Resources/mobileweb/appicon.png
61 Resources/ui/common/ApplicationTabGroup.js
... ... @@ -0,0 +1,61 @@
  1 +function ApplicationTabGroup(Window) {
  2 + //create module instance
  3 + var self = Ti.UI.createTabGroup(),
  4 + BaseUIWindow = require('ui/common/BaseUIWindow'),
  5 + ControlsWindow = require('ui/common/ControlsWindow'),
  6 + PhoneWindow = require('ui/common/PhoneWindow'),
  7 + PlatformWindow = require('ui/common/PlatformWindow'),
  8 + MashupsWindow = require('ui/common/MashupsWindow');
  9 +
  10 + //create app tabs
  11 + var baseUIWin = new BaseUIWindow(L('base_ui_title')),
  12 + controlsWin = new ControlsWindow(L('controls_win_title')),
  13 + phoneWin = new PhoneWindow(L('phone_win_title')),
  14 + platformWin = new PlatformWindow(L('platform_win_title')),
  15 + mashupsWin = new MashupsWindow(L('mashups_win_title'));
  16 +
  17 + var baseUITab = Ti.UI.createTab({
  18 + title: L('base_ui_title'),
  19 + icon: '/images/tabs/KS_nav_ui.png',
  20 + window: baseUIWin
  21 + });
  22 + baseUIWin.containingTab = baseUITab;
  23 +
  24 + var controlsTab = Ti.UI.createTab({
  25 + title: L('controls_win_title'),
  26 + icon: '/images/tabs/KS_nav_views.png',
  27 + window: controlsWin
  28 + });
  29 + controlsWin.containingTab = controlsTab;
  30 +
  31 + var phoneTab = Ti.UI.createTab({
  32 + title:L('phone_win_title'),
  33 + icon:'/images/tabs/KS_nav_phone.png',
  34 + window:phoneWin
  35 + });
  36 + phoneWin.containingTab = phoneTab;
  37 +
  38 + var platformTab = Ti.UI.createTab({
  39 + title:L('platform_win_title'),
  40 + icon:'/images/tabs/KS_nav_platform.png',
  41 + window:platformWin
  42 + });
  43 + platformWin.containingTab = platformTab;
  44 +
  45 + var mashupsTab = Ti.UI.createTab({
  46 + title:L('mashups_win_title'),
  47 + icon:'/images/tabs/KS_nav_mashup.png',
  48 + window:mashupsWin
  49 + });
  50 + mashupsWin.containingTab = mashupsTab;
  51 +
  52 + self.addTab(baseUITab);
  53 + self.addTab(controlsTab);
  54 + self.addTab(phoneTab);
  55 + self.addTab(platformTab);
  56 + self.addTab(mashupsTab);
  57 +
  58 + return self;
  59 +};
  60 +
  61 +module.exports = ApplicationTabGroup;
10 Resources/ui/common/BaseUIWindow.js
... ... @@ -0,0 +1,10 @@
  1 +function BaseUIWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + return self;
  8 +};
  9 +
  10 +module.exports = BaseUIWindow;
10 Resources/ui/common/ControlsWindow.js
... ... @@ -0,0 +1,10 @@
  1 +function ControlsWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + return self;
  8 +};
  9 +
  10 +module.exports = ControlsWindow;
10 Resources/ui/common/MashupsWindow.js
... ... @@ -0,0 +1,10 @@
  1 +function MashupsWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + return self;
  8 +};
  9 +
  10 +module.exports = MashupsWindow;
10 Resources/ui/common/PhoneWindow.js
... ... @@ -0,0 +1,10 @@
  1 +function PhoneWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + return self;
  8 +};
  9 +
  10 +module.exports = PhoneWindow;
10 Resources/ui/common/PlatformWindow.js
... ... @@ -0,0 +1,10 @@
  1 +function PlatformWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + return self;
  8 +};
  9 +
  10 +module.exports = PlatformWindow;
27 Resources/ui/handheld/android/ApplicationWindow.js
... ... @@ -0,0 +1,27 @@
  1 +function ApplicationWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + var button = Ti.UI.createButton({
  8 + height:44,
  9 + width:200,
  10 + title:L('openWindow'),
  11 + top:20
  12 + });
  13 + self.add(button);
  14 +
  15 + button.addEventListener('click', function() {
  16 + //containingTab attribute must be set by parent tab group on
  17 + //the window for this work
  18 + self.containingTab.open(Ti.UI.createWindow({
  19 + title: L('newWindow'),
  20 + backgroundColor: 'white'
  21 + }));
  22 + });
  23 +
  24 + return self;
  25 +};
  26 +
  27 +module.exports = ApplicationWindow;
27 Resources/ui/handheld/ios/ApplicationWindow.js
... ... @@ -0,0 +1,27 @@
  1 +function ApplicationWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + var button = Ti.UI.createButton({
  8 + height:44,
  9 + width:200,
  10 + title:L('openWindow'),
  11 + top:20
  12 + });
  13 + self.add(button);
  14 +
  15 + button.addEventListener('click', function() {
  16 + //containingTab attribute must be set by parent tab group on
  17 + //the window for this work
  18 + self.containingTab.open(Ti.UI.createWindow({
  19 + title: L('newWindow'),
  20 + backgroundColor: 'white'
  21 + }));
  22 + });
  23 +
  24 + return self;
  25 +};
  26 +
  27 +module.exports = ApplicationWindow;
27 Resources/ui/tablet/ApplicationWindow.js
... ... @@ -0,0 +1,27 @@
  1 +function ApplicationWindow(title) {
  2 + var self = Ti.UI.createWindow({
  3 + title:title,
  4 + backgroundColor:'white'
  5 + });
  6 +
  7 + var button = Ti.UI.createButton({
  8 + height:44,
  9 + width:200,
  10 + title:L('openWindow'),
  11 + top:20
  12 + });
  13 + self.add(button);
  14 +
  15 + button.addEventListener('click', function() {
  16 + //containingTab attribute must be set by parent tab group on
  17 + //the window for this work
  18 + self.containingTab.open(Ti.UI.createWindow({
  19 + title: L('newWindow'),
  20 + backgroundColor: 'white'
  21 + }));
  22 + });
  23 +
  24 + return self;
  25 +};
  26 +
  27 +module.exports = ApplicationWindow;
8 build/android/.classpath
... ... @@ -0,0 +1,8 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<classpath>
  3 + <classpathentry kind="src" path="src"/>
  4 + <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
  5 + <classpathentry kind="lib" path="lib/titanium.jar"/>
  6 + <classpathentry kind="output" path="bin"/>
  7 + <classpathentry kind="src" path="gen"/>
  8 +</classpath>
6 build/android/.gitignore
... ... @@ -0,0 +1,6 @@
  1 +src
  2 +lib
  3 +bin
  4 +res
  5 +gen
  6 +AndroidManifest.xml
33 build/android/.project
... ... @@ -0,0 +1,33 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>KitchenSink</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + <buildCommand>
  14 + <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
  15 + <arguments>
  16 + </arguments>
  17 + </buildCommand>
  18 + <buildCommand>
  19 + <name>org.eclipse.jdt.core.javabuilder</name>
  20 + <arguments>
  21 + </arguments>
  22 + </buildCommand>
  23 + <buildCommand>
  24 + <name>com.android.ide.eclipse.adt.ApkBuilder</name>
  25 + <arguments>
  26 + </arguments>
  27 + </buildCommand>
  28 + </buildSpec>
  29 + <natures>
  30 + <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
  31 + <nature>org.eclipse.jdt.core.javanature</nature>
  32 + </natures>
  33 +</projectDescription>
22 build/android/default.properties
... ... @@ -0,0 +1,22 @@
  1 +# This file is automatically generated by Android Tools.
  2 +# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
  3 +#
  4 +# This file must be checked in Version Control Systems.
  5 +#
  6 +# To customize properties used by the Ant build system use,
  7 +# "build.properties", and override values to adapt the script to your
  8 +# project structure.
  9 +
  10 +# apk configurations. This property allows creation of APK files with limited
  11 +# resources. For example, if your application contains many locales and
  12 +# you wish to release multiple smaller apks instead of a large one, you can
  13 +# define configuration to create apks with limited language sets.
  14 +# Format is a comma separated list of configuration names. For each
  15 +# configuration, a property will declare the resource configurations to
  16 +# include. Example:
  17 +# apk-configurations=european,northamerica
  18 +# apk-config-european=en,fr,it,de,es
  19 +# apk-config-northamerica=en,es
  20 +apk-configurations=
  21 +# Project target.
  22 +target=android-7
48 build/iphone/Classes/AFOpenFlow/AFItemView.h
... ... @@ -0,0 +1,48 @@
  1 +/**
  2 + * Copyright (c) 2009 Alex Fajkowski, Apparent Logic LLC
  3 + *
  4 + * Permission is hereby granted, free of charge, to any person
  5 + * obtaining a copy of this software and associated documentation
  6 + * files (the "Software"), to deal in the Software without
  7 + * restriction, including without limitation the rights to use,
  8 + * copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 + * copies of the Software, and to permit persons to whom the
  10 + * Software is furnished to do so, subject to the following
  11 + * conditions:
  12 + *
  13 + * The above copyright notice and this permission notice shall be
  14 + * included in all copies or substantial portions of the Software.
  15 + *
  16 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23 + * OTHER DEALINGS IN THE SOFTWARE.
  24 + */
  25 +#if defined(USE_TI_UIIOSCOVERFLOWVIEW) || defined(USE_TI_UICOVERFLOWVIEW)
  26 +
  27 +#import <UIKit/UIKit.h>
  28 +
  29 +
  30 +@interface AFItemView : UIView {
  31 + UIImageView *imageView;
  32 + int number;
  33 + CGFloat horizontalPosition;
  34 + CGFloat verticalPosition;
  35 + CGFloat originalImageHeight;
  36 +}
  37 +
  38 +@property int number;
  39 +@property (nonatomic, readonly) CGFloat horizontalPosition;
  40 +@property (nonatomic, readonly) CGFloat verticalPosition;
  41 +@property (nonatomic, readonly) UIImageView *imageView;
  42 +
  43 +- (void)setImage:(UIImage *)newImage originalImageHeight:(CGFloat)imageHeight reflectionFraction:(CGFloat)reflectionFraction;
  44 +- (CGSize)calculateNewSize:(CGSize)originalImageSize boundingBox:(CGSize)boundingBox;
  45 +
  46 +@end
  47 +
  48 +#endif
97 build/iphone/Classes/AFOpenFlow/AFItemView.m
... ... @@ -0,0 +1,97 @@
  1 +/**
  2 + * Copyright (c) 2009 Alex Fajkowski, Apparent Logic LLC
  3 + *
  4 + * Permission is hereby granted, free of charge, to any person
  5 + * obtaining a copy of this software and associated documentation
  6 + * files (the "Software"), to deal in the Software without
  7 + * restriction, including without limitation the rights to use,
  8 + * copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 + * copies of the Software, and to permit persons to whom the
  10 + * Software is furnished to do so, subject to the following
  11 + * conditions:
  12 + *
  13 + * The above copyright notice and this permission notice shall be
  14 + * included in all copies or substantial portions of the Software.
  15 + *
  16 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23 + * OTHER DEALINGS IN THE SOFTWARE.
  24 + */
  25 +#if defined(USE_TI_UIIOSCOVERFLOWVIEW) || defined(USE_TI_UICOVERFLOWVIEW)
  26 +
  27 +#import "AFItemView.h"
  28 +#import <QuartzCore/QuartzCore.h>
  29 +#import "AFOpenFlowConstants.h"
  30 +
  31 +
  32 +@implementation AFItemView
  33 +@synthesize imageView, horizontalPosition, verticalPosition;
  34 +
  35 +- (id)initWithFrame:(CGRect)frame {
  36 + if (self = [super initWithFrame:frame]) {
  37 + self.opaque = YES;
  38 + self.backgroundColor = NULL;
  39 + verticalPosition = 0;
  40 + horizontalPosition = 0;
  41 +
  42 + // Image View
  43 + imageView = [[UIImageView alloc] initWithFrame:frame];
  44 + imageView.opaque = YES;
  45 + [self addSubview:imageView];
  46 + }
  47 +
  48 + return self;
  49 +}
  50 +
  51 +- (void)setImage:(UIImage *)newImage originalImageHeight:(CGFloat)imageHeight reflectionFraction:(CGFloat)reflectionFraction {
  52 + [imageView setImage:newImage];
  53 + verticalPosition = imageHeight * reflectionFraction / 2;
  54 + originalImageHeight = imageHeight;
  55 + self.frame = CGRectMake(0, 0, newImage.size.width, newImage.size.height);
  56 +}
  57 +
  58 +- (int)number {
  59 + return number;
  60 +}
  61 +
  62 +- (void)setNumber:(int)newNumber {
  63 + horizontalPosition = COVER_SPACING * newNumber;
  64 + number = newNumber;
  65 +}
  66 +
  67 +- (CGSize)calculateNewSize:(CGSize)baseImageSize boundingBox:(CGSize)boundingBox {
  68 + CGFloat boundingRatio = boundingBox.width / boundingBox.height;
  69 + CGFloat originalImageRatio = baseImageSize.width / baseImageSize.height;
  70 +
  71 + CGFloat newWidth;
  72 + CGFloat newHeight;
  73 + if (originalImageRatio > boundingRatio) {
  74 + newWidth = boundingBox.width;
  75 + newHeight = boundingBox.width * baseImageSize.height / baseImageSize.width;
  76 + } else {
  77 + newHeight = boundingBox.height;
  78 + newWidth = boundingBox.height * baseImageSize.width / baseImageSize.height;
  79 + }
  80 +
  81 + return CGSizeMake(newWidth, newHeight);
  82 +}
  83 +
  84 +- (void)setFrame:(CGRect)newFrame {
  85 + [super setFrame:newFrame];
  86 + [imageView setFrame:newFrame];
  87 +}
  88 +
  89 +- (void)dealloc {
  90 + [imageView release];
  91 +
  92 + [super dealloc];
  93 +}
  94 +
  95 +@end
  96 +
  97 +#endif
33 build/iphone/Classes/AFOpenFlow/AFOpenFlowConstants.h
... ... @@ -0,0 +1,33 @@
  1 +/**
  2 + * Copyright (c) 2009 Alex Fajkowski, Apparent Logic LLC
  3 + *
  4 + * Permission is hereby granted, free of charge, to any person
  5 + * obtaining a copy of this software and associated documentation
  6 + * files (the "Software"), to deal in the Software without
  7 + * restriction, including without limitation the rights to use,
  8 + * copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 + * copies of the Software, and to permit persons to whom the
  10 + * Software is furnished to do so, subject to the following
  11 + * conditions:
  12 + *
  13 + * The above copyright notice and this permission notice shall be
  14 + * included in all copies or substantial portions of the Software.
  15 + *
  16 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23 + * OTHER DEALINGS IN THE SOFTWARE.
  24 + */
  25 +#if defined(USE_TI_UIIOSCOVERFLOWVIEW) || defined(USE_TI_UICOVERFLOWVIEW)
  26 +
  27 +// For OpenFlow
  28 +#define COVER_SPACING 40
  29 +#define CENTER_COVER_OFFSET 70
  30 +#define SIDE_COVER_ANGLE .79
  31 +#define SIDE_COVER_ZPOSITION -80
  32 +
  33 +#endif
87 build/iphone/Classes/AFOpenFlow/AFOpenFlowView.h
... ... @@ -0,0 +1,87 @@
  1 +/**
  2 + * Copyright (c) 2009 Alex Fajkowski, Apparent Logic LLC
  3 + *
  4 + * Permission is hereby granted, free of charge, to any person
  5 + * obtaining a copy of this software and associated documentation
  6 + * files (the "Software"), to deal in the Software without
  7 + * restriction, including without limitation the rights to use,
  8 + * copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 + * copies of the Software, and to permit persons to whom the
  10 + * Software is furnished to do so, subject to the following
  11 + * conditions:
  12 + *
  13 + * The above copyright notice and this permission notice shall be
  14 + * included in all copies or substantial portions of the Software.
  15 + *
  16 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23 + * OTHER DEALINGS IN THE SOFTWARE.
  24 + */
  25 +#if defined(USE_TI_UIIOSCOVERFLOWVIEW) || defined(USE_TI_UICOVERFLOWVIEW)
  26 +
  27 +#import <UIKit/UIKit.h>
  28 +#import "AFItemView.h"
  29 +#import <QuartzCore/QuartzCore.h>
  30 +
  31 +
  32 +@protocol AFOpenFlowViewDataSource;
  33 +@protocol AFOpenFlowViewDelegate;
  34 +
  35 +@interface AFOpenFlowView : UIView {
  36 + id <AFOpenFlowViewDataSource> dataSource;
  37 + id <AFOpenFlowViewDelegate> viewDelegate;
  38 + NSMutableSet *offscreenCovers;
  39 + NSMutableDictionary *onscreenCovers;
  40 + NSMutableDictionary *coverImages;
  41 + NSMutableDictionary *coverImageHeights;
  42 + UIImage *defaultImage;
  43 + CGFloat defaultImageHeight;
  44 +
  45 + UIScrollView *scrollView;
  46 + int lowerVisibleCover;
  47 + int upperVisibleCover;
  48 + int numberOfImages;
  49 + int beginningCover;
  50 +
  51 + AFItemView *selectedCoverView;
  52 +
  53 + CATransform3D leftTransform, rightTransform;
  54 +
  55 + CGFloat halfScreenHeight;
  56 + CGFloat halfScreenWidth;
  57 +
  58 + Boolean isSingleTap;
  59 + Boolean isDoubleTap;
  60 + Boolean isDraggingACover;
  61 + CGFloat startPosition;
  62 +}
  63 +
  64 +@property (nonatomic, assign) id <AFOpenFlowViewDataSource> dataSource;
  65 +@property (nonatomic, assign) id <AFOpenFlowViewDelegate> viewDelegate;
  66 +@property (nonatomic, retain) UIImage *defaultImage;
  67 +@property (nonatomic) int numberOfImages;
  68 +
  69 +- (void)setSelectedCover:(int)newSelectedCover;
  70 +- (void)centerOnSelectedCover:(BOOL)animated;
  71 +- (void)setImage:(UIImage *)image forIndex:(int)index;
  72 +- (void)updateLayout;
  73 +
  74 +@end
  75 +
  76 +@protocol AFOpenFlowViewDelegate <NSObject>
  77 +@optional
  78 +- (void)openFlowView:(AFOpenFlowView *)openFlowView click:(int)index;
  79 +- (void)openFlowView:(AFOpenFlowView *)openFlowView selectionDidChange:(int)index;
  80 +@end
  81 +
  82 +@protocol AFOpenFlowViewDataSource <NSObject>
  83 +- (void)openFlowView:(AFOpenFlowView *)openFlowView requestImageForIndex:(int)index;
  84 +- (UIImage *)defaultImage;
  85 +@end
  86 +
  87 +#endif
474 build/iphone/Classes/AFOpenFlow/AFOpenFlowView.m
... ... @@ -0,0 +1,474 @@
  1 +/**
  2 + * Copyright (c) 2009 Alex Fajkowski, Apparent Logic LLC
  3 + *
  4 + * Permission is hereby granted, free of charge, to any person
  5 + * obtaining a copy of this software and associated documentation
  6 + * files (the "Software"), to deal in the Software without
  7 + * restriction, including without limitation the rights to use,
  8 + * copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 + * copies of the Software, and to permit persons to whom the
  10 + * Software is furnished to do so, subject to the following
  11 + * conditions:
  12 + *
  13 + * The above copyright notice and this permission notice shall be
  14 + * included in all copies or substantial portions of the Software.
  15 + *
  16 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23 + * OTHER DEALINGS IN THE SOFTWARE.
  24 + */
  25 +#if defined(USE_TI_UIIOSCOVERFLOWVIEW) || defined(USE_TI_UICOVERFLOWVIEW)
  26 +
  27 +#import "AFOpenFlowView.h"
  28 +#import "AFOpenFlowConstants.h"
  29 +#import "AFUIImageReflection.h"
  30 +
  31 +
  32 +@interface AFOpenFlowView (hidden)
  33 +
  34 +- (void)setUpInitialState;
  35 +- (AFItemView *)coverForIndex:(int)coverIndex;
  36 +- (void)updateCoverImage:(AFItemView *)aCover;
  37 +- (AFItemView *)dequeueReusableCover;
  38 +- (void)layoutCovers:(int)selected fromCover:(int)lowerBound toCover:(int)upperBound;
  39 +- (void)layoutCover:(AFItemView *)aCover selectedCover:(int)selectedIndex animated:(Boolean)animated;
  40 +- (AFItemView *)findCoverOnscreen:(CALayer *)targetLayer;
  41 +
  42 +@end
  43 +
  44 +@implementation AFOpenFlowView (hidden)
  45 +
  46 +const static CGFloat kReflectionFraction = 0.85;
  47 +
  48 +- (void)setUpInitialState {
  49 + // Set up the default image for the coverflow.
  50 + self.defaultImage = [self.dataSource defaultImage];
  51 +
  52 + // Create data holders for onscreen & offscreen covers & UIImage objects.
  53 + coverImages = [[NSMutableDictionary alloc] init];
  54 + coverImageHeights = [[NSMutableDictionary alloc] init];
  55 + offscreenCovers = [[NSMutableSet alloc] init];
  56 + onscreenCovers = [[NSMutableDictionary alloc] init];
  57 +
  58 + scrollView = [[UIScrollView alloc] initWithFrame:self.frame];
  59 + scrollView.userInteractionEnabled = NO;
  60 + scrollView.multipleTouchEnabled = NO;
  61 + scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  62 + [self addSubview:scrollView];