Class OldFoxTurtle
In: OldFoxTurtle.rb
Parent: LogoTurtle

This is an alternative to Turtle which is compatible to older versions of FXRuby. Its functionality is identical to Turtle.

Methods

backward   forward   hide   home   left   move   new   reset   right   setBackground   setColor   show   turn  

Public Class methods

Initializes a new Turtle and draws a corresponding pen onto the drawing area of the output window. If no output window exists, a new one will be created.

[Source]

# File OldFoxTurtle.rb, line 122
  def initialize(posx=0.0, posy=0.0, direction=0.0, color="black", background="white")
    super
    if @@application.instance_of?(FXApp) == false
      @@application = FXApp.new
      @@window = OldFoxTurtleWindow.new(@@application, self)
      @@application.create
      @@window.show(PLACEMENT_SCREEN)
      Thread.new { @@application.run }
    else
      @@window.addTurtle(self)
    end
    @@window.refreshTurtle
  end

Public Instance methods

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 147
  def backward(distance)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 139
  def forward(distance)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 171
  def hide
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 211
  def home
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 155
  def left(degrees)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 203
  def move(x, y)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 227
  def reset
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 163
  def right(degrees)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 195
  def setBackground(color)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 187
  def setColor(color)
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 179
  def show
    super
    @@window.refreshTurtle
  end

Performs the LogoTurtle’s associated method and requests an update from the output window.

[Source]

# File OldFoxTurtle.rb, line 219
  def turn(direction)
    super
    @@window.refreshTurtle
  end

[Validate]