lib/reterm/mixins/nav_input.rb
# Helper to be internally invoked by navigation component
# on activation
Helper to be internally invoked by navigation component
on activation
Helper to be internally invoked by navigation component on activation
def handle_input(from_parent=false)
      @focus ||= 0
      ch = handle_focused unless nav_select
      until quit_nav?(ch)
        if self.nav_select 
          if self.contains?(self.nav_select)
            nav_to_selected
          else
            nav_to_parent
            return nil
          end
        elsif ENTER_CONTROLS.include?(ch)
          focused.activate!
        elsif MOVEMENT_CONTROLS.include?(ch)
          handle_movement(ch, from_parent)
        elsif mev = process_mouse(ch)
          handle_mouse(mev)
        else
          dispatch(:entry, ch)
        end
        return ch unless sanitize_focus!(from_parent)
        ch = handle_focused unless nav_select ||
                                   shutdown?  ||
                                   deactivate?
      end
      ch
    end
def handle_input ( from_parent = false ) @focus ||= 0 ch = handle_focused unless nav_select until quit_nav? ( ch ) if self . nav_select if self . contains? ( self . nav_select ) nav_to_selected else nav_to_parent return nil end elsif ENTER_CONTROLS . include? ( ch ) focused . activate! elsif MOVEMENT_CONTROLS . include? ( ch ) handle_movement ( ch , from_parent ) elsif mev = process_mouse ( ch ) handle_mouse ( mev ) else dispatch ( :entry , ch ) end return ch unless sanitize_focus! ( from_parent ) ch = handle_focused unless nav_select || shutdown? || deactivate? end ch end
Helper to be internally invoked by navigation component
on activation
Helper to be internally invoked by navigation component on activation
# focus on first component # Repeat until quit # Navigate to the specified component (nav_select) # it is a descendent of this one # specified component is not a descendent,
from_parent
<not_specific>