In Files

  • tk/lib/tk/text.rb

Class/Module Index [+]

Quicksearch

Tk::Text::IndexModMethods

Public Instance Methods

+(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 77
def +(mod)
  return chars(mod) if mod.kind_of?(Numeric)

  mod = mod.to_s
  if mod =~ /^\s*[+-]?\d/
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod)
  else
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod)
  end
end
            
-(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 88
def -(mod)
  return chars(-mod) if mod.kind_of?(Numeric)

  mod = mod.to_s
  if mod =~ /^\s*[+-]?\d/
    Tk::Text::IndexString.new(String.new(id) << ' - ' << mod)
  elsif mod =~ /^\s*[-]\s+(\d.*)$/
    Tk::Text::IndexString.new(String.new(id) << ' - -' << $1)
  else
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod)
  end
end
            
any_char(mod) click to toggle source
Alias for: any_chars
any_chars(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 122
def any_chars(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any chars')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any chars')
  end
end
            
Also aliased as: any_char
any_indices(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 153
def any_indices(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any indices')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any indices')
  end
end
            
any_line(mod) click to toggle source
Alias for: any_lines
any_lines(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 184
def any_lines(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any_lines')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any lines')
  end
end
            
Also aliased as: any_line
char(mod) click to toggle source
Alias for: chars
chars(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 101
def chars(mod)
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' chars')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' chars')
  end
end
            
Also aliased as: char
display_char(mod) click to toggle source
Alias for: display_chars
display_chars(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 111
def display_chars(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display chars')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display chars')
  end
end
            
Also aliased as: display_char
display_indices(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 143
def display_indices(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display indices')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display indices')
  end
end
            
display_line(mod) click to toggle source
Alias for: display_lines
display_lineend() click to toggle source
 
               # File tk/lib/tk/text.rb, line 206
def display_lineend
  # Tk8.5 feature
  Tk::Text::IndexString.new(String.new(id) << ' display lineend')
end
            
display_lines(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 173
def display_lines(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display_lines')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display lines')
  end
end
            
Also aliased as: display_line
display_linestart() click to toggle source
 
               # File tk/lib/tk/text.rb, line 202
def display_linestart
  # Tk8.5 feature
  Tk::Text::IndexString.new(String.new(id) << ' display linestart')
end
            
display_wordend() click to toggle source
 
               # File tk/lib/tk/text.rb, line 222
def display_wordend
  # Tk8.5 feature
  Tk::Text::IndexString.new(String.new(id) << ' display wordend')
end
            
display_wordstart() click to toggle source
 
               # File tk/lib/tk/text.rb, line 218
def display_wordstart
  # Tk8.5 feature
  Tk::Text::IndexString.new(String.new(id) << ' display wordstart')
end
            
indices(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 133
def indices(mod)
  # Tk8.5 feature
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' indices')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' indices')
  end
end
            
line(mod) click to toggle source
Alias for: lines
lineend() click to toggle source
 
               # File tk/lib/tk/text.rb, line 198
def lineend
  Tk::Text::IndexString.new(String.new(id) << ' lineend')
end
            
lines(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 163
def lines(mod)
  fail ArgumentError, 'expect Integer'  unless mod.kind_of?(Integer)
  if mod < 0
    Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' lines')
  else
    Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' lines')
  end
end
            
Also aliased as: line
linestart() click to toggle source
 
               # File tk/lib/tk/text.rb, line 195
def linestart
  Tk::Text::IndexString.new(String.new(id) << ' linestart')
end
            
wordend() click to toggle source
 
               # File tk/lib/tk/text.rb, line 214
def wordend
  Tk::Text::IndexString.new(String.new(id) << ' wordend')
end
            
wordstart() click to toggle source
 
               # File tk/lib/tk/text.rb, line 211
def wordstart
  Tk::Text::IndexString.new(String.new(id) << ' wordstart')
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus