Class: FX::Matrix

Inherits:
Fox::FXMatrix
  • Object
show all
Defined in:
lib/libGUIb16.rb,
lib/libGUIb14.rb

Instance Method Summary collapse

Constructor Details

#initialize(p, opts = 0) ⇒ Matrix

Returns a new instance of Matrix.



594
595
596
# File 'lib/libGUIb16.rb', line 594

def initialize(p, opts = 0)
  super(p, 1, opts | Fox::MATRIX_BY_ROWS | Fox::LAYOUT_FILL_X | Fox::LAYOUT_FILL_Y)
end

Instance Method Details

#dim_check(int) ⇒ Object



612
613
614
615
616
# File 'lib/libGUIb16.rb', line 612

def dim_check int
  return 1 unless int.is_a?(Numeric)
  return 1 if int < 1
  int
end

#matrixStyle=(code) ⇒ Object



598
599
600
601
602
# File 'lib/libGUIb16.rb', line 598

def matrixStyle=code
  super
  self.numColumns = @cols
  self.numRows = @rows
end

#numColumns=(int) ⇒ Object



604
605
606
# File 'lib/libGUIb16.rb', line 604

def numColumns=(int)
  super(@cols = dim_check(int))
end

#numRows=(int) ⇒ Object



608
609
610
# File 'lib/libGUIb16.rb', line 608

def numRows=(int)
  super(@rows = dim_check(int))
end