Class: GTK::GridArea

Inherits:
Object show all
Defined in:
dragon/layout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGridArea

Returns a new instance of GridArea.


63
64
65
66
67
68
69
70
71
# File 'dragon/layout.rb', line 63

def initialize
  @w            = 0
  @h            = 0
  @gutter       = 0
  @outer_gutter = 0
  @col_count    = 0
  @row_count    = 0
  @margin       = Margin.new
end

Instance Attribute Details

#cell_hObject (readonly)

Returns the value of attribute cell_h


61
62
63
# File 'dragon/layout.rb', line 61

def cell_h
  @cell_h
end

#cell_wObject (readonly)

Returns the value of attribute cell_w


61
62
63
# File 'dragon/layout.rb', line 61

def cell_w
  @cell_w
end

#col_countObject (readonly)

Returns the value of attribute col_count


61
62
63
# File 'dragon/layout.rb', line 61

def col_count
  @col_count
end

#gutterObject (readonly)

Returns the value of attribute gutter


61
62
63
# File 'dragon/layout.rb', line 61

def gutter
  @gutter
end

#hObject (readonly)

Returns the value of attribute h


61
62
63
# File 'dragon/layout.rb', line 61

def h
  @h
end

#marginObject (readonly)

Returns the value of attribute margin


61
62
63
# File 'dragon/layout.rb', line 61

def margin
  @margin
end

#outer_gutterObject (readonly)

Returns the value of attribute outer_gutter


61
62
63
# File 'dragon/layout.rb', line 61

def outer_gutter
  @outer_gutter
end

#row_countObject (readonly)

Returns the value of attribute row_count


61
62
63
# File 'dragon/layout.rb', line 61

def row_count
  @row_count
end

#wObject (readonly)

Returns the value of attribute w


61
62
63
# File 'dragon/layout.rb', line 61

def w
  @w
end

Instance Method Details

#inspectObject


85
86
87
# File 'dragon/layout.rb', line 85

def inspect
  serialize.to_s
end

#serializeObject


73
74
75
76
77
78
79
80
81
82
83
# File 'dragon/layout.rb', line 73

def serialize
  {
    w:            @w,
    h:            @h,
    gutter:       @gutter,
    outer_gutter: @outer_gutter,
    col_count:    @col_count,
    row_count:    @row_count,
    margin:       @margin.serialize
  }
end

#to_sObject


89
90
91
# File 'dragon/layout.rb', line 89

def to_s
  serialize.to_s
end