Module: WhirledPeas
- Defined in:
- lib/whirled_peas.rb,
lib/whirled_peas/utils.rb,
lib/whirled_peas/config.rb,
lib/whirled_peas/device.rb,
lib/whirled_peas/errors.rb,
lib/whirled_peas/command.rb,
lib/whirled_peas/version.rb,
lib/whirled_peas/animator.rb,
lib/whirled_peas/graphics.rb,
lib/whirled_peas/settings.rb,
lib/whirled_peas/component.rb,
lib/whirled_peas/utils/ansi.rb,
lib/whirled_peas/null_logger.rb,
lib/whirled_peas/command/base.rb,
lib/whirled_peas/command/help.rb,
lib/whirled_peas/command/play.rb,
lib/whirled_peas/command_line.rb,
lib/whirled_peas/command/debug.rb,
lib/whirled_peas/command/fonts.rb,
lib/whirled_peas/command/still.rb,
lib/whirled_peas/device/screen.rb,
lib/whirled_peas/animator/frame.rb,
lib/whirled_peas/command/frames.rb,
lib/whirled_peas/command/record.rb,
lib/whirled_peas/command/themes.rb,
lib/whirled_peas/settings/color.rb,
lib/whirled_peas/settings/theme.rb,
lib/whirled_peas/animator/easing.rb,
lib/whirled_peas/graphics/canvas.rb,
lib/whirled_peas/settings/border.rb,
lib/whirled_peas/settings/margin.rb,
lib/whirled_peas/settings/sizing.rb,
lib/whirled_peas/graphics/painter.rb,
lib/whirled_peas/settings/padding.rb,
lib/whirled_peas/settings/spacing.rb,
lib/whirled_peas/utils/title_font.rb,
lib/whirled_peas/animator/frameset.rb,
lib/whirled_peas/animator/producer.rb,
lib/whirled_peas/graphics/composer.rb,
lib/whirled_peas/graphics/debugger.rb,
lib/whirled_peas/graphics/renderer.rb,
lib/whirled_peas/settings/bg_color.rb,
lib/whirled_peas/settings/debugger.rb,
lib/whirled_peas/settings/position.rb,
lib/whirled_peas/device/null_device.rb,
lib/whirled_peas/device/output_file.rb,
lib/whirled_peas/settings/alignment.rb,
lib/whirled_peas/settings/scrollbar.rb,
lib/whirled_peas/utils/file_handler.rb,
lib/whirled_peas/graphics/pixel_grid.rb,
lib/whirled_peas/settings/text_color.rb,
lib/whirled_peas/graphics/box_painter.rb,
lib/whirled_peas/command/frame_command.rb,
lib/whirled_peas/device/rendered_frame.rb,
lib/whirled_peas/graphics/grid_painter.rb,
lib/whirled_peas/graphics/text_painter.rb,
lib/whirled_peas/settings/box_settings.rb,
lib/whirled_peas/settings/display_flow.rb,
lib/whirled_peas/command/config_command.rb,
lib/whirled_peas/graphics/graph_painter.rb,
lib/whirled_peas/settings/grid_settings.rb,
lib/whirled_peas/settings/text_settings.rb,
lib/whirled_peas/settings/theme_library.rb,
lib/whirled_peas/utils/formatted_string.rb,
lib/whirled_peas/animator/debug_consumer.rb,
lib/whirled_peas/settings/graph_settings.rb,
lib/whirled_peas/settings/vert_alignment.rb,
lib/whirled_peas/graphics/content_painter.rb,
lib/whirled_peas/graphics/container_coords.rb,
lib/whirled_peas/graphics/graph_dimensions.rb,
lib/whirled_peas/graphics/scrollbar_helper.rb,
lib/whirled_peas/settings/element_settings.rb,
lib/whirled_peas/animator/renderer_consumer.rb,
lib/whirled_peas/component/list_with_active.rb,
lib/whirled_peas/graphics/container_painter.rb,
lib/whirled_peas/graphics/content_dimensions.rb,
lib/whirled_peas/settings/container_settings.rb,
lib/whirled_peas/graphics/container_dimensions.rb
Defined Under Namespace
Classes: CommandLine, ConfigurationError, Error, SettingsError
Constant Summary
collapse
- VERSION =
'0.13.0'
Class Method Summary
collapse
Class Method Details
.component(composer, settings, name) {|component| ... } ⇒ Object
20
21
22
23
24
25
|
# File 'lib/whirled_peas.rb', line 20
def component(composer, settings, name, &block)
require 'whirled_peas/component'
component = Component::Factory.build(name)
yield component
component.compose(composer, settings)
end
|
.config ⇒ Object
40
41
42
|
# File 'lib/whirled_peas.rb', line 40
def config
@config ||= Config.new
end
|
11
12
13
|
# File 'lib/whirled_peas.rb', line 11
def configure(&block)
yield config
end
|
.register_component(name, klass) ⇒ Object
15
16
17
18
|
# File 'lib/whirled_peas.rb', line 15
def register_component(name, klass)
require 'whirled_peas/component'
Component::Factory.register(name, klass)
end
|
.register_theme(name) {|theme| ... } ⇒ Object
32
33
34
35
36
37
38
|
# File 'lib/whirled_peas.rb', line 32
def register_theme(name, &block)
require 'whirled_peas/settings/theme'
require 'whirled_peas/settings/theme_library'
theme = Settings::Theme.new
yield theme
Settings::ThemeLibrary.add(name, theme)
end
|
.template(theme_name = nil, &block) ⇒ Object
27
28
29
30
|
# File 'lib/whirled_peas.rb', line 27
def template(theme_name=nil, &block)
require 'whirled_peas/graphics/composer'
Graphics::Composer.build(theme_name, &block)
end
|