fast_excel 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1177 @@
1
+ module Libxlsxwriter
2
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format_underlines).</em>
3
+ #
4
+ # === Options:
5
+ # :underline_single ::
6
+ # Single underline
7
+ # :underline_double ::
8
+ # Double underline
9
+ # :underline_single_accounting ::
10
+ # Single accounting underline
11
+ # :underline_double_accounting ::
12
+ # Double accounting underline
13
+ #
14
+ # @method _enum_format_underlines_
15
+ # @return [Symbol]
16
+ # @scope class
17
+ enum :format_underlines, [
18
+ :underline_single, 1,
19
+ :underline_double, 2,
20
+ :underline_single_accounting, 3,
21
+ :underline_double_accounting, 4
22
+ ]
23
+
24
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format_scripts).</em>
25
+ #
26
+ # === Options:
27
+ # :font_superscript ::
28
+ # Superscript font
29
+ # :font_subscript ::
30
+ # Subscript font
31
+ #
32
+ # @method _enum_format_scripts_
33
+ # @return [Symbol]
34
+ # @scope class
35
+ enum :format_scripts, [
36
+ :font_superscript, 1,
37
+ :font_subscript, 2
38
+ ]
39
+
40
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format_alignments).</em>
41
+ #
42
+ # === Options:
43
+ # :align_none ::
44
+ # No alignment. Cell will use Excel's default for the data type
45
+ # :align_left ::
46
+ # Left horizontal alignment
47
+ # :align_center ::
48
+ # Center horizontal alignment
49
+ # :align_right ::
50
+ # Right horizontal alignment
51
+ # :align_fill ::
52
+ # Cell fill horizontal alignment
53
+ # :align_justify ::
54
+ # Justify horizontal alignment
55
+ # :align_center_across ::
56
+ # Center Across horizontal alignment
57
+ # :align_distributed ::
58
+ # Left horizontal alignment
59
+ # :align_vertical_top ::
60
+ # Top vertical alignment
61
+ # :align_vertical_bottom ::
62
+ # Bottom vertical alignment
63
+ # :align_vertical_center ::
64
+ # Center vertical alignment
65
+ # :align_vertical_justify ::
66
+ # Justify vertical alignment
67
+ # :align_vertical_distributed ::
68
+ # Distributed vertical alignment
69
+ #
70
+ # @method _enum_format_alignments_
71
+ # @return [Symbol]
72
+ # @scope class
73
+ enum :format_alignments, [
74
+ :align_none, 0,
75
+ :align_left, 1,
76
+ :align_center, 2,
77
+ :align_right, 3,
78
+ :align_fill, 4,
79
+ :align_justify, 5,
80
+ :align_center_across, 6,
81
+ :align_distributed, 7,
82
+ :align_vertical_top, 8,
83
+ :align_vertical_bottom, 9,
84
+ :align_vertical_center, 10,
85
+ :align_vertical_justify, 11,
86
+ :align_vertical_distributed, 12
87
+ ]
88
+
89
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format_diagonal_types).</em>
90
+ #
91
+ # === Options:
92
+ # :border_up ::
93
+ #
94
+ # :border_down ::
95
+ #
96
+ # :border_up_down ::
97
+ #
98
+ #
99
+ # @method _enum_format_diagonal_types_
100
+ # @return [Symbol]
101
+ # @scope class
102
+ enum :format_diagonal_types, [
103
+ :border_up, 1,
104
+ :border_down, 2,
105
+ :border_up_down, 3
106
+ ]
107
+
108
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:defined_colors).</em>
109
+ #
110
+ # === Options:
111
+ # :color_black ::
112
+ # Black
113
+ # :color_blue ::
114
+ # Blue
115
+ # :color_brown ::
116
+ # Brown
117
+ # :color_cyan ::
118
+ # Cyan
119
+ # :color_gray ::
120
+ # Gray
121
+ # :color_green ::
122
+ # Green
123
+ # :color_lime ::
124
+ # Lime
125
+ # :color_magenta ::
126
+ # Magenta
127
+ # :color_navy ::
128
+ # Navy
129
+ # :color_orange ::
130
+ # Orange
131
+ # :color_pink ::
132
+ # Pink
133
+ # :color_purple ::
134
+ # Purple
135
+ # :color_red ::
136
+ # Red
137
+ # :color_silver ::
138
+ # Silver
139
+ # :color_white ::
140
+ # White
141
+ # :color_yellow ::
142
+ # Yellow
143
+ #
144
+ # @method _enum_defined_colors_
145
+ # @return [Symbol]
146
+ # @scope class
147
+ enum :defined_colors, [
148
+ :color_black, 16777216,
149
+ :color_blue, 255,
150
+ :color_brown, 8388608,
151
+ :color_cyan, 65535,
152
+ :color_gray, 8421504,
153
+ :color_green, 32768,
154
+ :color_lime, 65280,
155
+ :color_magenta, 16711935,
156
+ :color_navy, 128,
157
+ :color_orange, 16737792,
158
+ :color_pink, 16711935,
159
+ :color_purple, 8388736,
160
+ :color_red, 16711680,
161
+ :color_silver, 12632256,
162
+ :color_white, 16777215,
163
+ :color_yellow, 16776960
164
+ ]
165
+
166
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format_patterns).</em>
167
+ #
168
+ # === Options:
169
+ # :pattern_none ::
170
+ # Empty pattern
171
+ # :pattern_solid ::
172
+ # Solid pattern
173
+ # :pattern_medium_gray ::
174
+ # Medium gray pattern
175
+ # :pattern_dark_gray ::
176
+ # Dark gray pattern
177
+ # :pattern_light_gray ::
178
+ # Light gray pattern
179
+ # :pattern_dark_horizontal ::
180
+ # Dark horizontal line pattern
181
+ # :pattern_dark_vertical ::
182
+ # Dark vertical line pattern
183
+ # :pattern_dark_down ::
184
+ # Dark diagonal stripe pattern
185
+ # :pattern_dark_up ::
186
+ # Reverse dark diagonal stripe pattern
187
+ # :pattern_dark_grid ::
188
+ # Dark grid pattern
189
+ # :pattern_dark_trellis ::
190
+ # Dark trellis pattern
191
+ # :pattern_light_horizontal ::
192
+ # Light horizontal Line pattern
193
+ # :pattern_light_vertical ::
194
+ # Light vertical line pattern
195
+ # :pattern_light_down ::
196
+ # Light diagonal stripe pattern
197
+ # :pattern_light_up ::
198
+ # Reverse light diagonal stripe pattern
199
+ # :pattern_light_grid ::
200
+ # Light grid pattern
201
+ # :pattern_light_trellis ::
202
+ # Light trellis pattern
203
+ # :pattern_gray_125 ::
204
+ # 12.5% gray pattern
205
+ # :pattern_gray_0625 ::
206
+ # 6.25% gray pattern
207
+ #
208
+ # @method _enum_format_patterns_
209
+ # @return [Symbol]
210
+ # @scope class
211
+ enum :format_patterns, [
212
+ :pattern_none, 0,
213
+ :pattern_solid, 1,
214
+ :pattern_medium_gray, 2,
215
+ :pattern_dark_gray, 3,
216
+ :pattern_light_gray, 4,
217
+ :pattern_dark_horizontal, 5,
218
+ :pattern_dark_vertical, 6,
219
+ :pattern_dark_down, 7,
220
+ :pattern_dark_up, 8,
221
+ :pattern_dark_grid, 9,
222
+ :pattern_dark_trellis, 10,
223
+ :pattern_light_horizontal, 11,
224
+ :pattern_light_vertical, 12,
225
+ :pattern_light_down, 13,
226
+ :pattern_light_up, 14,
227
+ :pattern_light_grid, 15,
228
+ :pattern_light_trellis, 16,
229
+ :pattern_gray_125, 17,
230
+ :pattern_gray_0625, 18
231
+ ]
232
+
233
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format_borders).</em>
234
+ #
235
+ # === Options:
236
+ # :border_none ::
237
+ # No border
238
+ # :border_thin ::
239
+ # Thin border style
240
+ # :border_medium ::
241
+ # Medium border style
242
+ # :border_dashed ::
243
+ # Dashed border style
244
+ # :border_dotted ::
245
+ # Dotted border style
246
+ # :border_thick ::
247
+ # Thick border style
248
+ # :border_double ::
249
+ # Double border style
250
+ # :border_hair ::
251
+ # Hair border style
252
+ # :border_medium_dashed ::
253
+ # Medium dashed border style
254
+ # :border_dash_dot ::
255
+ # Dash-dot border style
256
+ # :border_medium_dash_dot ::
257
+ # Medium dash-dot border style
258
+ # :border_dash_dot_dot ::
259
+ # Dash-dot-dot border style
260
+ # :border_medium_dash_dot_dot ::
261
+ # Medium dash-dot-dot border style
262
+ # :border_slant_dash_dot ::
263
+ # Slant dash-dot border style
264
+ #
265
+ # @method _enum_format_borders_
266
+ # @return [Symbol]
267
+ # @scope class
268
+ enum :format_borders, [
269
+ :border_none, 0,
270
+ :border_thin, 1,
271
+ :border_medium, 2,
272
+ :border_dashed, 3,
273
+ :border_dotted, 4,
274
+ :border_thick, 5,
275
+ :border_double, 6,
276
+ :border_hair, 7,
277
+ :border_medium_dashed, 8,
278
+ :border_dash_dot, 9,
279
+ :border_medium_dash_dot, 10,
280
+ :border_dash_dot_dot, 11,
281
+ :border_medium_dash_dot_dot, 12,
282
+ :border_slant_dash_dot, 13
283
+ ]
284
+
285
+ # = Fields:
286
+ # :stqe_next ::
287
+ # (FFI::Pointer(*Format))
288
+ class FormatListPointers < FFI::Struct
289
+ layout :stqe_next, :pointer
290
+ end
291
+
292
+ # = Fields:
293
+ # :file ::
294
+ # (FFI::Pointer(*FILE))
295
+ # :xf_format_indices ::
296
+ # (HashTable)
297
+ # :num_xf_formats ::
298
+ # (FFI::Pointer(*Uint16T))
299
+ # :xf_index ::
300
+ # (Integer)
301
+ # :dxf_index ::
302
+ # (Integer)
303
+ # :num_format ::
304
+ # (Array<Integer>)
305
+ # :font_name ::
306
+ # (Array<Integer>)
307
+ # :font_scheme ::
308
+ # (Array<Integer>)
309
+ # :num_format_index ::
310
+ # (Integer)
311
+ # :font_index ::
312
+ # (Integer)
313
+ # :has_font ::
314
+ # (Integer)
315
+ # :has_dxf_font ::
316
+ # (Integer)
317
+ # :font_size ::
318
+ # (Integer)
319
+ # :bold ::
320
+ # (Integer)
321
+ # :italic ::
322
+ # (Integer)
323
+ # :font_color ::
324
+ # (Integer)
325
+ # :underline ::
326
+ # (Integer)
327
+ # :font_strikeout ::
328
+ # (Integer)
329
+ # :font_outline ::
330
+ # (Integer)
331
+ # :font_shadow ::
332
+ # (Integer)
333
+ # :font_script ::
334
+ # (Integer)
335
+ # :font_family ::
336
+ # (Integer)
337
+ # :font_charset ::
338
+ # (Integer)
339
+ # :font_condense ::
340
+ # (Integer)
341
+ # :font_extend ::
342
+ # (Integer)
343
+ # :theme ::
344
+ # (Integer)
345
+ # :hyperlink ::
346
+ # (Integer)
347
+ # :hidden ::
348
+ # (Integer)
349
+ # :locked ::
350
+ # (Integer)
351
+ # :text_h_align ::
352
+ # (Integer)
353
+ # :text_wrap ::
354
+ # (Integer)
355
+ # :text_v_align ::
356
+ # (Integer)
357
+ # :text_justlast ::
358
+ # (Integer)
359
+ # :rotation ::
360
+ # (Integer)
361
+ # :fg_color ::
362
+ # (Integer)
363
+ # :bg_color ::
364
+ # (Integer)
365
+ # :pattern ::
366
+ # (Integer)
367
+ # :has_fill ::
368
+ # (Integer)
369
+ # :has_dxf_fill ::
370
+ # (Integer)
371
+ # :fill_index ::
372
+ # (Integer)
373
+ # :fill_count ::
374
+ # (Integer)
375
+ # :border_index ::
376
+ # (Integer)
377
+ # :has_border ::
378
+ # (Integer)
379
+ # :has_dxf_border ::
380
+ # (Integer)
381
+ # :border_count ::
382
+ # (Integer)
383
+ # :bottom ::
384
+ # (Integer)
385
+ # :diag_border ::
386
+ # (Integer)
387
+ # :diag_type ::
388
+ # (Integer)
389
+ # :left ::
390
+ # (Integer)
391
+ # :right ::
392
+ # (Integer)
393
+ # :top ::
394
+ # (Integer)
395
+ # :bottom_color ::
396
+ # (Integer)
397
+ # :diag_color ::
398
+ # (Integer)
399
+ # :left_color ::
400
+ # (Integer)
401
+ # :right_color ::
402
+ # (Integer)
403
+ # :top_color ::
404
+ # (Integer)
405
+ # :indent ::
406
+ # (Integer)
407
+ # :shrink ::
408
+ # (Integer)
409
+ # :merge_range ::
410
+ # (Integer)
411
+ # :reading_order ::
412
+ # (Integer)
413
+ # :just_distrib ::
414
+ # (Integer)
415
+ # :color_indexed ::
416
+ # (Integer)
417
+ # :font_only ::
418
+ # (Integer)
419
+ # :list_pointers ::
420
+ # (FormatListPointers)
421
+ module FormatWrappers
422
+ # @return [nil]
423
+ def free()
424
+ Libxlsxwriter.format_free(self)
425
+ end
426
+
427
+ # @return [Integer]
428
+ def get_xf_index()
429
+ Libxlsxwriter.format_get_xf_index(self)
430
+ end
431
+
432
+ # @return [Font]
433
+ def get_font_key()
434
+ Font.new Libxlsxwriter.format_get_font_key(self)
435
+ end
436
+
437
+ # @return [Border]
438
+ def get_border_key()
439
+ Border.new Libxlsxwriter.format_get_border_key(self)
440
+ end
441
+
442
+ # @return [Fill]
443
+ def get_fill_key()
444
+ Fill.new Libxlsxwriter.format_get_fill_key(self)
445
+ end
446
+
447
+ # @param [String] font_name
448
+ # @return [nil]
449
+ def set_font_name(font_name)
450
+ Libxlsxwriter.format_set_font_name(self, font_name)
451
+ end
452
+
453
+ # @param [Integer] size
454
+ # @return [nil]
455
+ def set_font_size(size)
456
+ Libxlsxwriter.format_set_font_size(self, size)
457
+ end
458
+
459
+ # @param [Integer] color
460
+ # @return [nil]
461
+ def set_font_color(color)
462
+ Libxlsxwriter.format_set_font_color(self, color)
463
+ end
464
+
465
+ # @return [nil]
466
+ def set_bold()
467
+ Libxlsxwriter.format_set_bold(self)
468
+ end
469
+
470
+ # @return [nil]
471
+ def set_italic()
472
+ Libxlsxwriter.format_set_italic(self)
473
+ end
474
+
475
+ # @param [Integer] style
476
+ # @return [nil]
477
+ def set_underline(style)
478
+ Libxlsxwriter.format_set_underline(self, style)
479
+ end
480
+
481
+ # @return [nil]
482
+ def set_font_strikeout()
483
+ Libxlsxwriter.format_set_font_strikeout(self)
484
+ end
485
+
486
+ # @param [Integer] style
487
+ # @return [nil]
488
+ def set_font_script(style)
489
+ Libxlsxwriter.format_set_font_script(self, style)
490
+ end
491
+
492
+ # @param [String] num_format
493
+ # @return [nil]
494
+ def set_num_format(num_format)
495
+ Libxlsxwriter.format_set_num_format(self, num_format)
496
+ end
497
+
498
+ # @param [Integer] index
499
+ # @return [nil]
500
+ def set_num_format_index(index)
501
+ Libxlsxwriter.format_set_num_format_index(self, index)
502
+ end
503
+
504
+ # @return [nil]
505
+ def set_unlocked()
506
+ Libxlsxwriter.format_set_unlocked(self)
507
+ end
508
+
509
+ # @return [nil]
510
+ def set_hidden()
511
+ Libxlsxwriter.format_set_hidden(self)
512
+ end
513
+
514
+ # @param [Integer] alignment
515
+ # @return [nil]
516
+ def set_align(alignment)
517
+ Libxlsxwriter.format_set_align(self, alignment)
518
+ end
519
+
520
+ # @return [nil]
521
+ def set_text_wrap()
522
+ Libxlsxwriter.format_set_text_wrap(self)
523
+ end
524
+
525
+ # @param [Integer] angle
526
+ # @return [nil]
527
+ def set_rotation(angle)
528
+ Libxlsxwriter.format_set_rotation(self, angle)
529
+ end
530
+
531
+ # @param [Integer] level
532
+ # @return [nil]
533
+ def set_indent(level)
534
+ Libxlsxwriter.format_set_indent(self, level)
535
+ end
536
+
537
+ # @return [nil]
538
+ def set_shrink()
539
+ Libxlsxwriter.format_set_shrink(self)
540
+ end
541
+
542
+ # @param [Integer] index
543
+ # @return [nil]
544
+ def set_pattern(index)
545
+ Libxlsxwriter.format_set_pattern(self, index)
546
+ end
547
+
548
+ # @param [Integer] color
549
+ # @return [nil]
550
+ def set_bg_color(color)
551
+ Libxlsxwriter.format_set_bg_color(self, color)
552
+ end
553
+
554
+ # @param [Integer] color
555
+ # @return [nil]
556
+ def set_fg_color(color)
557
+ Libxlsxwriter.format_set_fg_color(self, color)
558
+ end
559
+
560
+ # @param [Integer] style
561
+ # @return [nil]
562
+ def set_border(style)
563
+ Libxlsxwriter.format_set_border(self, style)
564
+ end
565
+
566
+ # @param [Integer] style
567
+ # @return [nil]
568
+ def set_bottom(style)
569
+ Libxlsxwriter.format_set_bottom(self, style)
570
+ end
571
+
572
+ # @param [Integer] style
573
+ # @return [nil]
574
+ def set_top(style)
575
+ Libxlsxwriter.format_set_top(self, style)
576
+ end
577
+
578
+ # @param [Integer] style
579
+ # @return [nil]
580
+ def set_left(style)
581
+ Libxlsxwriter.format_set_left(self, style)
582
+ end
583
+
584
+ # @param [Integer] style
585
+ # @return [nil]
586
+ def set_right(style)
587
+ Libxlsxwriter.format_set_right(self, style)
588
+ end
589
+
590
+ # @param [Integer] color
591
+ # @return [nil]
592
+ def set_border_color(color)
593
+ Libxlsxwriter.format_set_border_color(self, color)
594
+ end
595
+
596
+ # @param [Integer] color
597
+ # @return [nil]
598
+ def set_bottom_color(color)
599
+ Libxlsxwriter.format_set_bottom_color(self, color)
600
+ end
601
+
602
+ # @param [Integer] color
603
+ # @return [nil]
604
+ def set_top_color(color)
605
+ Libxlsxwriter.format_set_top_color(self, color)
606
+ end
607
+
608
+ # @param [Integer] color
609
+ # @return [nil]
610
+ def set_left_color(color)
611
+ Libxlsxwriter.format_set_left_color(self, color)
612
+ end
613
+
614
+ # @param [Integer] color
615
+ # @return [nil]
616
+ def set_right_color(color)
617
+ Libxlsxwriter.format_set_right_color(self, color)
618
+ end
619
+
620
+ # @param [Integer] value
621
+ # @return [nil]
622
+ def set_diag_type(value)
623
+ Libxlsxwriter.format_set_diag_type(self, value)
624
+ end
625
+
626
+ # @param [Integer] color
627
+ # @return [nil]
628
+ def set_diag_color(color)
629
+ Libxlsxwriter.format_set_diag_color(self, color)
630
+ end
631
+
632
+ # @param [Integer] value
633
+ # @return [nil]
634
+ def set_diag_border(value)
635
+ Libxlsxwriter.format_set_diag_border(self, value)
636
+ end
637
+
638
+ # @return [nil]
639
+ def set_font_outline()
640
+ Libxlsxwriter.format_set_font_outline(self)
641
+ end
642
+
643
+ # @return [nil]
644
+ def set_font_shadow()
645
+ Libxlsxwriter.format_set_font_shadow(self)
646
+ end
647
+
648
+ # @param [Integer] value
649
+ # @return [nil]
650
+ def set_font_family(value)
651
+ Libxlsxwriter.format_set_font_family(self, value)
652
+ end
653
+
654
+ # @param [Integer] value
655
+ # @return [nil]
656
+ def set_font_charset(value)
657
+ Libxlsxwriter.format_set_font_charset(self, value)
658
+ end
659
+
660
+ # @param [String] font_scheme
661
+ # @return [nil]
662
+ def set_font_scheme(font_scheme)
663
+ Libxlsxwriter.format_set_font_scheme(self, font_scheme)
664
+ end
665
+
666
+ # @return [nil]
667
+ def set_font_condense()
668
+ Libxlsxwriter.format_set_font_condense(self)
669
+ end
670
+
671
+ # @return [nil]
672
+ def set_font_extend()
673
+ Libxlsxwriter.format_set_font_extend(self)
674
+ end
675
+
676
+ # @param [Integer] value
677
+ # @return [nil]
678
+ def set_reading_order(value)
679
+ Libxlsxwriter.format_set_reading_order(self, value)
680
+ end
681
+
682
+ # @param [Integer] value
683
+ # @return [nil]
684
+ def set_theme(value)
685
+ Libxlsxwriter.format_set_theme(self, value)
686
+ end
687
+ end
688
+
689
+ class Format < FFI::Struct
690
+ include FormatWrappers
691
+ layout :file, :pointer,
692
+ :xf_format_indices, HashTable.ptr,
693
+ :num_xf_formats, :pointer,
694
+ :xf_index, :int32_t,
695
+ :dxf_index, :int32_t,
696
+ :num_format, [:char, 128],
697
+ :font_name, [:char, 128],
698
+ :font_scheme, [:char, 128],
699
+ :num_format_index, :uint16,
700
+ :font_index, :uint16,
701
+ :has_font, :uchar,
702
+ :has_dxf_font, :uchar,
703
+ :font_size, :uint16,
704
+ :bold, :uchar,
705
+ :italic, :uchar,
706
+ :font_color, :int,
707
+ :underline, :uchar,
708
+ :font_strikeout, :uchar,
709
+ :font_outline, :uchar,
710
+ :font_shadow, :uchar,
711
+ :font_script, :uchar,
712
+ :font_family, :uchar,
713
+ :font_charset, :uchar,
714
+ :font_condense, :uchar,
715
+ :font_extend, :uchar,
716
+ :theme, :uchar,
717
+ :hyperlink, :uchar,
718
+ :hidden, :uchar,
719
+ :locked, :uchar,
720
+ :text_h_align, :uchar,
721
+ :text_wrap, :uchar,
722
+ :text_v_align, :uchar,
723
+ :text_justlast, :uchar,
724
+ :rotation, :short,
725
+ :fg_color, :int,
726
+ :bg_color, :int,
727
+ :pattern, :uchar,
728
+ :has_fill, :uchar,
729
+ :has_dxf_fill, :uchar,
730
+ :fill_index, :int,
731
+ :fill_count, :int,
732
+ :border_index, :int,
733
+ :has_border, :uchar,
734
+ :has_dxf_border, :uchar,
735
+ :border_count, :int,
736
+ :bottom, :uchar,
737
+ :diag_border, :uchar,
738
+ :diag_type, :uchar,
739
+ :left, :uchar,
740
+ :right, :uchar,
741
+ :top, :uchar,
742
+ :bottom_color, :int,
743
+ :diag_color, :int,
744
+ :left_color, :int,
745
+ :right_color, :int,
746
+ :top_color, :int,
747
+ :indent, :uchar,
748
+ :shrink, :uchar,
749
+ :merge_range, :uchar,
750
+ :reading_order, :uchar,
751
+ :just_distrib, :uchar,
752
+ :color_indexed, :uchar,
753
+ :font_only, :uchar,
754
+ :list_pointers, FormatListPointers.by_value
755
+ end
756
+
757
+
758
+ # = Fields:
759
+ # :font_name ::
760
+ # (Array<Integer>)
761
+ # :font_size ::
762
+ # (Integer)
763
+ # :bold ::
764
+ # (Integer)
765
+ # :italic ::
766
+ # (Integer)
767
+ # :underline ::
768
+ # (Integer)
769
+ # :font_strikeout ::
770
+ # (Integer)
771
+ # :font_outline ::
772
+ # (Integer)
773
+ # :font_shadow ::
774
+ # (Integer)
775
+ # :font_script ::
776
+ # (Integer)
777
+ # :font_family ::
778
+ # (Integer)
779
+ # :font_charset ::
780
+ # (Integer)
781
+ # :font_condense ::
782
+ # (Integer)
783
+ # :font_extend ::
784
+ # (Integer)
785
+ # :font_color ::
786
+ # (Integer)
787
+ class Font < FFI::Struct
788
+ layout :font_name, [:char, 128],
789
+ :font_size, :ushort,
790
+ :bold, :uchar,
791
+ :italic, :uchar,
792
+ :underline, :uchar,
793
+ :font_strikeout, :uchar,
794
+ :font_outline, :uchar,
795
+ :font_shadow, :uchar,
796
+ :font_script, :uchar,
797
+ :font_family, :uchar,
798
+ :font_charset, :uchar,
799
+ :font_condense, :uchar,
800
+ :font_extend, :uchar,
801
+ :font_color, :int
802
+ end
803
+
804
+ # = Fields:
805
+ # :bottom ::
806
+ # (Integer)
807
+ # :diag_border ::
808
+ # (Integer)
809
+ # :diag_type ::
810
+ # (Integer)
811
+ # :left ::
812
+ # (Integer)
813
+ # :right ::
814
+ # (Integer)
815
+ # :top ::
816
+ # (Integer)
817
+ # :bottom_color ::
818
+ # (Integer)
819
+ # :diag_color ::
820
+ # (Integer)
821
+ # :left_color ::
822
+ # (Integer)
823
+ # :right_color ::
824
+ # (Integer)
825
+ # :top_color ::
826
+ # (Integer)
827
+ class Border < FFI::Struct
828
+ layout :bottom, :uchar,
829
+ :diag_border, :uchar,
830
+ :diag_type, :uchar,
831
+ :left, :uchar,
832
+ :right, :uchar,
833
+ :top, :uchar,
834
+ :bottom_color, :int,
835
+ :diag_color, :int,
836
+ :left_color, :int,
837
+ :right_color, :int,
838
+ :top_color, :int
839
+ end
840
+
841
+ # = Fields:
842
+ # :fg_color ::
843
+ # (Integer)
844
+ # :bg_color ::
845
+ # (Integer)
846
+ # :pattern ::
847
+ # (Integer)
848
+ class Fill < FFI::Struct
849
+ layout :fg_color, :int,
850
+ :bg_color, :int,
851
+ :pattern, :uchar
852
+ end
853
+
854
+ # @method format_new()
855
+ # @return [Format]
856
+ # @scope class
857
+ attach_function :format_new, :lxw_format_new, [], Format
858
+
859
+ # @method format_free(format)
860
+ # @param [Format] format
861
+ # @return [nil]
862
+ # @scope class
863
+ attach_function :format_free, :lxw_format_free, [Format], :void
864
+
865
+ # @method format_get_xf_index(format)
866
+ # @param [Format] format
867
+ # @return [Integer]
868
+ # @scope class
869
+ attach_function :format_get_xf_index, :lxw_format_get_xf_index, [Format], :int
870
+
871
+ # @method format_get_font_key(format)
872
+ # @param [Format] format
873
+ # @return [Font]
874
+ # @scope class
875
+ attach_function :format_get_font_key, :lxw_format_get_font_key, [Format], Font
876
+
877
+ # @method format_get_border_key(format)
878
+ # @param [Format] format
879
+ # @return [Border]
880
+ # @scope class
881
+ attach_function :format_get_border_key, :lxw_format_get_border_key, [Format], Border
882
+
883
+ # @method format_get_fill_key(format)
884
+ # @param [Format] format
885
+ # @return [Fill]
886
+ # @scope class
887
+ attach_function :format_get_fill_key, :lxw_format_get_fill_key, [Format], Fill
888
+
889
+ # @method format_check_color(color)
890
+ # @param [Integer] color
891
+ # @return [Integer]
892
+ # @scope class
893
+ attach_function :format_check_color, :lxw_format_check_color, [:int], :int
894
+
895
+ # @method format_set_font_name(format, font_name)
896
+ # @param [Format] format
897
+ # @param [String] font_name
898
+ # @return [nil]
899
+ # @scope class
900
+ attach_function :format_set_font_name, :format_set_font_name, [Format, :string], :void
901
+
902
+ # @method format_set_font_size(format, size)
903
+ # @param [Format] format
904
+ # @param [Integer] size
905
+ # @return [nil]
906
+ # @scope class
907
+ attach_function :format_set_font_size, :format_set_font_size, [Format, :ushort], :void
908
+
909
+ # @method format_set_font_color(format, color)
910
+ # @param [Format] format
911
+ # @param [Integer] color
912
+ # @return [nil]
913
+ # @scope class
914
+ attach_function :format_set_font_color, :format_set_font_color, [Format, :int], :void
915
+
916
+ # @method format_set_bold(format)
917
+ # @param [Format] format
918
+ # @return [nil]
919
+ # @scope class
920
+ attach_function :format_set_bold, :format_set_bold, [Format], :void
921
+
922
+ # @method format_set_italic(format)
923
+ # @param [Format] format
924
+ # @return [nil]
925
+ # @scope class
926
+ attach_function :format_set_italic, :format_set_italic, [Format], :void
927
+
928
+ # @method format_set_underline(format, style)
929
+ # @param [Format] format
930
+ # @param [Integer] style
931
+ # @return [nil]
932
+ # @scope class
933
+ attach_function :format_set_underline, :format_set_underline, [Format, :uchar], :void
934
+
935
+ # @method format_set_font_strikeout(format)
936
+ # @param [Format] format
937
+ # @return [nil]
938
+ # @scope class
939
+ attach_function :format_set_font_strikeout, :format_set_font_strikeout, [Format], :void
940
+
941
+ # @method format_set_font_script(format, style)
942
+ # @param [Format] format
943
+ # @param [Integer] style
944
+ # @return [nil]
945
+ # @scope class
946
+ attach_function :format_set_font_script, :format_set_font_script, [Format, :uchar], :void
947
+
948
+ # @method format_set_num_format(format, num_format)
949
+ # @param [Format] format
950
+ # @param [String] num_format
951
+ # @return [nil]
952
+ # @scope class
953
+ attach_function :format_set_num_format, :format_set_num_format, [Format, :string], :void
954
+
955
+ # @method format_set_num_format_index(format, index)
956
+ # @param [Format] format
957
+ # @param [Integer] index
958
+ # @return [nil]
959
+ # @scope class
960
+ attach_function :format_set_num_format_index, :format_set_num_format_index, [Format, :uchar], :void
961
+
962
+ # @method format_set_unlocked(format)
963
+ # @param [Format] format
964
+ # @return [nil]
965
+ # @scope class
966
+ attach_function :format_set_unlocked, :format_set_unlocked, [Format], :void
967
+
968
+ # @method format_set_hidden(format)
969
+ # @param [Format] format
970
+ # @return [nil]
971
+ # @scope class
972
+ attach_function :format_set_hidden, :format_set_hidden, [Format], :void
973
+
974
+ # @method format_set_align(format, alignment)
975
+ # @param [Format] format
976
+ # @param [Integer] alignment
977
+ # @return [nil]
978
+ # @scope class
979
+ attach_function :format_set_align, :format_set_align, [Format, :uchar], :void
980
+
981
+ # @method format_set_text_wrap(format)
982
+ # @param [Format] format
983
+ # @return [nil]
984
+ # @scope class
985
+ attach_function :format_set_text_wrap, :format_set_text_wrap, [Format], :void
986
+
987
+ # @method format_set_rotation(format, angle)
988
+ # @param [Format] format
989
+ # @param [Integer] angle
990
+ # @return [nil]
991
+ # @scope class
992
+ attach_function :format_set_rotation, :format_set_rotation, [Format, :short], :void
993
+
994
+ # @method format_set_indent(format, level)
995
+ # @param [Format] format
996
+ # @param [Integer] level
997
+ # @return [nil]
998
+ # @scope class
999
+ attach_function :format_set_indent, :format_set_indent, [Format, :uchar], :void
1000
+
1001
+ # @method format_set_shrink(format)
1002
+ # @param [Format] format
1003
+ # @return [nil]
1004
+ # @scope class
1005
+ attach_function :format_set_shrink, :format_set_shrink, [Format], :void
1006
+
1007
+ # @method format_set_pattern(format, index)
1008
+ # @param [Format] format
1009
+ # @param [Integer] index
1010
+ # @return [nil]
1011
+ # @scope class
1012
+ attach_function :format_set_pattern, :format_set_pattern, [Format, :uchar], :void
1013
+
1014
+ # @method format_set_bg_color(format, color)
1015
+ # @param [Format] format
1016
+ # @param [Integer] color
1017
+ # @return [nil]
1018
+ # @scope class
1019
+ attach_function :format_set_bg_color, :format_set_bg_color, [Format, :int], :void
1020
+
1021
+ # @method format_set_fg_color(format, color)
1022
+ # @param [Format] format
1023
+ # @param [Integer] color
1024
+ # @return [nil]
1025
+ # @scope class
1026
+ attach_function :format_set_fg_color, :format_set_fg_color, [Format, :int], :void
1027
+
1028
+ # @method format_set_border(format, style)
1029
+ # @param [Format] format
1030
+ # @param [Integer] style
1031
+ # @return [nil]
1032
+ # @scope class
1033
+ attach_function :format_set_border, :format_set_border, [Format, :uchar], :void
1034
+
1035
+ # @method format_set_bottom(format, style)
1036
+ # @param [Format] format
1037
+ # @param [Integer] style
1038
+ # @return [nil]
1039
+ # @scope class
1040
+ attach_function :format_set_bottom, :format_set_bottom, [Format, :uchar], :void
1041
+
1042
+ # @method format_set_top(format, style)
1043
+ # @param [Format] format
1044
+ # @param [Integer] style
1045
+ # @return [nil]
1046
+ # @scope class
1047
+ attach_function :format_set_top, :format_set_top, [Format, :uchar], :void
1048
+
1049
+ # @method format_set_left(format, style)
1050
+ # @param [Format] format
1051
+ # @param [Integer] style
1052
+ # @return [nil]
1053
+ # @scope class
1054
+ attach_function :format_set_left, :format_set_left, [Format, :uchar], :void
1055
+
1056
+ # @method format_set_right(format, style)
1057
+ # @param [Format] format
1058
+ # @param [Integer] style
1059
+ # @return [nil]
1060
+ # @scope class
1061
+ attach_function :format_set_right, :format_set_right, [Format, :uchar], :void
1062
+
1063
+ # @method format_set_border_color(format, color)
1064
+ # @param [Format] format
1065
+ # @param [Integer] color
1066
+ # @return [nil]
1067
+ # @scope class
1068
+ attach_function :format_set_border_color, :format_set_border_color, [Format, :int], :void
1069
+
1070
+ # @method format_set_bottom_color(format, color)
1071
+ # @param [Format] format
1072
+ # @param [Integer] color
1073
+ # @return [nil]
1074
+ # @scope class
1075
+ attach_function :format_set_bottom_color, :format_set_bottom_color, [Format, :int], :void
1076
+
1077
+ # @method format_set_top_color(format, color)
1078
+ # @param [Format] format
1079
+ # @param [Integer] color
1080
+ # @return [nil]
1081
+ # @scope class
1082
+ attach_function :format_set_top_color, :format_set_top_color, [Format, :int], :void
1083
+
1084
+ # @method format_set_left_color(format, color)
1085
+ # @param [Format] format
1086
+ # @param [Integer] color
1087
+ # @return [nil]
1088
+ # @scope class
1089
+ attach_function :format_set_left_color, :format_set_left_color, [Format, :int], :void
1090
+
1091
+ # @method format_set_right_color(format, color)
1092
+ # @param [Format] format
1093
+ # @param [Integer] color
1094
+ # @return [nil]
1095
+ # @scope class
1096
+ attach_function :format_set_right_color, :format_set_right_color, [Format, :int], :void
1097
+
1098
+ # @method format_set_diag_type(format, value)
1099
+ # @param [Format] format
1100
+ # @param [Integer] value
1101
+ # @return [nil]
1102
+ # @scope class
1103
+ attach_function :format_set_diag_type, :format_set_diag_type, [Format, :uchar], :void
1104
+
1105
+ # @method format_set_diag_color(format, color)
1106
+ # @param [Format] format
1107
+ # @param [Integer] color
1108
+ # @return [nil]
1109
+ # @scope class
1110
+ attach_function :format_set_diag_color, :format_set_diag_color, [Format, :int], :void
1111
+
1112
+ # @method format_set_diag_border(format, value)
1113
+ # @param [Format] format
1114
+ # @param [Integer] value
1115
+ # @return [nil]
1116
+ # @scope class
1117
+ attach_function :format_set_diag_border, :format_set_diag_border, [Format, :uchar], :void
1118
+
1119
+ # @method format_set_font_outline(format)
1120
+ # @param [Format] format
1121
+ # @return [nil]
1122
+ # @scope class
1123
+ attach_function :format_set_font_outline, :format_set_font_outline, [Format], :void
1124
+
1125
+ # @method format_set_font_shadow(format)
1126
+ # @param [Format] format
1127
+ # @return [nil]
1128
+ # @scope class
1129
+ attach_function :format_set_font_shadow, :format_set_font_shadow, [Format], :void
1130
+
1131
+ # @method format_set_font_family(format, value)
1132
+ # @param [Format] format
1133
+ # @param [Integer] value
1134
+ # @return [nil]
1135
+ # @scope class
1136
+ attach_function :format_set_font_family, :format_set_font_family, [Format, :uchar], :void
1137
+
1138
+ # @method format_set_font_charset(format, value)
1139
+ # @param [Format] format
1140
+ # @param [Integer] value
1141
+ # @return [nil]
1142
+ # @scope class
1143
+ attach_function :format_set_font_charset, :format_set_font_charset, [Format, :uchar], :void
1144
+
1145
+ # @method format_set_font_scheme(format, font_scheme)
1146
+ # @param [Format] format
1147
+ # @param [String] font_scheme
1148
+ # @return [nil]
1149
+ # @scope class
1150
+ attach_function :format_set_font_scheme, :format_set_font_scheme, [Format, :string], :void
1151
+
1152
+ # @method format_set_font_condense(format)
1153
+ # @param [Format] format
1154
+ # @return [nil]
1155
+ # @scope class
1156
+ attach_function :format_set_font_condense, :format_set_font_condense, [Format], :void
1157
+
1158
+ # @method format_set_font_extend(format)
1159
+ # @param [Format] format
1160
+ # @return [nil]
1161
+ # @scope class
1162
+ attach_function :format_set_font_extend, :format_set_font_extend, [Format], :void
1163
+
1164
+ # @method format_set_reading_order(format, value)
1165
+ # @param [Format] format
1166
+ # @param [Integer] value
1167
+ # @return [nil]
1168
+ # @scope class
1169
+ attach_function :format_set_reading_order, :format_set_reading_order, [Format, :uchar], :void
1170
+
1171
+ # @method format_set_theme(format, value)
1172
+ # @param [Format] format
1173
+ # @param [Integer] value
1174
+ # @return [nil]
1175
+ # @scope class
1176
+ attach_function :format_set_theme, :format_set_theme, [Format, :uchar], :void
1177
+ end