limelight 0.3.1-java → 0.4.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. data/lib/init.rb +5 -2
  2. data/lib/limelight/animation.rb +2 -2
  3. data/lib/limelight/builtin/players/button.rb +1 -1
  4. data/lib/limelight/builtin/players/check_box.rb +1 -1
  5. data/lib/limelight/builtin/players/combo_box.rb +2 -4
  6. data/lib/limelight/builtin/players/combo_box_popup_list.rb +1 -1
  7. data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +1 -1
  8. data/lib/limelight/builtin/players/curtains.rb +1 -1
  9. data/lib/limelight/builtin/players/image.rb +3 -0
  10. data/lib/limelight/builtin/players/password_box.rb +1 -1
  11. data/lib/limelight/builtin/players/radio_button.rb +1 -1
  12. data/lib/limelight/builtin/players/text_area.rb +1 -1
  13. data/lib/limelight/builtin/players/text_box.rb +1 -1
  14. data/lib/limelight/builtin/players.rb +1 -1
  15. data/lib/limelight/builtin/styles.rb +1 -1
  16. data/lib/limelight/builtin/utilities_production/alert/props.rb +5 -0
  17. data/lib/limelight/builtin/utilities_production/alert/styles.rb +7 -0
  18. data/lib/limelight/builtin/utilities_production/incompatible_version/props.rb +17 -0
  19. data/lib/limelight/builtin/utilities_production/incompatible_version/styles.rb +9 -0
  20. data/lib/limelight/builtin/utilities_production/production.rb +59 -0
  21. data/lib/limelight/builtin/utilities_production/stages.rb +9 -0
  22. data/lib/limelight/builtin/utilities_production/styles.rb +50 -0
  23. data/lib/limelight/button_group_cache.rb +1 -1
  24. data/lib/limelight/casting_director.rb +1 -1
  25. data/lib/limelight/client/playbills.rb +3 -0
  26. data/lib/limelight/commands/command.rb +13 -7
  27. data/lib/limelight/commands/create_command.rb +13 -8
  28. data/lib/limelight/commands/freeze_command.rb +3 -0
  29. data/lib/limelight/commands/help_command.rb +12 -1
  30. data/lib/limelight/commands/open_command.rb +11 -1
  31. data/lib/limelight/commands/pack_command.rb +1 -1
  32. data/lib/limelight/commands/unpack_command.rb +1 -1
  33. data/lib/limelight/commands/version_command.rb +1 -1
  34. data/lib/limelight/data.rb +4 -14
  35. data/lib/limelight/dsl/build_exception.rb +12 -8
  36. data/lib/limelight/dsl/menu_bar.rb +1 -1
  37. data/lib/limelight/dsl/production_builder.rb +1 -1
  38. data/lib/limelight/dsl/prop_builder.rb +2 -2
  39. data/lib/limelight/dsl/stage_builder.rb +3 -3
  40. data/lib/limelight/dsl/styles_builder.rb +2 -1
  41. data/lib/limelight/file_chooser.rb +1 -1
  42. data/lib/limelight/file_filter.rb +1 -1
  43. data/lib/limelight/file_loader.rb +1 -1
  44. data/lib/limelight/gems.rb +4 -0
  45. data/lib/limelight/java_couplings.rb +3 -2
  46. data/lib/limelight/java_util.rb +1 -1
  47. data/lib/limelight/limelight_exception.rb +1 -1
  48. data/lib/limelight/main.rb +1 -1
  49. data/lib/limelight/paint_action.rb +1 -1
  50. data/lib/limelight/pen.rb +1 -1
  51. data/lib/limelight/producer.rb +52 -37
  52. data/lib/limelight/production.rb +81 -43
  53. data/lib/limelight/prop.rb +32 -13
  54. data/lib/limelight/scene.rb +19 -14
  55. data/lib/limelight/specs/spec_helper.rb +55 -28
  56. data/lib/limelight/stage.rb +163 -23
  57. data/lib/limelight/string.rb +3 -0
  58. data/lib/limelight/studio.rb +143 -6
  59. data/lib/limelight/styles.rb +14 -1
  60. data/lib/limelight/templates/production_templater.rb +6 -2
  61. data/lib/limelight/templates/scene_templater.rb +12 -7
  62. data/lib/limelight/templates/sources/production/production.rb.template +46 -6
  63. data/lib/limelight/templates/sources/production/spec/spec_helper.rb.template +5 -0
  64. data/lib/limelight/templates/sources/scene_spec/scene_spec.rb.template +13 -0
  65. data/lib/limelight/templates/templater.rb +4 -1
  66. data/lib/limelight/templates/templater_logger.rb +3 -0
  67. data/lib/limelight/theater.rb +15 -6
  68. data/lib/limelight/util/downloader.rb +3 -1
  69. data/lib/limelight/util.rb +8 -7
  70. data/lib/limelight/version.rb +3 -3
  71. data/lib/limelight.jar +0 -0
  72. data/productions/examples/8thlight.com/about/props.rb +1 -1
  73. data/productions/examples/8thlight.com/about/styles.rb +1 -1
  74. data/productions/examples/8thlight.com/footer.rb +1 -1
  75. data/productions/examples/8thlight.com/home/props.rb +1 -1
  76. data/productions/examples/8thlight.com/home/styles.rb +1 -1
  77. data/productions/examples/8thlight.com/menu.rb +1 -1
  78. data/productions/examples/8thlight.com/services/props.rb +1 -1
  79. data/productions/examples/8thlight.com/services/styles.rb +1 -1
  80. data/productions/examples/8thlight.com/stages.rb +1 -1
  81. data/productions/examples/8thlight.com/styles.rb +1 -1
  82. data/productions/examples/calculator/players/button.rb +1 -1
  83. data/productions/examples/calculator/players/calculator.rb +1 -1
  84. data/productions/examples/calculator/players/calculator_model.rb +1 -1
  85. data/productions/examples/calculator/props.rb +1 -1
  86. data/productions/examples/calculator/styles.rb +1 -1
  87. data/productions/examples/langstons_ant/init.rb +3 -0
  88. data/productions/examples/langstons_ant/players/ant.rb +1 -1
  89. data/productions/examples/langstons_ant/players/log.rb +1 -1
  90. data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
  91. data/productions/examples/langstons_ant/players/world.rb +1 -1
  92. data/productions/examples/langstons_ant/props.rb +1 -1
  93. data/productions/examples/langstons_ant/styles.rb +1 -1
  94. data/productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb +7 -0
  95. data/productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb +29 -0
  96. data/productions/examples/sandbox/alerts/incompatible_production/production.rb +49 -0
  97. data/productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb +13 -0
  98. data/productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb +5 -0
  99. data/productions/examples/sandbox/alerts/incompatible_production/stages.rb +17 -0
  100. data/productions/examples/sandbox/alerts/incompatible_production/styles.rb +12 -0
  101. data/productions/examples/sandbox/alerts/players/alerts.rb +14 -0
  102. data/productions/examples/sandbox/alerts/props.rb +7 -0
  103. data/productions/examples/sandbox/alerts/styles.rb +43 -0
  104. data/productions/examples/sandbox/background_images/props.rb +19 -0
  105. data/productions/examples/sandbox/background_images/styles.rb +40 -0
  106. data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
  107. data/productions/examples/sandbox/click_me/props.rb +1 -1
  108. data/productions/examples/sandbox/click_me/styles.rb +1 -1
  109. data/productions/examples/sandbox/floaters/players/floater.rb +9 -5
  110. data/productions/examples/sandbox/floaters/players/surface.rb +1 -1
  111. data/productions/examples/sandbox/floaters/props.rb +1 -1
  112. data/productions/examples/sandbox/floaters/styles.rb +13 -13
  113. data/productions/examples/sandbox/frameing/players/sandbox.rb +3 -0
  114. data/productions/examples/sandbox/frameing/props.rb +3 -0
  115. data/productions/examples/sandbox/frameing/styles.rb +3 -0
  116. data/productions/examples/sandbox/gradients/players/spinner.rb +1 -1
  117. data/productions/examples/sandbox/gradients/players/teaser.rb +1 -1
  118. data/productions/examples/sandbox/gradients/players/wave.rb +1 -1
  119. data/productions/examples/sandbox/gradients/players/waves.rb +1 -1
  120. data/productions/examples/sandbox/gradients/props.rb +1 -1
  121. data/productions/examples/sandbox/gradients/styles.rb +1 -1
  122. data/productions/examples/sandbox/header.rb +4 -1
  123. data/productions/examples/sandbox/homer/players/homer.rb +1 -1
  124. data/productions/examples/sandbox/homer/props.rb +1 -1
  125. data/productions/examples/sandbox/homer/styles.rb +2 -2
  126. data/productions/examples/sandbox/images/space.png +0 -0
  127. data/productions/examples/sandbox/images_scene/props.rb +3 -0
  128. data/productions/examples/sandbox/images_scene/styles.rb +3 -0
  129. data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
  130. data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
  131. data/productions/examples/sandbox/inputs/players/combo_box_input.rb +1 -1
  132. data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
  133. data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
  134. data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
  135. data/productions/examples/sandbox/inputs/props.rb +1 -1
  136. data/productions/examples/sandbox/inputs/styles.rb +1 -1
  137. data/productions/examples/sandbox/kiosk/players/kiosk.rb +36 -0
  138. data/productions/examples/sandbox/kiosk/props.rb +6 -0
  139. data/productions/examples/sandbox/kiosk/styles.rb +34 -0
  140. data/productions/examples/sandbox/players/sandbox.rb +1 -1
  141. data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
  142. data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
  143. data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
  144. data/productions/examples/sandbox/scrolling/players/add_button.rb +1 -1
  145. data/productions/examples/sandbox/scrolling/players/cell.rb +1 -1
  146. data/productions/examples/sandbox/scrolling/props.rb +1 -1
  147. data/productions/examples/sandbox/scrolling/styles.rb +1 -1
  148. data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
  149. data/productions/examples/sandbox/sketching/props.rb +1 -1
  150. data/productions/examples/sandbox/sketching/styles.rb +1 -1
  151. data/productions/examples/sandbox/sounds/players/clip.rb +1 -1
  152. data/productions/examples/sandbox/sounds/props.rb +1 -1
  153. data/productions/examples/sandbox/sounds/styles.rb +1 -1
  154. data/productions/examples/sandbox/spec/alerts/alerts_spec.rb +13 -0
  155. data/productions/examples/sandbox/stages.rb +2 -1
  156. data/productions/examples/sandbox/styles.rb +1 -1
  157. data/productions/examples/sandbox/teaser/players/fader.rb +1 -1
  158. data/productions/examples/sandbox/teaser/props.rb +1 -1
  159. data/productions/examples/sandbox/teaser/styles.rb +1 -1
  160. data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
  161. data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
  162. data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
  163. data/productions/stage_composer/init.rb +1 -1
  164. data/productions/stage_composer/inspector/players/inspector.rb +1 -1
  165. data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
  166. data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
  167. data/productions/stage_composer/inspector/players/style_table.rb +1 -1
  168. data/productions/stage_composer/inspector/players/style_value.rb +1 -1
  169. data/productions/stage_composer/inspector/props.rb +1 -1
  170. data/productions/stage_composer/inspector/styles.rb +1 -1
  171. data/productions/stage_composer/lib/init.rb +1 -1
  172. data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
  173. data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
  174. data/productions/stage_composer/production.rb +1 -1
  175. data/productions/stage_composer/stages.rb +1 -1
  176. data/productions/startup/production.rb +49 -0
  177. data/productions/startup/spec/default_scene/default_scene_spec.rb +13 -0
  178. data/productions/startup/spec/spec_helper.rb +5 -0
  179. data/productions/startup/stages.rb +5 -2
  180. data/productions/startup/styles.rb +12 -0
  181. data/productions/startup/welcome/players/browse_button.rb +1 -1
  182. data/productions/startup/welcome/players/download_button.rb +1 -1
  183. data/productions/startup/welcome/players/sandbox_button.rb +1 -1
  184. data/productions/startup/welcome/props.rb +2 -2
  185. data/productions/startup/welcome/styles.rb +1 -1
  186. data/spec/builtin/players/button_spec.rb +1 -1
  187. data/spec/builtin/players/check_box_spec.rb +1 -1
  188. data/spec/builtin/players/combo_box_spec.rb +1 -1
  189. data/spec/builtin/players/image_spec.rb +3 -0
  190. data/spec/builtin/players/password_box_spec.rb +1 -1
  191. data/spec/builtin/players/radio_button_spec.rb +7 -7
  192. data/spec/builtin/players/text_area_spec.rb +1 -1
  193. data/spec/builtin/players/text_box_spec.rb +1 -1
  194. data/spec/builtin/utilities_production/spec_helper.rb +4 -0
  195. data/spec/builtin/utilities_production/utilities_production_spec.rb +143 -0
  196. data/spec/casting_director_spec.rb +7 -7
  197. data/spec/client/playbills_spec.rb +3 -0
  198. data/spec/commands/command_spec.rb +9 -1
  199. data/spec/commands/create_command_spec.rb +35 -5
  200. data/spec/commands/freeze_command_spec.rb +3 -0
  201. data/spec/commands/help_command_spec.rb +6 -3
  202. data/spec/commands/open_command_spec.rb +24 -2
  203. data/spec/commands/pack_command_spec.rb +3 -0
  204. data/spec/commands/unpack_command_spec.rb +4 -1
  205. data/spec/data_spec.rb +5 -16
  206. data/spec/dsl/production_builder_spec.rb +1 -1
  207. data/spec/dsl/prop_builder_spec.rb +19 -19
  208. data/spec/dsl/stage_builder_spec.rb +1 -1
  209. data/spec/dsl/styles_builder_spec.rb +1 -1
  210. data/spec/file_chooser_spec.rb +1 -1
  211. data/spec/file_filter_spec.rb +1 -1
  212. data/spec/file_loader_spec.rb +1 -1
  213. data/spec/gems_spec.rb +3 -0
  214. data/spec/java_util_spec.rb +1 -1
  215. data/spec/main_spec.rb +4 -1
  216. data/spec/paint_action_spec.rb +1 -1
  217. data/spec/pen_spec.rb +1 -1
  218. data/spec/producer_spec.rb +73 -32
  219. data/spec/production_spec.rb +23 -44
  220. data/spec/prop_spec.rb +102 -64
  221. data/spec/scene_spec.rb +3 -3
  222. data/spec/spec_helper.rb +3 -2
  223. data/spec/stage_spec.rb +172 -36
  224. data/spec/string_spec.rb +3 -0
  225. data/spec/studio_spec.rb +131 -3
  226. data/spec/styles_spec.rb +3 -0
  227. data/spec/templates/production_templater_spec.rb +12 -1
  228. data/spec/templates/scene_templater_spec.rb +17 -2
  229. data/spec/templates/templater_logger_spec.rb +3 -0
  230. data/spec/templates/templater_spec.rb +3 -0
  231. data/spec/theater_spec.rb +16 -1
  232. data/spec/util/downloader_spec.rb +3 -0
  233. metadata +56 -6
  234. data/lib/i4jruntime.jar +0 -0
  235. data/lib/junit-4.4.jar +0 -0
@@ -1,9 +1,49 @@
1
- # This file (production.rb) configures the production. It is the first file loaded when production is opened.
1
+ # This file (production.rb) is the first file loaded opening a production. It must define a module named 'Production'.
2
+ # The containing production will acquire all the behavior defined in this module.
3
+ # You may define serveral hooks and initialization steps here.
2
4
 
3
- # The name of the production. If not present, the production's name will default to the name of the root directory.
4
- name "!-PRODUCTION_NAME-!"
5
+ module Production
5
6
 
6
- # Attributes. Defining attributes on the production will create getters/setters on the production object.
7
- # Create attributes for any model objects or resources that need to accessible to props or players within the production
7
+ # # Define this method if you want the production name to be different from the default, directory name.
8
+ # def name
9
+ # return !-PRODUCTION_NAME-!
10
+ # end
11
+ #
12
+ # # Returns the minimum version of limelight required to run this production. Default: "0.0.0"
13
+ # # If the version of limelight used to open this production is less than the minimum,
14
+ # # an error will be displayed (starting with version 0.4.0).
15
+ # #
16
+ # def minimum_limelight_version
17
+ # return "!-CURRENT_VERSION-!"
18
+ # end
19
+ #
20
+ # # Hook #1. Called when the production is newly created, before any loading has been done.
21
+ # # This is a good place to require needed files and instantiate objects in the busines layer.
22
+ # def production_opening
23
+ # end
24
+ #
25
+ # # Hook #2. Called after internal gems have been loaded and stages have been instantiated, yet before
26
+ # # any scenes have been opened.
27
+ # def production_loaded
28
+ # end
29
+ #
30
+ # # Hook #3. Called when the production, and all the scenes, have fully opened.
31
+ # def production_opened
32
+ # end
33
+ #
34
+ # # The system will call this methods when it wishes to close the production, perhaps when the user quits the
35
+ # # application. By default the production will always return true. You may override this behavior by re-implenting
36
+ # # the methods here.
37
+ # def allow_close?
38
+ # return true
39
+ # end
40
+ #
41
+ # # Called when the production is about to be closed.
42
+ # def production_closing
43
+ # end
44
+ #
45
+ # # Called when the production is fully closed.
46
+ # def production_closed
47
+ # end
8
48
 
9
- #attribute :attribute_name
49
+ end
@@ -0,0 +1,5 @@
1
+ require 'rubygems'
2
+ require 'spec'
3
+ require 'limelight/specs/spec_helper'
4
+
5
+ $PRODUCTION_PATH = File.expand_path(File.dirname(__FILE__) + "/../")
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
+
3
+ describe "!-SCENE_TITLE-!" do
4
+
5
+ uses_scene "!-SCENE_NAME-!", :hidden => true
6
+
7
+ it "should have default text" do
8
+ scene.children.size.should == 1
9
+ root = scene.children[0]
10
+ root.text.should == "This is the !-SCENE_TITLE-! scene."
11
+ end
12
+
13
+ end
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require 'limelight/templates/templater_logger'
2
5
 
3
6
  module Limelight
@@ -69,7 +72,7 @@ module Limelight
69
72
  establish_directory(full_path)
70
73
  end
71
74
 
72
- # Creates the specified file from the specified file template. The file will be created withint the target_root.
75
+ # Creates the specified file from the specified file template. The file will be created within the target_root.
73
76
  # All parent diretories will be created if needed. The source paramter should be a path pointing to a
74
77
  # file template in the source_root directory.
75
78
  #
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  module Limelight
2
5
  module Templates
3
6
 
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'limelight/limelight_exception'
@@ -10,7 +10,9 @@ module Limelight
10
10
  class Theater
11
11
 
12
12
  include UI::Api::Theater
13
-
13
+
14
+ # Returns the theater's active stage. i.e. the stage most recently used.
15
+ #
14
16
  attr_reader :active_stage
15
17
 
16
18
  def initialize
@@ -37,9 +39,9 @@ module Limelight
37
39
 
38
40
  # Adds a Stage to the Theater. Raises an exception is the name of the Stage is duplicated.
39
41
  #
40
- def add_stage(name)
42
+ def add_stage(name, options = {})
41
43
  raise LimelightException.new("Duplicate stage name: '#{name}'") if @stages[name]
42
- stage = build_stage(name)
44
+ stage = build_stage(name, options)
43
45
  @stages[name] = stage
44
46
  return stage
45
47
  end
@@ -50,6 +52,13 @@ module Limelight
50
52
  @active_stage = stage
51
53
  end
52
54
 
55
+ # Removes the stage from this theater.
56
+ #
57
+ def stage_closed(stage)
58
+ @stages.delete(stage.name)
59
+ @active_stage = nil if @active_stage == stage
60
+ end
61
+
53
62
  # If no Stages are added, the Theater will provide a default Stage named "Limelight".
54
63
  #
55
64
  def default_stage
@@ -59,8 +68,8 @@ module Limelight
59
68
 
60
69
  protected #############################################
61
70
 
62
- def build_stage(name)
63
- return Limelight::Stage.new(self, name)
71
+ def build_stage(name, options)
72
+ return Limelight::Stage.new(self, name, options)
64
73
  end
65
74
 
66
75
  end
@@ -1,3 +1,6 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require 'limelight/data'
2
5
  require 'limelight/limelight_exception'
3
6
  require 'uri'
@@ -11,7 +14,6 @@ module Limelight
11
14
  class Downloader
12
15
 
13
16
  def self.download(resource)
14
- puts "resource: #{resource}"
15
17
  new.download(resource)
16
18
  end
17
19
 
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Limelight
@@ -51,12 +51,13 @@ class Module
51
51
  def prop_reader(*symbols)
52
52
  symbols.each do |sym|
53
53
  define_method(sym) do
54
- value = instance_variable_get("@#{sym}")
55
- if value.nil?
56
- value = scene.find(sym.to_s)
57
- instance_variable_set("@#{sym}", value) unless value.nil?
58
- end
59
- return value
54
+ return scene.find(sym.to_s)
55
+ # value = instance_variable_get("@#{sym}")
56
+ # if value.nil?
57
+ # value = scene.find(sym.to_s)
58
+ # instance_variable_set("@#{sym}", value) unless value.nil?
59
+ # end
60
+ # return value
60
61
  end
61
62
  end
62
63
  end
@@ -1,12 +1,12 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Limelight
5
5
  module VERSION #:nodoc:
6
6
  unless defined? MAJOR
7
7
  MAJOR = 0
8
- MINOR = 3
9
- TINY = 1
8
+ MINOR = 4
9
+ TINY = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, TINY].join('.')
12
12
  TAG = "REL_" + [MAJOR, MINOR, TINY].join('_')
data/lib/limelight.jar CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "page"
@@ -1,2 +1,2 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  footer do
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "page"
@@ -1,2 +1,2 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  header
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "page"
@@ -1,2 +1,2 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  stage "8th Light" do
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  page {
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Button
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  require 'calculator_model'
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  class CalculatorModel
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "calculator"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  calculator {
@@ -1 +1,4 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
1
4
  require File.expand_path(File.dirname(__FILE__) + "/players/ant")
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  class Ant
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Log
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module StartStopButton
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module World
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  description_text = <<END
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  earth {
@@ -0,0 +1,7 @@
1
+ # This file (props.rb) defines all the props that appear in a scene when loaded. It makes use of the
2
+ # PropBuilder DSL.
3
+ #
4
+ # For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#PropBuilder_DSL
5
+
6
+ root :text => "This production is forever incompatible with the current version of Limelight (for testing purposes)."
7
+ close_button :id => "close_button", :text => "Close this Scene", :on_mouse_clicked => "scene.stage.close"
@@ -0,0 +1,29 @@
1
+ # This file, (styles.rb) inside a scene, should define any styles specific to the containing scene.
2
+ # It makes use of the StyleBuilder DSL.
3
+ #
4
+ # For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#Styling_with_styles.rb
5
+ # For a complete listing of style attributes see: http://limelightwiki.8thlight.com/index.php/Style_Attributes
6
+
7
+ default_scene {
8
+ background_color :black
9
+ horizontal_alignment :center
10
+ vertical_alignment :center
11
+ width "100%"
12
+ height "100%"
13
+ }
14
+
15
+ root {
16
+ text_color :white
17
+ font_size 18
18
+ }
19
+
20
+ close_button {
21
+ text_color :blue
22
+ border_color :blue
23
+ padding 5
24
+ border_width 1
25
+ hover {
26
+ text_color :white
27
+ border_color :white
28
+ }
29
+ }
@@ -0,0 +1,49 @@
1
+ # This file (production.rb) is the first file loaded opening a production. It must define a module named 'Production'.
2
+ # The containing production will acquire all the behavior defined in this module.
3
+ # You may define serveral hooks and initialization steps here.
4
+
5
+ module Production
6
+
7
+ # # Define this method if you want the production name to be different from the default, directory name.
8
+ # def name
9
+ # return Incompatible Production
10
+ # end
11
+ #
12
+ # # Returns the minimum version of limelight required to run this production. Default: "0.0.0"
13
+ # # If the version of limelight used to open this production is less than the minimum,
14
+ # # an error will be displayed (starting with version 0.4.0).
15
+ # #
16
+ def minimum_limelight_version
17
+ return "99.99.99"
18
+ end
19
+ #
20
+ # # Hook #1. Called when the production is newly created, before any loading has been done.
21
+ # # This is a good place to require needed files and instantiate objects in the busines layer.
22
+ # def production_opening
23
+ # end
24
+ #
25
+ # # Hook #2. Called after internal gems have been loaded and stages have been instantiated, yet before
26
+ # # any scenes have been opened.
27
+ # def production_loaded
28
+ # end
29
+ #
30
+ # # Hook #3. Called when the production, and all the scenes, have fully opened.
31
+ # def production_opened
32
+ # end
33
+ #
34
+ # # The system will call this methods when it wishes to close the production, perhaps when the user quits the
35
+ # # application. By default the production will always return true. You may override this behavior by re-implenting
36
+ # # the methods here.
37
+ # def allow_close?
38
+ # return true
39
+ # end
40
+ #
41
+ # # Called when the production is about to be closed.
42
+ # def production_closing
43
+ # end
44
+ #
45
+ # # Called when the production is fully closed.
46
+ # def production_closed
47
+ # end
48
+
49
+ end
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
+
3
+ describe "Default Scene" do
4
+
5
+ uses_scene "default_scene", :hidden => true
6
+
7
+ it "should have default text" do
8
+ scene.children.size.should == 1
9
+ root = scene.children[0]
10
+ root.text.should == "This is the Default Scene scene."
11
+ end
12
+
13
+ end
@@ -0,0 +1,5 @@
1
+ require 'rubygems'
2
+ require 'spec'
3
+ require 'limelight/specs/spec_helper'
4
+
5
+ $PRODUCTION_PATH = File.expand_path(File.dirname(__FILE__) + "/../")
@@ -0,0 +1,17 @@
1
+ # This file (stages.rb) is used to define the stages within your production.
2
+ #
3
+ # Below is an example statge configuration.
4
+ #
5
+ # stage "center_stage" do
6
+ # default_scene "main"
7
+ # title "Limelight Center Stage"
8
+ # location [0, 0]
9
+ # size [300, 800]
10
+ # end
11
+
12
+ stage "default" do
13
+ default_scene "default_scene"
14
+ title "Limelight"
15
+ location [200, 25]
16
+ size [800, 800]
17
+ end
@@ -0,0 +1,12 @@
1
+ # This file, (styles.rb) in the root directory of the production, should define any styles that are used in multiple
2
+ # scenes. It makes use of the StyleBuilder DSL.
3
+ #
4
+ # For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#Styling_with_styles.rb
5
+ # For a complete listing of style attributes see: http://limelightwiki.8thlight.com/index.php/Style_Attributes
6
+
7
+ # An example style definition
8
+ #foo {
9
+ # width 100
10
+ # height 100
11
+ # background_color :blue
12
+ #}
@@ -0,0 +1,14 @@
1
+ module Alerts
2
+
3
+ prop_reader :message_input
4
+
5
+ def open_alert
6
+ stage.alert(message_input.text)
7
+ end
8
+
9
+ def open_incompatible_production
10
+ production_path = File.join(path, "incompatible_production")
11
+ Thread.new { Limelight::Studio.open(production_path) }
12
+ end
13
+
14
+ end
@@ -0,0 +1,7 @@
1
+ __install "header.rb"
2
+ arena do
3
+ label :text => "Alert Message:"
4
+ message_input :id => "message_input", :text => "Sample Message", :players => "text_area"
5
+ action :id => "alert_action", :text => "Open Alert", :on_mouse_clicked => "scene.open_alert"
6
+ action :id => "incompatible_version_action", :text => "Open Incompatible Production", :on_mouse_clicked => "scene.open_incompatible_production"
7
+ end
@@ -0,0 +1,43 @@
1
+ # This file, (styles.rb) inside a scene, should define any styles specific to the containing scene.
2
+ # It makes use of the StyleBuilder DSL.
3
+ #
4
+ # For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#Styling_with_styles.rb
5
+ # For a complete listing of style attributes see: http://limelightwiki.8thlight.com/index.php/Style_Attributes
6
+
7
+ alerts {
8
+ background_color :black
9
+ horizontal_alignment :center
10
+ vertical_alignment :top
11
+ width "100%"
12
+ height "100%"
13
+ }
14
+
15
+ action {
16
+ width "100%"
17
+ height 100
18
+ margin 25
19
+ left_margin "30%"
20
+ right_margin "30%"
21
+ background_color :white
22
+ border_color :gray
23
+ border_width 2
24
+ rounded_corner_radius 10
25
+ horizontal_alignment :center
26
+ vertical_alignment :center
27
+ text_color :gray
28
+ font_size 20
29
+ hover {
30
+ secondary_background_color :blue
31
+ gradient :on
32
+ }
33
+
34
+ }
35
+
36
+ label {
37
+ text_color :white
38
+ right_padding 10
39
+ }
40
+
41
+ message_input {
42
+ width 300
43
+ }
@@ -0,0 +1,19 @@
1
+ __ :name => "sandbox"
2
+ __install "header.rb"
3
+ arena :vertical_alignment => :center do
4
+ control_panel do
5
+ setting do
6
+ label :text => "Background Image Fill Strategy:"
7
+ input :players => "combo_box", :choices => %w{repeat repeat_x repeat_y static scale scale_x scale_y}, :on_value_changed => "scene.find('area').style.background_image_fill_strategy = text"
8
+ end
9
+ setting do
10
+ label :text => "Background Image X"
11
+ input :players => "combo_box", :choices => %w{0 5 25 125 625 left center right 10% 20% 50% 80% 90%}, :on_value_changed => "scene.find('area').style.background_image_x = text"
12
+ end
13
+ setting do
14
+ label :text => "Background Image Y"
15
+ input :players => "combo_box", :choices => %w{0 5 25 125 625 top center bottom 10% 20% 50% 80% 90%}, :on_value_changed => "scene.find('area').style.background_image_y = text"
16
+ end
17
+ end
18
+ image_area :id => "area", :text => "Area with Background Image"
19
+ end
@@ -0,0 +1,40 @@
1
+ #- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
4
+ control_panel {
5
+ width "100%"
6
+ background_color :gray
7
+ secondary_background_color :dark_green
8
+ gradient_angle 270
9
+ gradient :on
10
+ horizontal_alignment :center
11
+ padding 10
12
+ bottom_margin 30
13
+ }
14
+
15
+ setting {
16
+ width 140
17
+ left_margin 20
18
+ }
19
+
20
+ label {
21
+ text_color :white
22
+ font_style "bold"
23
+ }
24
+
25
+ image_area {
26
+ width "80%"
27
+ height "80%"
28
+ alignment :center
29
+ border_width 1
30
+ border_color :black
31
+ background_image "images/space.png"
32
+ text_color :light_grey
33
+ font_size 30
34
+ }
35
+
36
+ logo {
37
+ border_width 1
38
+ }
39
+
40
+
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc. All Rights Reserved.
1
+ #- Copyright 2008-2009 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  puts "Chromaton required"