Class FutureFace
In: futureref.rb
Parent: Object

Methods

create   deselect   hide   new   reset   select   show   update   updateminmax  

Attributes

adjust  [RW] 
changed  [RW] 
defaultprefix  [RW] 
facefaceno  [RW] 
info  [RW] 
parent  [RW] 
ref  [RW] 
refattr  [RW] 
refcol  [RW] 
reflist  [RW] 
reforder  [RW] 
row  [RW] 
selected  [RW] 
visible  [RW] 
xlength  [RW] 
xmax  [RW] 
xmin  [RW] 
xpos  [RW] 
ylength  [RW] 
ymax  [RW] 
ymin  [RW] 
ypos  [RW] 

Public Class methods

[Source]

# File futureref.rb, line 33
   def initialize(parent, xlength, ylength, xpos, ypos, refattr, adjust)
      @defaultprefix = "faceface"
      @reforder = [ "xlength", "ylength", "xpos", "ypos", "refattr" , "adjust"]
      @selected = false
      @visible = true
      @parent = parent
      @ref = @parent
      @xlength = xlength
      @ylength = ylength
      @xpos = xpos
      @ypos = ypos
      @refattr = refattr
      @adjust = adjust
      @reflist = { "xlength" => @xlength, "ylength" => @ylength, "xpos" => @xpos, "ypos" => @ypos, "refattr" => @refattr, "adjust" => @adjust }
      @parent.externref = true
      @info = [ @parent, self, "ff#{@@count}"]
      updateminmax
      @facefaceno = @parent.createfaceface(self, @xmin, @xmax, @ymin, @ymax, @adjust)
      @@count += 1
   end

Public Instance methods

[Source]

# File futureref.rb, line 122
   def create
   end

[Source]

# File futureref.rb, line 106
   def deselect
      @selected = false
      begin
      if @parent.ffl0[@facefaceno] != nil
         @parent.ffcells[@facefaceno].deselect
         @parent.ffl0[@facefaceno].deselect
         @parent.ffl1[@facefaceno].deselect
         @parent.ffl2[@facefaceno].deselect
         @parent.ffl3[@facefaceno].deselect
      end
      rescue
      end
   end

[Source]

# File futureref.rb, line 90
   def hide
      @visible = false
   end

[Source]

# File futureref.rb, line 119
   def reset
      @@count = 0
   end

[Source]

# File futureref.rb, line 93
   def select
      @selected = true
      begin
      if @parent.ffl0[@facefaceno] != nil
         @parent.ffcells[@facefaceno].select
         @parent.ffl0[@facefaceno].select
         @parent.ffl1[@facefaceno].select
         @parent.ffl2[@facefaceno].select
         @parent.ffl3[@facefaceno].select
      end
      rescue
      end
   end

[Source]

# File futureref.rb, line 87
   def show
      @visible = true
   end

[Source]

# File futureref.rb, line 80
   def update
      updateminmax
      @reflist = { "xlength" => @xlength, "ylength" => @ylength, "xpos" => @xpos, "ypos" => @ypos, "refattr" => @refattr, "adjust" => @adjust }
      @parent.ff[@facefaceno] = [@xmin, @xmax, @ymin, @ymax]
      @parent.adjust[@facefaceno] = @adjust
      @parent.update
   end

[Source]

# File futureref.rb, line 53
   def updateminmax
       xlength1 = vertexDistance(@parent.p0.pos[@parent.csys.count], @parent.p1.pos[@parent.csys.count])
       ylength1 = vertexDistance(@parent.p0.pos[@parent.csys.count], @parent.p3.pos[@parent.csys.count])
      case @refattr
         when 0
            @xmin = @xpos - @xlength/2.0
            @xmax = @xpos + @xlength/2.0
            @ymin = @ypos - @ylength/2.0
            @ymax = @ypos + @ylength/2.0
         when 1
            @xmin = xlength1 - (@xpos + @xlength/2.0)
            @xmax = xlength1 - (@xpos - @xlength/2.0)
            @ymin = @ypos - @ylength/2.0
            @ymax = @ypos + @ylength/2.0
         when 2
            @xmin = xlength1 - (@xpos + @xlength/2.0)
            @xmax = xlength1 - (@xpos - @xlength/2.0)
            @ymin = ylength1 - (@ypos + @ylength/2.0)
            @ymax = ylength1 - (@ypos - @ylength/2.0)
         when 3
            @xmin = @xpos - @xlength/2.0
            @xmax = @xpos + @xlength/2.0
            @ymin = ylength1 - (@ypos + @ylength/2.0)
            @ymax = ylength1 - (@ypos - @ylength/2.0)
      end
      puts "xmin #{@xmin}, xmax #{@xmax}, ymin #{@ymin}, ymax #{@ymax}"
   end

[Validate]