Method: Spreadsheet::Excel::Writer::Workbook#write_window1
- Defined in:
- lib/spreadsheet/excel/writer/workbook.rb
#write_window1(workbook, writer) ⇒ Object
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/spreadsheet/excel/writer/workbook.rb', line 554 def write_window1 workbook, writer selected = workbook.worksheets.find { |sheet| sheet.selected } actidx = workbook.worksheets.index selected data = [ 0x0000, # Horizontal position of the document window # (in twips = 1/20 of a point) 0x0000, # Vertical position of the document window # (in twips = 1/20 of a point) 0x4000, # Width of the document window (in twips = 1/20 of a point) 0x2000, # Height of the document window (in twips = 1/20 of a point) 0x0038, # Option flags: # Bit Mask Contents # 0 0x0001 0 = Window is visible # 1 = Window is hidden # 1 0x0002 0 = Window is open # 1 = Window is minimised # 3 0x0008 0 = Horizontal scroll bar hidden # 1 = Horizontal scroll bar visible # 4 0x0010 0 = Vertical scroll bar hidden # 1 = Vertical scroll bar visible # 5 0x0020 0 = Worksheet tab bar hidden # 1 = Worksheet tab bar visible actidx, # Index to active (displayed) worksheet 0x0000, # Index of first visible tab in the worksheet tab bar 0x0001, # Number of selected worksheets # (highlighted in the worksheet tab bar) 0x00e5 # Width of worksheet tab bar (in 1/1000 of window width). # The remaining space is used by the horizontal scrollbar. ] write_op writer, 0x003d, data.pack("v*") end |