Sha256: a7cfdf4a3f786a42d3cf31b0c46f9b2a328dc60d03dea9a65544c67ca19d52f3

Contents?: true

Size: 910 Bytes

Versions: 16

Compression:

Stored size: 910 Bytes

Contents

module Vedeu

  module Bindings

    # Provides events to change the focus between interfaces/views.
    #
    module Focus

      extend self

      # Setup events relating to running Vedeu. This method is called
      # by Vedeu.
      #
      # @return [TrueClass]
      def setup!
        focus_by_name!
        focus_next!
        focus_prev!
      end

      private

      # :nocov:

      # See {file:docs/events/focus.md#\_focus_by_name_}
      def focus_by_name!
        Vedeu.bind(:_focus_by_name_) { |name| Vedeu.focus_by_name(name) }
      end

      # See {file:docs/events/focus.md#\_focus_next_}
      def focus_next!
        Vedeu.bind(:_focus_next_) { Vedeu.focus_next }
      end

      # See {file:docs/events/focus.md#\_focus_prev_}
      def focus_prev!
        Vedeu.bind(:_focus_prev_) { Vedeu.focus_previous }
      end

      # :nocov:

    end # Focus

  end # Bindings

end # Vedeu

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
vedeu-0.6.29 lib/vedeu/bindings/focus.rb
vedeu-0.6.28 lib/vedeu/bindings/focus.rb
vedeu-0.6.27 lib/vedeu/bindings/focus.rb
vedeu-0.6.26 lib/vedeu/bindings/focus.rb
vedeu-0.6.25 lib/vedeu/bindings/focus.rb
vedeu-0.6.24 lib/vedeu/bindings/focus.rb
vedeu-0.6.23 lib/vedeu/bindings/focus.rb
vedeu-0.6.22 lib/vedeu/bindings/focus.rb
vedeu-0.6.21 lib/vedeu/bindings/focus.rb
vedeu-0.6.20 lib/vedeu/bindings/focus.rb
vedeu-0.6.19 lib/vedeu/bindings/focus.rb
vedeu-0.6.18 lib/vedeu/bindings/focus.rb
vedeu-0.6.17 lib/vedeu/bindings/focus.rb
vedeu-0.6.16 lib/vedeu/bindings/focus.rb
vedeu-0.6.15 lib/vedeu/bindings/focus.rb
vedeu-0.6.14 lib/vedeu/bindings/focus.rb