Module: Tk::Tcllib::Diagrams (Ruby 2.3.4)

In Files

  • tk/lib/tkextlib/tcllib/diagrams.rb

Class/Module Index [+]

Quicksearch

Tk::Tcllib::Diagrams

Constants

PACKAGE_NAME

Public Class Methods

arrow(text=nil, length=nil, head=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 131
def arrow(text=nil, length=nil, head=nil)
  if length || head
    text   = '' unless text
    length = '' unless length
    list(tk_call('::Diagrams::arrow', text, length, head))
  else
    if text
      list(tk_call('::Diagrams::arrow', text))
    else
      list(tk_call('::Diagrams::arrow'))
    end
  end
end
            
attach(anchor=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 161
def attach(anchor=None)
  tk_call('::Diagrams::attach', anchor)
end
            
box(text, width=nil, height=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 69
def box(text, width=nil, height=nil)
  if width || height
    width  = '' unless width
    height = '' unless height
    list(tk_call('::Diagrams::box', text, width, height))
  else
    list(tk_call('::Diagrams::box', text))
  end
end
            
boxcoords(x1, y1, x2, y2)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 217
def boxcoords(x1, y1, x2, y2)
  list(tk_call('::Diagrams::boxcoords', x1, y1, x2, y2))
end
            
bracket(dir, dist, from_pos, to_pos)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 157
def bracket(dir, dist, from_pos, to_pos)
  list(tk_call('::Diagrams::bracket', dir, dist, from_pos, to_pos))
end
            
circle(text, radius=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 89
def circle(text, radius=nil)
  if radius
    list(tk_call('::Diagrams::circle', text, radius))
  else
    list(tk_call('::Diagrams::circle', text))
  end
end
            
color(name=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 165
def color(name=None)
  tk_call('::Diagrams::color', name)
end
            
compute_pos()
Alias for: computepos
computepos()
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 212
def computepos
  list(tk_call('::Diagrams::computepos'))
end
            
Also aliased as: compute_pos
current_pos(pos)
Alias for: currentpos
current_pos=(pos)
Alias for: currentpos
currentpos(pos)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 53
def currentpos(pos)
  list(tk_call('::Diagrams::currentpos', pos))
end
            
Also aliased as: current_pos, currentpos=, current_pos=
currentpos=(pos)
Alias for: currentpos
diamond(text, width=nil, height=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 111
def diamond(text, width=nil, height=nil)
  if width || height
    width  = '' unless width
    height = '' unless height
    list(tk_call('::Diagrams::diamond', text, width, height))
  else
    list(tk_call('::Diagrams::diamond', text))
  end
end
            
direction(dir)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 48
def direction(dir)
  tk_call('::Diagrams::direction', dir)
  dir
end
            
draw_in(canvas)
Alias for: drawin
drawin(canvas)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 36
def drawin(canvas)
  tk_call('::Diagrams::drawin', canvas)
  canvas
end
            
Also aliased as: draw_in
drum(text, width=nil, height=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 121
def drum(text, width=nil, height=nil)
  if width || height
    width  = '' unless width
    height = '' unless height
    list(tk_call('::Diagrams::drum', text, width, height))
  else
    list(tk_call('::Diagrams::drum', text))
  end
end
            
fillcolor(name=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 169
def fillcolor(name=None)
  tk_call('::Diagrams::fillcolor', name)
end
            
get_pos(anchor, obj)
Alias for: getpos
getpos(anchor, obj)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 60
def getpos(anchor, obj)
  list(tk_call('::Diagrams::getpos', anchor, obj))
end
            
Also aliased as: get_pos
line(*args)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 145
def line(*args)
  ary = []
  args.each{|arg|
    if arg.kind_of?(Array) && arg.length == 2  # [length, angle]
      ary.concat arg
    else # ["POSITION", x, y] or length or angle
      ary << arg
    end
  }
  list(tk_call('::Diagrams::line', *ary))
end
            
linestyle(style=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 198
def linestyle(style=None)
  tk_call('::Diagrams::linestyle', style)
end
            
linewidth(pixels=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 194
def linewidth(pixels=None)
  number(tk_call('::Diagrams::linewidth', pixels))
end
            
move_object(obj)
Alias for: moveobject
moveobject(obj)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 221
def moveobject(obj)
  list(tk_call('::Diagrams::moveobject', obj))
end
            
Also aliased as: move_object
package_name()
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 19
def self.package_name
  PACKAGE_NAME
end
            
package_version()
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 23
def self.package_version
  begin
    TkPackage.require('Diagrams')
  rescue
    ''
  end
end
            
plaintext(text, width=nil, height=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 79
def plaintext(text, width=nil, height=nil)
  if width || height
    width  = '' unless width
    height = '' unless height
    list(tk_call('::Diagrams::plaintext', text, width, height))
  else
    list(tk_call('::Diagrams::plaintext', text))
  end
end
            
pop_state()
Alias for: popstate
popstate()
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 207
def popstate
  tk_call('::Diagrams::popstate')
end
            
Also aliased as: pop_state
position(x, y)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 65
def position(x, y)
  list(tk_call('::Diagrams::position', x, y))
end
            
push_state()
Alias for: pushstate
pushstate()
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 202
def pushstate
  tk_call('::Diagrams::pushstate')
end
            
Also aliased as: push_state
save_ps(filename)
Alias for: saveps
saveps(filename)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 42
def saveps(filename)
  tk_call('::Diagrams::saveps', filename)
  filename
end
            
Also aliased as: save_ps
slanted(text, width=nil, height=nil, angle=nil)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 97
def slanted(text, width=nil, height=nil, angle=nil)
  if width || height || angle
    width  = '' unless width
    height = '' unless height
    if angle
      list(tk_call('::Diagrams::slanted', text, width, height, angle))
    else
      list(tk_call('::Diagrams::slanted', text, width, height))
    end
  else
    list(tk_call('::Diagrams::slanted', text))
  end
end
            
textcolor(name=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 173
def textcolor(name=None)
  tk_call('::Diagrams::textcolor', name)
end
            
textfont(fnt=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 190
def textfont(fnt=None)
  tk_call('::Diagrams::textfont', fnt)
end
            
use_gap(mode=None)
Alias for: usegap
usegap(mode=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 177
def usegap(mode=None)
  bool(tk_call('::Diagrams::usegap', mode))
end
            
Also aliased as: use_gap
xgap(val=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 182
def xgap(val=None)
  number(tk_call('::Diagrams::xgap', val))
end
            
ygap(val=None)
 
               # File tk/lib/tkextlib/tcllib/diagrams.rb, line 186
def ygap(val=None)
  number(tk_call('::Diagrams::ygap', val))
end