Class: Uh::Layout::Column

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
GeoAccessors
Defined in:
lib/uh/layout/column.rb,
lib/uh/layout/column/arranger.rb

Defined Under Namespace

Classes: Arranger

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(geo) ⇒ Column

Returns a new instance of Column.



14
15
16
17
# File 'lib/uh/layout/column.rb', line 14

def initialize(geo)
  @geo      = geo.dup
  @clients  = Container.new
end

Instance Attribute Details

#clientsObject (readonly)

Returns the value of attribute clients.



12
13
14
# File 'lib/uh/layout/column.rb', line 12

def clients
  @clients
end

#geoObject (readonly)

Returns the value of attribute geo.



12
13
14
# File 'lib/uh/layout/column.rb', line 12

def geo
  @geo
end

Instance Method Details

#<<(client) ⇒ Object



23
24
25
26
27
# File 'lib/uh/layout/column.rb', line 23

def <<(client)
  client.geo = @geo.dup
  @clients << client
  self
end

#arrange_clientsObject



29
30
31
32
33
34
# File 'lib/uh/layout/column.rb', line 29

def arrange_clients
  @clients.each do |client|
    client.geo = @geo.dup
    client.moveresize
  end
end

#show_hide_clientsObject



36
37
38
39
40
41
# File 'lib/uh/layout/column.rb', line 36

def show_hide_clients
  @clients.each do |client|
    client.hide unless client.hidden? || @clients.current == client
  end
  @clients.current.show if @clients.current && @clients.current.hidden?
end

#to_sObject



19
20
21
# File 'lib/uh/layout/column.rb', line 19

def to_s
  "COL geo: #{@geo}"
end