Sha256: 14557ebbd664ecc1affba1526e4e9a4e783b6a4160c01933d0038c5ea83ddac4

Contents?: true

Size: 845 Bytes

Versions: 24

Compression:

Stored size: 845 Bytes

Contents

module SugarCube
  class << Repl

    def build_default_tree
      build_tree(@default)
    end

    def adjust_init(item)
      if item.is_a?(Android::View::View)
        @restore = {}
      end
    end

    def register_default_tree_selectors
      register_tree_selector(Android::ViewGroup) do |view|
        views = []
        # item.getChildCount.times do |index|
        #   views << item.getChildAt(index)
        # end
        views
      end
      register_tree_selector(Android::View::View) { |view| [view] }
    end

    def draw_tree_item(item)
      # item.to_s
      'todo'
    end

    def get_tree_item(item)
      if item.nil?
        @default
      else
        item
      end
    end

    def format_frame(frame)
      "[[#{frame.origin.x}, #{frame.origin.y}], [#{frame.size.width}, #{frame.size.height}]]"
    end

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
sugarcube-4.0.0 lib/android/sugarcube-repl/repl.rb
sugarcube-3.5.0 lib/android/sugarcube-repl/repl.rb
sugarcube-3.4.2 lib/android/sugarcube-repl/repl.rb
sugarcube-3.4.1 lib/android/sugarcube-repl/repl.rb
sugarcube-3.4.0 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.7 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.6 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.5 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.4 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.3 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.2 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.1 lib/android/sugarcube-repl/repl.rb
sugarcube-3.3.0 lib/android/sugarcube-repl/repl.rb
sugarcube-3.2.0 lib/android/sugarcube-repl/repl.rb
sugarcube-3.1.1 lib/android/sugarcube-repl/repl.rb
sugarcube-3.1.0 lib/android/sugarcube-repl/repl.rb
sugarcube-3.0.8 lib/android/sugarcube-repl/repl.rb
sugarcube-3.0.7 lib/android/sugarcube-repl/repl.rb
sugarcube-3.0.6 lib/android/sugarcube-repl/repl.rb
sugarcube-3.0.5 lib/android/sugarcube-repl/repl.rb