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 83
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 94
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 128
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 159
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 190
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 107
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 117
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 149
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 212
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 179
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 208
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 228
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 224
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 139
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 204
def lineend
  Tk::Text::IndexString.new(String.new(id) << ' lineend')
end
            
lines(mod) click to toggle source
 
               # File tk/lib/tk/text.rb, line 169
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 201
def linestart
  Tk::Text::IndexString.new(String.new(id) << ' linestart')
end
            
wordend() click to toggle source
 
               # File tk/lib/tk/text.rb, line 220
def wordend
  Tk::Text::IndexString.new(String.new(id) << ' wordend')
end
            
wordstart() click to toggle source
 
               # File tk/lib/tk/text.rb, line 217
def wordstart
  Tk::Text::IndexString.new(String.new(id) << ' wordstart')
end