Methods
A
B
C
D
F
G
L
M
P
S
T
U
X
Y
Included Modules
Constants
PACKAGE_NAME = 'Diagrams'.freeze
 
Class Public methods
package_name()
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 18
def self.package_name
  PACKAGE_NAME
end
package_version()
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 22
def self.package_version
  begin
    TkPackage.require('Diagrams')
  rescue
    ''
  end
end
Instance Public methods
arrow(text=nil, length=nil, head=nil)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 130
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 160
def attach(anchor=None)
  tk_call('::Diagrams::attach', anchor)
end
box(text, width=nil, height=nil)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 68
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 216
def boxcoords(x1, y1, x2, y2)
  list(tk_call('::Diagrams::boxcoords', x1, y1, x2, y2))
end
bracket(dir, dist, from_pos, to_pos)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 156
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 88
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 164
def color(name=None)
  tk_call('::Diagrams::color', name)
end
computepos()
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 211
def computepos
  list(tk_call('::Diagrams::computepos'))
end
currentpos(pos)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 52
def currentpos(pos)
  list(tk_call('::Diagrams::currentpos', pos))
end
diamond(text, width=nil, height=nil)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 110
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 47
def direction(dir)
  tk_call('::Diagrams::direction', dir)
  dir
end
drawin(canvas)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 35
def drawin(canvas)
  tk_call('::Diagrams::drawin', canvas)
  canvas
end
drum(text, width=nil, height=nil)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 120
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 168
def fillcolor(name=None)
  tk_call('::Diagrams::fillcolor', name)
end
getpos(anchor, obj)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 59
def getpos(anchor, obj)
  list(tk_call('::Diagrams::getpos', anchor, obj))
end
line(*args)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 144
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 197
def linestyle(style=None)
  tk_call('::Diagrams::linestyle', style)
end
linewidth(pixels=None)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 193
def linewidth(pixels=None)
  number(tk_call('::Diagrams::linewidth', pixels))
end
moveobject(obj)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 220
def moveobject(obj)
  list(tk_call('::Diagrams::moveobject', obj))
end
plaintext(text, width=nil, height=nil)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 78
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
popstate()
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 206
def popstate
  tk_call('::Diagrams::popstate')
end
position(x, y)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 64
def position(x, y)
  list(tk_call('::Diagrams::position', x, y))
end
pushstate()
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 201
def pushstate
  tk_call('::Diagrams::pushstate')
end
saveps(filename)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 41
def saveps(filename)
  tk_call('::Diagrams::saveps', filename)
  filename
end
slanted(text, width=nil, height=nil, angle=nil)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 96
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 ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 172
def textcolor(name=None)
  tk_call('::Diagrams::textcolor', name)
end
textfont(fnt=None)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 189
def textfont(fnt=None)
  tk_call('::Diagrams::textfont', fnt)
end
usegap(mode=None)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 176
def usegap(mode=None)
  bool(tk_call('::Diagrams::usegap', mode))
end
xgap(val=None)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 181
def xgap(val=None)
  number(tk_call('::Diagrams::xgap', val))
end
ygap(val=None)
# File ext/tk/lib/tkextlib/tcllib/diagrams.rb, line 185
def ygap(val=None)
  number(tk_call('::Diagrams::ygap', val))
end