Class | Tk::Iwidgets::Hierarchy
In: | tk/lib/tkextlib/iwidgets/hierarchy.rb
Parent: | Tk::Iwidgets::Scrolledwidget

### Methods

__validation_class_list bbox clear collapse compare current debug debug= delete dlineinfo draw exp_state expand expand_state expanded? expanded_list get index insert mark_add mark_clear mark_get mark_remove prune refresh scan_dragto scan_mark see selection_add selection_clear selection_get selection_remove toggle xview xview_moveto xview_scroll yview yview_moveto yview_scroll

### Included Modules

TkTextTagConfig Tk::ValidateConfigure

### Classes and Modules

Class Tk::Iwidgets::Hierarchy::IconCommand
Class Tk::Iwidgets::Hierarchy::IndicatorCommand
Class Tk::Iwidgets::Hierarchy::QueryCommand

### Constants

ItemConfCMD | = | ['tag'.freeze, 'configure'.freeze].freeze
TkCommandNames | = | ['::iwidgets::hierarchy'.freeze].freeze
WidgetClassName | = | 'Hierarchy'.freeze

### Public Instance methods

__validation_class_list()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 94
      def __validation_class_list
        super() << QueryCommand << IndicatorCommand << IconCommand
      end

bbox(index)

based on TkText widget

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 212
      def bbox(index)
        list(tk_send_without_enc('bbox', _get_eval_enc_str(index)))
      end

clear()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 119
      def clear
        tk_call(@path, 'clear')
        self
      end

collapse(node)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 124
      def collapse(node)
        tk_call(@path, 'collapse')
        self
      end

compare(idx1, op, idx2)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 216
      def compare(idx1, op, idx2)
        bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1),
                                 op, _get_eval_enc_str(idx2)))
      end

current()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 129
      def current
        tk_call(@path, 'current')
      end

debug()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 221
      def debug
        bool(tk_send_without_enc('debug'))
      end

debug=(boolean)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 224
      def debug=(boolean)
        tk_send_without_enc('debug', boolean)
        #self
        boolean
      end

delete(first, last=None)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 230
      def delete(first, last=None)
        tk_send_without_enc('delete', first, last)
        self
      end

dlineinfo(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 235
      def dlineinfo(index)
        list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index)))
      end

draw(mode=None)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 133
      def draw(mode=None)
        case mode
        when None
          # do nothing
        when 'now', :now
          mode = '-now'
        when 'eventually', :eventually
          mode = '-eventually'
        when String, Symbol
          mode = mode.to_s
          mode = '-' << mode if mode[0] != ?-
        end
        tk_call(@path, 'draw', mode)
      end

exp_state()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 157
      def exp_state
        list(tk_call(@path, 'expState'))
      end

expand(node)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 148
      def expand(node)
        tk_call(@path, 'expand', node)
        self
      end

expand_state()

Alias for exp_state

expanded?(node)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 153
      def expanded?(node)
        bool(tk_call(@path, 'expanded', node))
      end

expanded_list()

Alias for exp_state

get(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 239
      def get(*index)
        _fromUTF8(tk_send_without_enc('get', *index))
      end

index(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 243
      def index(index)
        tk_send_without_enc('index', _get_eval_enc_str(index))
      end

insert(index, chars, *tags)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 247
      def insert(index, chars, *tags)
        if tags[0].kind_of? Array
          # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ...
          args = [chars]
          while tags.size > 0
            args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ')  # taglist
            args << tags.shift if tags.size > 0                           # chars
          end
          super(index, *args)
        else
          # single chars-taglist argument :: str, tag, tag, ...
          if tags.size == 0
            super(index, chars)
          else
            super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' '))
          end
        end
      end

mark_add(*nodes)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 167
      def mark_add(*nodes)
        tk_call(@path, 'mark', 'add', *nodes)
        self
      end

mark_clear()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 163
      def mark_clear
        tk_call(@path, 'mark', 'clear')
        self
      end

mark_get()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 175
      def mark_get
        list(tk_call(@path, 'mark', 'get'))
      end

mark_remove(*nodes)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 171
      def mark_remove(*nodes)
        tk_call(@path, 'mark', 'remove', *nodes)
        self
      end

prune(node)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 184
      def prune(node)
        tk_call(@path, 'prune', node)
        self
      end

refresh(node)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 179
      def refresh(node)
        tk_call(@path, 'refresh', node)
        self
      end

scan_dragto(x, y)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 270
      def scan_dragto(x, y)
        tk_send_without_enc('scan', 'dragto', x, y)
        self
      end

scan_mark(x, y)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 266
      def scan_mark(x, y)
        tk_send_without_enc('scan', 'mark', x, y)
        self
      end

see(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 274
      def see(index)
        tk_send_without_enc('see', index)
        self
      end

selection_add(*nodes)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 193
      def selection_add(*nodes)
        tk_call(@path, 'selection', 'add', *nodes)
        self
      end

selection_clear()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 189
      def selection_clear
        tk_call(@path, 'selection', 'clear')
        self
      end

selection_get()

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 201
      def selection_get
        list(tk_call(@path, 'selection', 'get'))
      end

selection_remove(*nodes)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 197
      def selection_remove(*nodes)
        tk_call(@path, 'selection', 'remove', *nodes)
        self
      end

toggle(node)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 205
      def toggle(node)
        tk_call(@path, 'toggle', node)
        self
      end

xview(*index)

based on tk/scrollable.rb

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 280
      def xview(*index)
        if index.size == 0
          list(tk_send_without_enc('xview'))
        else
          tk_send_without_enc('xview', *index)
          self
        end
      end

xview_moveto(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 288
      def xview_moveto(*index)
        xview('moveto', *index)
      end

xview_scroll(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 291
      def xview_scroll(*index)
        xview('scroll', *index)
      end

yview(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 295
      def yview(*index)
        if index.size == 0
          list(tk_send_without_enc('yview'))
        else
          tk_send_without_enc('yview', *index)
          self
        end
      end

yview_moveto(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 303
      def yview_moveto(*index)
        yview('moveto', *index)
      end

yview_scroll(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 306
      def yview_scroll(*index)
        yview('scroll', *index)
      end

[Validate]