Class LineDialog2p
In: dialogs.rb
Parent: FXDialogBox

Methods

Attributes

csys  [RW] 
flipdir  [RW] 
labelAttribute  [RW]  For 2 point referenced line and 2 line referenced face the labelAttribute makes it possible to change labelAttribute text to "Face attributes:"
meshnum  [RW] 
okButton  [RW] 
ref  [RW] 
reftext  [RW] 
selection  [RW] 

Public Class methods

[Source]

# File dialogs.rb, line 343
    def initialize(owner,title)
       super(owner, title)
       # Set up its contents
       frame1=FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y)
       frame2 = FXHorizontalFrame.new(frame1, LAYOUT_FILL_X)
       matrix1 = FXMatrix.new(frame1, 2,
         MATRIX_BY_COLUMNS|LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y) 
       frame3 = FXHorizontalFrame.new(frame1, LAYOUT_FILL_X)
       frame4 = FXHorizontalFrame.new(frame1, LAYOUT_FILL_X)
       # label
       @labelAttribute = FXLabel.new(frame2, "Line attributes:", nil, LAYOUT_SIDE_BOTTOM|LAYOUT_CENTER_Y)
       FXLabel.new(matrix1, "Mesh points (2 or more):", nil, LAYOUT_SIDE_LEFT|LAYOUT_CENTER_Y)
       @meshnum = FXTextField.new(matrix1, 8, nil, 0,
         JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_LEFT|LAYOUT_CENTER_Y)
       # flip dir check box. For cylindrical and spherical coordinates
       @flipdircheck = FXMenuCheck.new(matrix1, "Flip Direction (not always active)")
       @flipdircheck.connect(SEL_COMMAND){flipdircheck}
       @flipdircheck.check = false
       @flipdir = 0
       def flipdircheck
          if @flipdircheck.check == true
             @flipdir = 1
          else
             @flipdir = 0
          end
       end

       # ref info
       FXLabel.new(frame3, "Reference: ", nil, LAYOUT_SIDE_BOTTOM|LAYOUT_CENTER_Y)
       @reftext = FXLabel.new(frame3, "pX, pY", nil, LAYOUT_SIDE_BOTTOM|LAYOUT_CENTER_Y)
       #buttons
       @okButton = FXButton.new(frame4, "  OK  ", nil, self, FXDialogBox::ID_ACCEPT,
         FRAME_RAISED|FRAME_THICK|LAYOUT_SIDE_RIGHT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
       FXButton.new(frame4, "Cancel", nil, self, FXDialogBox::ID_CANCEL,
         FRAME_RAISED|FRAME_THICK|LAYOUT_SIDE_RIGHT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
       # default values in text fields
       @meshnum.text = "5"
    end

Public Instance methods

[Source]

# File dialogs.rb, line 381
   def checkstate
      if @flipdir == 1
         @flipdircheck.check = true
      else
         @flipdircheck.check = false
      end
   end

[Source]

# File dialogs.rb, line 362
       def flipdircheck
          if @flipdircheck.check == true
             @flipdir = 1
          else
             @flipdir = 0
          end
       end

[Source]

# File dialogs.rb, line 388
   def setdefault
       # default values in text fields
       @meshnum.text = $defaults['linemeshnum'].to_s
   end

[Validate]