Class: Axlsx::Pane
- Inherits:
-
Object
- Object
- Axlsx::Pane
- Includes:
- OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/workbook/worksheet/pane.rb
Overview
The recommended way to manage the pane options is via SheetView#pane
Pane options for a worksheet.
Instance Attribute Summary collapse
-
#active_pane ⇒ Symbol
Active Pane The pane that is active.
-
#state ⇒ Symbol
Split State Indicates whether the pane has horizontal / vertical splits, and whether those splits are frozen.
-
#top_left_cell ⇒ String
Top Left Visible Cell Location of the top left visible cell in the bottom right pane (when in Left-To-Right mode).
-
#x_split ⇒ Integer
Horizontal Split Position Horizontal position of the split, in 1/20th of a point; 0 (zero) if none.
-
#y_split ⇒ Integer
Vertical Split Position Vertical position of the split, in 1/20th of a point; 0 (zero) if none.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Pane
constructor
Creates a new Pane object.
-
#to_xml_string(str = '') ⇒ String
Serializes the data validation.
Methods included from SerializedAttributes
#declared_attributes, included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ Pane
Creates a new Axlsx::Pane object
16 17 18 19 20 21 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 16 def initialize(={}) #defaults @active_pane = @state = @top_left_cell = nil @x_split = @y_split = 0 end |
Instance Attribute Details
#active_pane ⇒ Symbol
Active Pane The pane that is active. Options are
- bottom_left: Bottom left pane, when both vertical and horizontal splits are applied. This value is also used when only a horizontal split has been applied, dividing the pane into upper and lower regions. In that case, this value specifies the bottom pane.
- bottom_right: Bottom right pane, when both vertical and horizontal splits are applied.
- top_left: Top left pane, when both vertical and horizontal splits are applied. This value is also used when only a horizontal split has been applied, dividing the pane into upper and lower regions. In that case, this value specifies the top pane. This value is also used when only a vertical split has been applied, dividing the pane into right and left regions. In that case, this value specifies the left pane
- top_right: Top right pane, when both vertical and horizontal splits are applied. This value is also used when only a vertical split has been applied, dividing the pane into right and left regions. In that case, this value specifies the right pane. default nil
50 51 52 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 50 def active_pane @active_pane end |
#state ⇒ Symbol
Split State Indicates whether the pane has horizontal / vertical splits, and whether those splits are frozen. Options are
- frozen: Panes are frozen, but were not split being frozen. In this state, when the panes are unfrozen again, a single pane results, with no split. In this state, the split bars are not adjustable.
- frozen_split: Panes are frozen and were split before being frozen. In this state, when the panes are unfrozen again, the split remains, but is adjustable.
- split: Panes are split, but not frozen. In this state, the split bars are adjustable by the user. default nil
69 70 71 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 69 def state @state end |
#top_left_cell ⇒ String
Top Left Visible Cell Location of the top left visible cell in the bottom right pane (when in Left-To-Right mode). default nil
77 78 79 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 77 def top_left_cell @top_left_cell end |
#x_split ⇒ Integer
Horizontal Split Position Horizontal position of the split, in 1/20th of a point; 0 (zero) if none. If the pane is frozen, this value indicates the number of columns visible in the top pane. default 0
86 87 88 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 86 def x_split @x_split end |
#y_split ⇒ Integer
Vertical Split Position Vertical position of the split, in 1/20th of a point; 0 (zero) if none. If the pane is frozen, this value indicates the number of rows visible in the left pane. default 0
95 96 97 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 95 def y_split @y_split end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serializes the data validation
125 126 127 128 |
# File 'lib/axlsx/workbook/worksheet/pane.rb', line 125 def to_xml_string(str = '') finalize serialized_tag 'pane', str end |