Class: Lebowski::SCUI::Views::ColorWellView
- Inherits:
-
Foundation::Views::View
- Object
- Foundation::ProxyObject
- Foundation::SCObject
- Foundation::Views::View
- Lebowski::SCUI::Views::ColorWellView
- Defined in:
- lib/lebowski/scui/views/color_well.rb
Overview
Represents a proxy to a SCUI color well view (SCUI.ColorWell)
Constant Summary collapse
- COLORS =
{ :red => '#ff0000', :green => '#00ff00', :blue => '#0000ff', :orange => '#ff6600', :yellow => '#ffff00', :violet => '#8f00ff', :gray => '#999999', :black => '#000000', :white => '#ffffff' }
Constants included from Foundation::Mixins::StallSupport
Foundation::Mixins::StallSupport::DEFAULT_KEY_STALLS, Foundation::Mixins::StallSupport::DEFAULT_STALL
Constants included from Foundation
Foundation::SC_BRANCH_CLOSED, Foundation::SC_BRANCH_OPEN, Foundation::SC_BUTTON1_STATUS, Foundation::SC_BUTTON2_STATUS, Foundation::SC_BUTTON3_STATUS, Foundation::SC_LEAF_NODE, Foundation::SC_MIXED_STATE, Foundation::SC_PICKER_FIXED, Foundation::SC_PICKER_MENU, Foundation::SC_PICKER_POINTER, Foundation::SC_T_ARRAY, Foundation::SC_T_BOOL, Foundation::SC_T_CLASS, Foundation::SC_T_ERROR, Foundation::SC_T_FUNCTION, Foundation::SC_T_HASH, Foundation::SC_T_NULL, Foundation::SC_T_NUMBER, Foundation::SC_T_OBJECT, Foundation::SC_T_STRING, Foundation::SC_T_UNDEFINED
Constants included from Foundation::Mixins::WaitActions
Foundation::Mixins::WaitActions::DEFAULT_TIMEOUT
Instance Attribute Summary
Attributes inherited from Foundation::ProxyObject
#driver, #name, #parent, #rel_path
Instance Method Summary collapse
Methods inherited from Foundation::Views::View
#abs_path, #action_locator_args, #action_target, #assigned_layer_id?, #child_views, #core_query, #frame, #height, #layer, #layer_id, #position, #scroll_to_visible, #scrollable_parent_view, #width
Methods included from Foundation::Mixins::DelegateSupport
Methods included from Foundation::Mixins::UserActions
#basic_click, #click, #click_at, #double_click, #drag, #drag_after, #drag_before, #drag_on_to, #drag_to, #drag_to_end_of, #drag_to_start_of, #focus, #key_down, #key_up, #mouse_down, #mouse_down_at, #mouse_move, #mouse_move_at, #mouse_up, #mouse_up_at, #mouse_wheel_delta_x, #mouse_wheel_delta_y, #right_click, #right_click_at, #right_mouse_down, #right_mouse_down_at, #right_mouse_up, #right_mouse_up_at, #type, #type_key
Methods included from Foundation::Mixins::StallSupport
adjust_all_stalls, adjust_default_key_stall, adjust_default_stall, reset, #stall
Methods included from Foundation::Mixins::KeyCheck
Methods included from Foundation::Mixins::PositionedElement
#height, #position, #position_relative_to, #scroll_to_visible, #width
Methods inherited from Foundation::SCObject
#has_represented_sc_class?, #kind_of_represented_sc_class?, represented_sc_class, #represented_sc_class, representing_sc_class
Methods inherited from Foundation::ProxyObject
#==, #[], #abs_path, #abs_path_with, #define, #define_proxy, #init_ext, #initialize, #method_missing, #none?, #object?, #proxy, #represent_as, #sc_all_classes, #sc_class, #sc_guid, #sc_kind_of?, #sc_path_defined?, #sc_type_of, #unravel_relative_path
Methods included from Foundation::Mixins::DefinePathsSupport
#define_path, #define_paths_for, #defined_path, #defined_paths, #path_defined?, #root_defined_path_part, #root_defined_path_part=
Methods included from Foundation::Mixins::WaitActions
Constructor Details
This class inherits a constructor from Lebowski::Foundation::ProxyObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Lebowski::Foundation::ProxyObject
Instance Method Details
#color?(value) ⇒ Boolean
23 24 25 26 |
# File 'lib/lebowski/scui/views/color_well.rb', line 23 def color?(value) value = COLORS[value] if value.kind_of? Symbol return (text_box.value == value) end |
#color_selected? ⇒ Boolean
19 20 21 |
# File 'lib/lebowski/scui/views/color_well.rb', line 19 def color_selected? return (not (text_box.value.nil? || text_box.value =='#eee')) end |
#select_color(value) ⇒ Object
28 29 30 31 32 |
# File 'lib/lebowski/scui/views/color_well.rb', line 28 def select_color(value) value = COLORS[value] if value.kind_of? Symbol raise ArgumentError.new "The color value must be either a symbol or a string." if not value.kind_of? String text_box.type value end |