A region that contains clients. This can be either the floating area or a column in the managed area.

Methods
#
C
E
F
I
L
M
N
P
U
Included Modules
Attributes
[R] view
Class Public methods
curr()

Returns the currently focused area.

# File lib/rumai/wm.rb, line 438
        def self.curr
          View.curr.area_of_client Client.curr
        end
floating(view = View.curr)

Returns the floating area in the given view.

# File lib/rumai/wm.rb, line 445
        def self.floating view = View.curr
          new FLOATING_AREA_ID, view
        end
new(area_id, view = View.curr)
view
the view object which contains this area
# File lib/rumai/wm.rb, line 412
      def initialize area_id, view = View.curr
        @id = Integer(area_id) rescue area_id
        @view = view
      end
Instance Public methods
<<(*clients)

Alias for push

chain()

Returns a list of all areas in the current view.

# File lib/rumai/wm.rb, line 454
        def chain
          @view.areas
        end
client_ids()

Returns the IDs of the clients in this area.

# File lib/rumai/wm.rb, line 470
        def client_ids
          @view.client_ids @id
        end
column?()

Checks if this is a managed area (a column).

This method is also aliased as managed?
# File lib/rumai/wm.rb, line 427
      def column?
        not floating?
      end
concat(area)

Concatenates the given area to the bottom of this area.

# File lib/rumai/wm.rb, line 560
        def concat area
          push area.clients
        end
each(&block)

Iterates through each client in this container.

# File lib/rumai/wm.rb, line 479
        def each &block
          clients.each(&block)
        end
exist?()

Checks if this object exists in the chain.

# File lib/rumai/wm.rb, line 461
        def exist?
          chain.include? self
        end
floating?()

Checks if this area is the floating area.

# File lib/rumai/wm.rb, line 420
      def floating?
        @id == FLOATING_AREA_ID
      end
focus()

Puts focus on this area.

# File lib/rumai/wm.rb, line 495
        def focus
          @view.ctl.write "select #{@id}"
        end
insert(*clients)

Inserts the given clients after the currently focused client in this area.

# File lib/rumai/wm.rb, line 531
        def insert *clients
          clients.flatten!
          return if clients.empty?

          clients.each do |c|
            import_client c
          end
        end
layout=(mode)

Sets the layout of clients in this column.

# File lib/rumai/wm.rb, line 486
      def layout= mode
        @view.ctl.write "colmode #{@id} #{mode}"
      end
length()

Returns the number of clients in this area.

# File lib/rumai/wm.rb, line 504
        def length
          client_ids.length
        end
length=(max_clients)

Ensures that this area has at most the given number of clients.

Areas to the right of this one serve as a buffer into which excess clients are evicted and from which deficit clients are imported.

# File lib/rumai/wm.rb, line 570
        def length= max_clients
          return unless max_clients > 0
          len, out = length, fringe

          if len > max_clients
            out.unshift clients[max_clients..-1]

          elsif len < max_clients
            until (diff = max_clients - length) == 0
              importable = out.clients[0, diff]
              break if importable.empty?

              push importable
            end
          end
        end
managed?()

Alias for column?

push(*clients)

Inserts the given clients at the bottom of this area.

This method is also aliased as <<
# File lib/rumai/wm.rb, line 511
        def push *clients
          clients.flatten!
          return if clients.empty?

          insert clients

          # move inserted clients to bottom
          clients.each_with_index do |c, i|
            until c.id == self.client_ids[-i.succ]
              c.send :down
            end
          end
        end
unshift(*clients)

Inserts the given clients at the top of this area.

# File lib/rumai/wm.rb, line 543
        def unshift *clients
          clients.flatten!
          return if clients.empty?

          insert clients

          # move inserted clients to top
          clients.each_with_index do |c, i|
            until c.id == self.client_ids[i]
              c.send :up
            end
          end
        end