Class: GTK::ControlArea

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeControlArea

Returns a new instance of ControlArea.


97
98
99
# File 'dragon/layout.rb', line 97

def initialize
  @margin = Margin.new
end

Instance Attribute Details

#cell_sizeObject (readonly)

Returns the value of attribute cell_size


95
96
97
# File 'dragon/layout.rb', line 95

def cell_size
  @cell_size
end

#hObject (readonly)

Returns the value of attribute h


95
96
97
# File 'dragon/layout.rb', line 95

def h
  @h
end

#marginObject (readonly)

Returns the value of attribute margin


95
96
97
# File 'dragon/layout.rb', line 95

def margin
  @margin
end

#wObject (readonly)

Returns the value of attribute w


95
96
97
# File 'dragon/layout.rb', line 95

def w
  @w
end

Instance Method Details

#inspectObject


110
111
112
# File 'dragon/layout.rb', line 110

def inspect
  serialize.to_s
end

#serializeObject


101
102
103
104
105
106
107
108
# File 'dragon/layout.rb', line 101

def serialize
  {
    cell_size: @cell_size,
    w:         @w,
    h:         @h,
    margin:    @margin.serialize,
  }
end

#to_sObject


114
115
116
# File 'dragon/layout.rb', line 114

def to_s
  serialize.to_s
end