# class Tk::HTML_Widget

### Constants

PACKAGE_NAME
TkCommandNames
WidgetClassName

### Public Class Methods

base64_decode(dat) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 161
    def self.base64_decode(dat)
      tk_call('html', 'base64', 'encode', dat)
    end

base64_encode(dat) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 157
    def self.base64_encode(dat)
      tk_call('html', 'base64', 'encode', dat)
    end

crc32(data) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 177
    def self.crc32(data)
      tk_call('html', 'crc32', data)
    end

gunzip_data(dat) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 153
    def self.gunzip_data(dat)
      tk_call('html', 'gunzip', 'data', filet)
    end

gunzip_file(file, dat) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 145
    def self.gunzip_file(file, dat)
      tk_call('html', 'gunzip', 'file', filet)
    end

gzip_data(dat) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 149
    def self.gzip_data(dat)
      tk_call('html', 'gzip', 'data', file, dat)
    end

gzip_file(file, dat) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 141
    def self.gzip_file(file, dat)
      tk_call('html', 'gzip', 'file', file, dat)
    end

lockcopy(src, dst) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 137
    def self.lockcopy(src, dst)
      tk_call('html', 'lockcopy', src, dst)
    end

package_name() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 21
    def self.package_name
      PACKAGE_NAME
    end

package_version() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 25
    def self.package_version
      begin
        TkPackage.require('Tkhtml')
      rescue
        ''
      end
    end

reformat(src, dst, txt) click to toggle source

class methods

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 125
    def self.reformat(src, dst, txt)
      tk_call('html', 'reformat', src, dst, txt)
    end

stdchan(cmd, channel) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 173
    def self.stdchan(cmd, channel)
      tk_call('html', 'stdchan', cmd, channel)
    end

text_format(dat, len) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 165
    def self.text_format(dat, len)
      tk_call('html', 'text', 'format', dat, len)
    end

url_join(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 129
    def self.url_join(*args) # args := sheme authority path query fragment
      tk_call('html', 'urljoin', *args)
    end

url_split(uri) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 133
    def self.url_split(uri)
      tk_call('html', 'urlsplit', uri)
    end

xor(cmd, *args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 169
    def self.xor(cmd, *args)
      tk_call('html', 'xor', cmd, *args)
    end

### Public Instance Methods

ascii_text(first, last)
Alias for: plain_text
bgimage(image, tid=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 190
    def bgimage(image, tid=None)
      tk_send('bgimage', image, tid)
      self
    end

break_text(idx) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 324
    def break_text(idx)
      tk_send('text', 'break', idx)
    end

Also aliased as: text_break
clear() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 195
    def clear()
      tk_send('clear')
      self
    end

clipping_window() click to toggle source

instance methods

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 184
    def clipping_window
      ClippingWindow.new(self)
    end

Also aliased as: clipwin, htmlclip
clipwin()
Alias for: clipping_window
coords(index=None, percent=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 200
    def coords(index=None, percent=None)
      tk_send('coords', index, percent)
    end

dom_attr(idx) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 442
    def dom_attr(idx)
      tk_send('dom', 'attr', idx)
    end

dom_form_element(name)
Alias for: dom_formel
dom_formel(name) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 446
    def dom_formel(name)
      tk_send('dom', 'formel', name)
    end

Also aliased as: dom_form_element
dom_id(*spec) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 430
    def dom_id(*spec)
      tk_send('dom', 'id', *spec)
    end

dom_ids(*spec) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 434
    def dom_ids(*spec)
      list(tk_send('dom', 'ids', *spec))
    end

dom_name_index(tag, name)
Alias for: dom_nameidx
dom_nameidx(tag, name) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 420
    def dom_nameidx(tag, name)
      number(tk_send('dom', 'nameidx', tag, name))
    end

Also aliased as: dom_name_index
dom_radio_index(tag, name)
Alias for: dom_radioidx
dom_radioidx(tag, name) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 425
    def dom_radioidx(tag, name)
      number(tk_send('dom', 'radioidx', tag, name))
    end

Also aliased as: dom_radio_index
dom_tree(idx, val) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 451
    def dom_tree(idx, val)
      list(tk_send('dom', 'tree', idx, val))
    end

dom_value(*spec) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 438
    def dom_value(*spec)
      list(tk_send('dom', 'value', *spec))
    end

form_info(*args)
Alias for: forminfo
forminfo(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 204
    def forminfo(*args)
      tk_send('forminfo', *args)
    end

Also aliased as: form_info
href(x, y) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 209
    def href(x, y)
      simplelist(tk_send('href', x, y))
    end

html_text(first, last) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 314
    def html_text(first, last)
      tk_send('text', 'html', first, last)
    end

Also aliased as: text_html
htmlclip()
Alias for: clipping_window
image_add(id, img) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 213
    def image_add(id, img)
      tk_send('imageadd', id, img)
      self
    end

image_at(x, y) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 218
    def image_at(x, y)
      tk_send('imageat', x, y)
    end

image_set(id, num) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 226
    def image_set(id, num)
      tk_send('imageset', id, num)
      self
    end

image_update(id, imgs) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 231
    def image_update(id, imgs)
      tk_send('imageupdate', id, imgs)
      self
    end

images() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 222
    def images()
      list(tk_send('images'))
    end

index(idx, count=None, unit=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 236
    def index(idx, count=None, unit=None)
      tk_send('index', idx, count, unit)
    end

insert_cursor(idx) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 240
    def insert_cursor(idx)
      tk_send('insert', idx)
    end

layout() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 287
    def layout()
      tk_send('layout')
    end

names() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 244
    def names()
      simple_list(tk_send('names'))
    end

on_screen(id, x, y) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 248
    def on_screen(id, x, y)
      bool(tk_send('onscreen', id, x, y))
    end

over(x, y) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 252
    def over(x, y)
      list(tk_send('over', x, y))
    end

over_attr(x, y, attrs) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 260
    def over_attr(x, y, attrs)
      list(tk_send('overattr', x, y, attrs))
    end

over_markup(x, y) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 256
    def over_markup(x, y)
      list(tk_send('over', x, y, '-muponly'))
    end

parse(txt) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 264
    def parse(txt)
      tk_send('parse', txt)
      self
    end

plain_text(first, last) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 303
    def plain_text(first, last)
      tk_send('text', 'ascii', first, last)
    end

Also aliased as: ascii_text, text_ascii
postscript(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 295
    def postscript(*args)
      tk_send('postscript', *args)
    end

refresh(*opts) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 283
    def refresh(*opts)
      tk_send('refresh', *opts)
    end

resolver(*uri_args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 269
    def resolver(*uri_args)
      tk_send('resolver', *uri_args)
    end

selection_clear() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 273
    def selection_clear()
      tk_send('selection', 'clear')
      self
    end

selection_set(first, last) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 278
    def selection_set(first, last)
      tk_send('selection', 'set', first, last)
      self
    end

sizewindow(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 291
    def sizewindow(*args)
      tk_send('sizewindow', *args)
    end

source() click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 299
    def source()
      tk_send('source')
    end

text_ascii(first, last)
Alias for: plain_text
text_break(idx)
Alias for: break_text
text_delete(first, last) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 309
    def text_delete(first, last)
      tk_send('text', 'delete', first, last)
      self
    end

text_find(txt, *args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 329
    def text_find(txt, *args)
      tk_send('text', 'find', txt, *args)
    end

text_html(first, last)
Alias for: html_text
text_insert(idx, txt) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 319
    def text_insert(idx, txt)
      tk_send('text', 'insert', idx, txt)
      self
    end

text_table(idx, imgs=None, attrs=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 333
    def text_table(idx, imgs=None, attrs=None)
      tk_send('text', 'table', idx, imgs, attrs)
    end

token_DOM(first, last=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 368
    def token_DOM(first, last=None)
      list(tk_send('token', 'domtokens', first, last))
    end

Also aliased as: token_dom, token_domtokens, token_dom_tokens
token_append(tag, *args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 337
    def token_append(tag, *args)
      tk_send('token', 'append', tag, *args)
      self
    end

token_attrs(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 408
    def token_attrs(*args)
      list(tk_send('token', 'attrs', *args))
    end

token_define(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 347
    def token_define(*args)
      tk_send('token', 'defile', *args)
      self
    end

token_delete(first, last=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 342
    def token_delete(first, last=None)
      tk_send('token', 'delete', first, last)
      self
    end

token_dom(first, last=None)
Alias for: token_DOM
token_dom_tokens(first, last=None)
Alias for: token_DOM
token_domtokens(first, last=None)
Alias for: token_DOM
token_find(tag, *args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 352
    def token_find(tag, *args)
      list(tk_send('token', 'find', tag, *args))
    end

token_get(first, last=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 356
    def token_get(first, last=None)
      list(tk_send('token', 'get', first, last))
    end

token_get_attr(idx, name=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 384
    def token_get_attr(idx, name=None)
      list(tk_send('token', 'attr', idx, name))
    end

token_get_end(idx) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 375
    def token_get_end(idx)
      tk_send('token', 'getend', idx)
    end

Also aliased as: token_getend
token_getend(idx)
Alias for: token_get_end
token_handler(tag, cmd=nil, &b) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 393
    def token_handler(tag, cmd=nil, &b)
      cmd = Proc.new(&b) if !cmd && b
      if cmd
        tk_send('token', 'handler', tag, cmd)
        return self
      else
        return tk_send('token', 'handler', tag)
      end
    end

token_insert(idx, tag, *args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 403
    def token_insert(idx, tag, *args)
      tk_send('token', 'insert', idx, tag, *args)
      self
    end

token_list(first, last=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 360
    def token_list(first, last=None)
      list(tk_send('token', 'list', first, last))
    end

token_markup(first, last=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 364
    def token_markup(first, last=None)
      list(tk_send('token', 'markup', first, last))
    end

token_offset(start, num1, num2) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 380
    def token_offset(start, num1, num2)
      list(tk_send('token', 'offset', start, num1, num2))
    end

token_on_events(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 416
    def token_on_events(*args)
      list(tk_send('token', 'onEvents', *args))
    end

token_set_attr(idx, name=None, val=None) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 388
    def token_set_attr(idx, name=None, val=None)
      tk_send('token', 'attr', idx, name, val)
      self
    end

token_unique(*args) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 412
    def token_unique(*args)
      list(tk_send('token', 'unique', *args))
    end

### Private Instance Methods

__strval_optkeys() click to toggle source
Calls superclass method

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 117
    def __strval_optkeys
      super() << 'base' << 'selectioncolor' << 'unvisitedcolor' << 'visitedcolor'
    end

create_self(keys) click to toggle source

    # File lib/tkextlib/tkHTML/htmlwidget.rb, line 107
    def create_self(keys)
      if keys and keys != None
        tk_call_without_enc(self.class::TkCommandNames[0], @path,
                            *hash_kv(keys, true))
      else
        tk_call_without_enc(self.class::TkCommandNames[0], @path)
      end
    end