### Home Classes Methods

### In Files

- lib/prawn/document/column_box.rb

### Parent

BoundingBox

### Methods

- #left_side
- #move_past_bottom
- #right_side
- #width
- #width_of_column

### Files

- COPYING
- GPLv2
- GPLv3
- LICENSE

### Class/Module Index

Quicksearch

- Prawn
- Prawn::Core
- Prawn::Core::Page
- Prawn::Core::Page::GraphicsState
- Prawn::Core::Reference
- Prawn::Document
- Prawn::Document::BoundingBox
- Prawn::Document::ColumnBox
- Prawn::Document::GraphicsState
- Prawn::Document::Grid
- Prawn::Document::Internals
- Prawn::Document::PageGeometry
- Prawn::Document::Security
- Prawn::Document::Snapshot
- Prawn::Encoding
- Prawn::Errors
- Prawn::Font
- Prawn::Font::AFM
- Prawn::Font::DFont
- Prawn::Font::TTF
- Prawn::GraphicState
- Prawn::GraphicStateStack
- Prawn::Graphics
- Prawn::Graphics::CapStyle
- Prawn::Graphics::Color
- Prawn::Graphics::Dash
- Prawn::Graphics::Gradient
- Prawn::Graphics::JoinStyle
- Prawn::Graphics::Transformation
- Prawn::Graphics::Transparency
- Prawn::Images
- Prawn::Images::JPG
- Prawn::Images::PNG
- Prawn::Layout
- Prawn::Measurements
- Prawn::Outline
- Prawn::Stamp
- Prawn::Table
- Prawn::Table::Cell
- Prawn::Table::Cell::InTable
- Prawn::Table::Cell::Subtable
- Prawn::Table::Cell::Text
- Prawn::Table::Cells
- Prawn::Text
- Prawn::Text::Box
- Prawn::Text::Formatted
- Prawn::Text::Formatted::Box
- Prawn::Text::Formatted::Fragment
- Prawn::Text::Formatted::Parser
- Arcfour
- Numeric

No matching classes.

# Prawn::Document::ColumnBox

Implements the necessary functionality to allow Document#column_box to work.

### Public Instance Methods

left_side() click to toggle source

x coordinate of the left edge of the current column

    # File lib/prawn/document/column_box.rb, line 70
    def left_side
      absolute_left + (width_of_column * @current_column)
    end

move_past_bottom() click to toggle source

Moves to the next column or starts a new page if currently positioned at the rightmost column.

    # File lib/prawn/document/column_box.rb, line 83
    def move_past_bottom
      @current_column = (@current_column + 1) % @columns
      @document.y = @y
      if 0 == @current_column
        @document.start_new_page
      end
    end

right_side() click to toggle source

x co-orordinate of the right edge of the current column

    # File lib/prawn/document/column_box.rb, line 76
    def right_side
      columns_from_right = @columns - (1 + @current_column)
      absolute_right - (width_of_column * columns_from_right)
    end

width() click to toggle source

The column width, not the width of the whole box. Used to calculate how long a line of text can be.

    # File lib/prawn/document/column_box.rb, line 58
    def width
      super / @columns - @spacer
    end

width_of_column() click to toggle source

Column width including the spacer.

    # File lib/prawn/document/column_box.rb, line 64
    def width_of_column
      width + @spacer
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.