ruby_pptx 0.1.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.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +83 -0
  3. data/LICENSE +21 -0
  4. data/NOTICE +48 -0
  5. data/README.md +272 -0
  6. data/lib/ruby_pptx/action.rb +120 -0
  7. data/lib/ruby_pptx/autoshape_spec.rb +337 -0
  8. data/lib/ruby_pptx/builder.rb +228 -0
  9. data/lib/ruby_pptx/chart/categories.rb +208 -0
  10. data/lib/ruby_pptx/chart/chart.rb +443 -0
  11. data/lib/ruby_pptx/chart/combo.rb +230 -0
  12. data/lib/ruby_pptx/chart/data.rb +147 -0
  13. data/lib/ruby_pptx/chart/format.rb +647 -0
  14. data/lib/ruby_pptx/chart/workbook_writer.rb +212 -0
  15. data/lib/ruby_pptx/chart/xml_writer.rb +953 -0
  16. data/lib/ruby_pptx/chart/xy_data.rb +182 -0
  17. data/lib/ruby_pptx/core_ext.rb +12 -0
  18. data/lib/ruby_pptx/dml/color.rb +155 -0
  19. data/lib/ruby_pptx/dml/effect.rb +33 -0
  20. data/lib/ruby_pptx/dml/fill.rb +234 -0
  21. data/lib/ruby_pptx/element_proxy.rb +53 -0
  22. data/lib/ruby_pptx/enum/action.rb +46 -0
  23. data/lib/ruby_pptx/enum/base.rb +139 -0
  24. data/lib/ruby_pptx/enum/chart.rb +278 -0
  25. data/lib/ruby_pptx/enum/dml.rb +237 -0
  26. data/lib/ruby_pptx/enum/lang.rb +441 -0
  27. data/lib/ruby_pptx/enum/prog_id.rb +38 -0
  28. data/lib/ruby_pptx/enum/shapes.rb +514 -0
  29. data/lib/ruby_pptx/enum/text.rb +108 -0
  30. data/lib/ruby_pptx/errors.rb +15 -0
  31. data/lib/ruby_pptx/geometry.rb +89 -0
  32. data/lib/ruby_pptx/image.rb +347 -0
  33. data/lib/ruby_pptx/length.rb +120 -0
  34. data/lib/ruby_pptx/media.rb +64 -0
  35. data/lib/ruby_pptx/numeric_lengths.rb +30 -0
  36. data/lib/ruby_pptx/opc/constants.rb +205 -0
  37. data/lib/ruby_pptx/opc/oxml.rb +99 -0
  38. data/lib/ruby_pptx/opc/pack_uri.rb +146 -0
  39. data/lib/ruby_pptx/opc/package.rb +482 -0
  40. data/lib/ruby_pptx/opc/serialized.rb +229 -0
  41. data/lib/ruby_pptx/opc/spec.rb +37 -0
  42. data/lib/ruby_pptx/oxml/action.rb +43 -0
  43. data/lib/ruby_pptx/oxml/chart.rb +785 -0
  44. data/lib/ruby_pptx/oxml/content_model.rb +186 -0
  45. data/lib/ruby_pptx/oxml/core_properties.rb +145 -0
  46. data/lib/ruby_pptx/oxml/dml/color.rb +115 -0
  47. data/lib/ruby_pptx/oxml/dml/fill.rb +137 -0
  48. data/lib/ruby_pptx/oxml/element.rb +329 -0
  49. data/lib/ruby_pptx/oxml/ns.rb +115 -0
  50. data/lib/ruby_pptx/oxml/presentation.rb +110 -0
  51. data/lib/ruby_pptx/oxml/section.rb +65 -0
  52. data/lib/ruby_pptx/oxml/shapes/autoshape.rb +310 -0
  53. data/lib/ruby_pptx/oxml/shapes/groupshape.rb +217 -0
  54. data/lib/ruby_pptx/oxml/shapes/other.rb +405 -0
  55. data/lib/ruby_pptx/oxml/shapes/shared.rb +292 -0
  56. data/lib/ruby_pptx/oxml/simple_types.rb +563 -0
  57. data/lib/ruby_pptx/oxml/slide.rb +290 -0
  58. data/lib/ruby_pptx/oxml/table.rb +253 -0
  59. data/lib/ruby_pptx/oxml/text.rb +324 -0
  60. data/lib/ruby_pptx/oxml/theme.rb +93 -0
  61. data/lib/ruby_pptx/package.rb +139 -0
  62. data/lib/ruby_pptx/parts/chart.rb +75 -0
  63. data/lib/ruby_pptx/parts/core_properties.rb +40 -0
  64. data/lib/ruby_pptx/parts/embedded_package.rb +43 -0
  65. data/lib/ruby_pptx/parts/image.rb +55 -0
  66. data/lib/ruby_pptx/parts/media.rb +17 -0
  67. data/lib/ruby_pptx/parts/presentation.rb +79 -0
  68. data/lib/ruby_pptx/parts/slide.rb +221 -0
  69. data/lib/ruby_pptx/parts/theme.rb +26 -0
  70. data/lib/ruby_pptx/pattern_matching.rb +50 -0
  71. data/lib/ruby_pptx/presentation.rb +128 -0
  72. data/lib/ruby_pptx/refinements.rb +21 -0
  73. data/lib/ruby_pptx/section.rb +130 -0
  74. data/lib/ruby_pptx/shapes/adjustments.rb +83 -0
  75. data/lib/ruby_pptx/shapes/authoring.rb +110 -0
  76. data/lib/ruby_pptx/shapes/base.rb +138 -0
  77. data/lib/ruby_pptx/shapes/freeform.rb +141 -0
  78. data/lib/ruby_pptx/shapes/placeholder.rb +184 -0
  79. data/lib/ruby_pptx/shapes/shape.rb +337 -0
  80. data/lib/ruby_pptx/shapes/shape_tree.rb +634 -0
  81. data/lib/ruby_pptx/sliceable.rb +34 -0
  82. data/lib/ruby_pptx/slide.rb +430 -0
  83. data/lib/ruby_pptx/table.rb +316 -0
  84. data/lib/ruby_pptx/table_paging.rb +91 -0
  85. data/lib/ruby_pptx/templates/default.pptx +0 -0
  86. data/lib/ruby_pptx/templates/docx-icon.emf +0 -0
  87. data/lib/ruby_pptx/templates/generic-icon.emf +0 -0
  88. data/lib/ruby_pptx/templates/media-speaker.png +0 -0
  89. data/lib/ruby_pptx/templates/notes.xml +23 -0
  90. data/lib/ruby_pptx/templates/notesMaster.xml +352 -0
  91. data/lib/ruby_pptx/templates/pptx-icon.emf +0 -0
  92. data/lib/ruby_pptx/templates/slideMaster.xml +277 -0
  93. data/lib/ruby_pptx/templates/theme.xml +321 -0
  94. data/lib/ruby_pptx/templates/xlsx-icon.emf +0 -0
  95. data/lib/ruby_pptx/text/fitter.rb +72 -0
  96. data/lib/ruby_pptx/text/font_metrics.rb +221 -0
  97. data/lib/ruby_pptx/text/text.rb +393 -0
  98. data/lib/ruby_pptx/theme.rb +98 -0
  99. data/lib/ruby_pptx/version.rb +5 -0
  100. data/lib/ruby_pptx.rb +90 -0
  101. metadata +174 -0
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by tools/generate_enums.py from python-pptx 1.0.2. Do not edit by hand.
4
+
5
+ require "ruby_pptx/enum/base"
6
+
7
+ module Pptx
8
+ module Enum
9
+ # Specifies the type of a mouse action (click or hover action).
10
+ class PP_ACTION_TYPE < Base
11
+ # Slide show ends.
12
+ member :END_SHOW, 6
13
+ # Returns to the first slide.
14
+ member :FIRST_SLIDE, 3
15
+ # Hyperlink.
16
+ member :HYPERLINK, 7
17
+ # Moves to the last slide.
18
+ member :LAST_SLIDE, 4
19
+ # Moves to the last slide viewed.
20
+ member :LAST_SLIDE_VIEWED, 5
21
+ # Moves to slide specified by slide number.
22
+ member :NAMED_SLIDE, 101
23
+ # Runs the slideshow.
24
+ member :NAMED_SLIDE_SHOW, 10
25
+ # Moves to the next slide.
26
+ member :NEXT_SLIDE, 1
27
+ # No action is performed.
28
+ member :NONE, 0
29
+ # Opens the specified file.
30
+ member :OPEN_FILE, 102
31
+ # OLE Verb.
32
+ member :OLE_VERB, 11
33
+ # Begins the slideshow.
34
+ member :PLAY, 12
35
+ # Moves to the previous slide.
36
+ member :PREVIOUS_SLIDE, 2
37
+ # Runs a macro.
38
+ member :RUN_MACRO, 8
39
+ # Runs a program.
40
+ member :RUN_PROGRAM, 9
41
+ end
42
+
43
+ # Alias of PP_ACTION_TYPE, matching the MS API name.
44
+ PP_ACTION = PP_ACTION_TYPE
45
+ end
46
+ end
@@ -0,0 +1,139 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ruby_pptx/errors"
4
+
5
+ module Pptx
6
+ # Enumerations mirroring those in the Microsoft PowerPoint object model.
7
+ #
8
+ # Each member carries the integer the MS API assigns it, and -- for the
9
+ # enumerations that map to XML -- the attribute value used in the file
10
+ # format. Members compare equal to their MS API integer, so values read from
11
+ # the MS documentation can be used directly.
12
+ module Enum
13
+ # One member of an enumeration.
14
+ class Member
15
+ include Comparable
16
+
17
+ attr_reader :enum, :name, :value, :xml_value
18
+
19
+ def initialize(enum, name, value, xml_value = nil)
20
+ @enum = enum
21
+ @name = name
22
+ @value = value
23
+ @xml_value = xml_value
24
+ freeze
25
+ end
26
+
27
+ # True when this member has no XML representation. Such members are
28
+ # return values only: they describe a state the file format expresses by
29
+ # some other means, so they can be returned but never written.
30
+ def xml_value? = !(@xml_value.nil? || @xml_value.empty?)
31
+
32
+ def to_i = @value
33
+ alias to_int to_i
34
+
35
+ def to_sym = @name
36
+
37
+ def <=>(other)
38
+ case other
39
+ when Member then @value <=> other.value
40
+ when Integer then @value <=> other
41
+ end
42
+ end
43
+
44
+ def ==(other) = (self <=> other)&.zero? || false
45
+ alias eql? ==
46
+
47
+ def hash = @value.hash
48
+
49
+ # e.g. "MIDDLE (3)"
50
+ def to_s = "#{@name} (#{@value})"
51
+
52
+ def inspect = "#{@enum.short_name}.#{@name}"
53
+ end
54
+
55
+ # Base for every enumeration. Members are declared with {.member} and
56
+ # exposed both as constants and through the collection methods.
57
+ class Base
58
+ extend Enumerable
59
+
60
+ class << self
61
+ # Declare a member, defining a constant of the same name.
62
+ #
63
+ # @param name [Symbol]
64
+ # @param value [Integer] the MS API integer for this member
65
+ # @param xml [String, nil] the XML attribute value, for XML-mapped enums
66
+ def member(name, value, xml: nil)
67
+ member = Member.new(self, name, value, xml)
68
+ const_set(name, member)
69
+ members << member
70
+ member
71
+ end
72
+
73
+ def members = @members ||= []
74
+
75
+ def each(&) = members.each(&)
76
+
77
+ def short_name = name.to_s.split("::").last
78
+
79
+ # Look a member up by symbolic name or MS API value.
80
+ #
81
+ # @return [Member, nil]
82
+ # Member names are SCREAMING_SNAKE to match the Microsoft API, but a
83
+ # caller writing Ruby should be able to say `:oval` rather than
84
+ # `:OVAL`, so lookup ignores case.
85
+ def [](key)
86
+ case key
87
+ when Member then members.include?(key) ? key : nil
88
+ when Symbol, String then find_by_name(key.to_s)
89
+ when Integer then members.find { |m| m.value == key }
90
+ end
91
+ end
92
+
93
+ def find_by_name(name)
94
+ members.find { |m| m.name.to_s == name } ||
95
+ members.find { |m| m.name.to_s.casecmp?(name) }
96
+ end
97
+
98
+ # As {.[]}, but raises when there is no such member.
99
+ def fetch(key)
100
+ self[key] || raise(ArgumentError, "#{key.inspect} is not a member of #{short_name}")
101
+ end
102
+
103
+ # Raise unless +value+ is assignable to this enumeration.
104
+ def validate(value)
105
+ return value if self[value]
106
+
107
+ raise ArgumentError, "#{value.inspect} is not a member of #{short_name}"
108
+ end
109
+ end
110
+ end
111
+
112
+ # An enumeration whose members also map to XML attribute values.
113
+ class XmlBase < Base
114
+ class << self
115
+ # The member matching XML attribute value +xml_value+.
116
+ #
117
+ # @raise [ArgumentError] when the value is empty or unmapped
118
+ def from_xml(xml_value)
119
+ member = members.find { |m| m.xml_value? && m.xml_value == xml_value } unless
120
+ xml_value.nil? || xml_value.empty?
121
+
122
+ member || raise(ArgumentError,
123
+ "#{short_name} has no XML mapping for #{xml_value.inspect}")
124
+ end
125
+
126
+ # The XML attribute value for +value+, which may be a member or its MS
127
+ # API integer.
128
+ def to_xml(value)
129
+ member = fetch(value)
130
+ unless member.xml_value?
131
+ raise ArgumentError, "#{short_name}.#{member.name} has no XML representation"
132
+ end
133
+
134
+ member.xml_value
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,278 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by tools/generate_enums.py from python-pptx 1.0.2. Do not edit by hand.
4
+
5
+ require "ruby_pptx/enum/base"
6
+
7
+ module Pptx
8
+ module Enum
9
+ # Specifies the point on an axis where the other axis crosses.
10
+ class XL_AXIS_CROSSES < XmlBase
11
+ # The axis crossing point is set automatically, often at zero.
12
+ member :AUTOMATIC, -4105, xml: "autoZero"
13
+ # The .crosses_at property specifies the axis crossing point.
14
+ member :CUSTOM, -4114
15
+ # The axis crosses at the maximum value.
16
+ member :MAXIMUM, 2, xml: "max"
17
+ # The axis crosses at the minimum value.
18
+ member :MINIMUM, 4, xml: "min"
19
+ end
20
+
21
+ # Specifies the type of the category axis.
22
+ class XL_CATEGORY_TYPE < Base
23
+ # The application controls the axis type.
24
+ member :AUTOMATIC_SCALE, -4105
25
+ # Axis groups data by an arbitrary set of categories
26
+ member :CATEGORY_SCALE, 2
27
+ # Axis groups data on a time scale of days, months, or years.
28
+ member :TIME_SCALE, 3
29
+ end
30
+
31
+ # Specifies the type of a chart.
32
+ class XL_CHART_TYPE < Base
33
+ # 3D Area.
34
+ member :THREE_D_AREA, -4098
35
+ # 3D Stacked Area.
36
+ member :THREE_D_AREA_STACKED, 78
37
+ # 100% Stacked Area.
38
+ member :THREE_D_AREA_STACKED_100, 79
39
+ # 3D Clustered Bar.
40
+ member :THREE_D_BAR_CLUSTERED, 60
41
+ # 3D Stacked Bar.
42
+ member :THREE_D_BAR_STACKED, 61
43
+ # 3D 100% Stacked Bar.
44
+ member :THREE_D_BAR_STACKED_100, 62
45
+ # 3D Column.
46
+ member :THREE_D_COLUMN, -4100
47
+ # 3D Clustered Column.
48
+ member :THREE_D_COLUMN_CLUSTERED, 54
49
+ # 3D Stacked Column.
50
+ member :THREE_D_COLUMN_STACKED, 55
51
+ # 3D 100% Stacked Column.
52
+ member :THREE_D_COLUMN_STACKED_100, 56
53
+ # 3D Line.
54
+ member :THREE_D_LINE, -4101
55
+ # 3D Pie.
56
+ member :THREE_D_PIE, -4102
57
+ # Exploded 3D Pie.
58
+ member :THREE_D_PIE_EXPLODED, 70
59
+ # Area
60
+ member :AREA, 1
61
+ # Stacked Area.
62
+ member :AREA_STACKED, 76
63
+ # 100% Stacked Area.
64
+ member :AREA_STACKED_100, 77
65
+ # Clustered Bar.
66
+ member :BAR_CLUSTERED, 57
67
+ # Bar of Pie.
68
+ member :BAR_OF_PIE, 71
69
+ # Stacked Bar.
70
+ member :BAR_STACKED, 58
71
+ # 100% Stacked Bar.
72
+ member :BAR_STACKED_100, 59
73
+ # Bubble.
74
+ member :BUBBLE, 15
75
+ # Bubble with 3D effects.
76
+ member :BUBBLE_THREE_D_EFFECT, 87
77
+ # Clustered Column.
78
+ member :COLUMN_CLUSTERED, 51
79
+ # Stacked Column.
80
+ member :COLUMN_STACKED, 52
81
+ # 100% Stacked Column.
82
+ member :COLUMN_STACKED_100, 53
83
+ # Clustered Cone Bar.
84
+ member :CONE_BAR_CLUSTERED, 102
85
+ # Stacked Cone Bar.
86
+ member :CONE_BAR_STACKED, 103
87
+ # 100% Stacked Cone Bar.
88
+ member :CONE_BAR_STACKED_100, 104
89
+ # 3D Cone Column.
90
+ member :CONE_COL, 105
91
+ # Clustered Cone Column.
92
+ member :CONE_COL_CLUSTERED, 99
93
+ # Stacked Cone Column.
94
+ member :CONE_COL_STACKED, 100
95
+ # 100% Stacked Cone Column.
96
+ member :CONE_COL_STACKED_100, 101
97
+ # Clustered Cylinder Bar.
98
+ member :CYLINDER_BAR_CLUSTERED, 95
99
+ # Stacked Cylinder Bar.
100
+ member :CYLINDER_BAR_STACKED, 96
101
+ # 100% Stacked Cylinder Bar.
102
+ member :CYLINDER_BAR_STACKED_100, 97
103
+ # 3D Cylinder Column.
104
+ member :CYLINDER_COL, 98
105
+ # Clustered Cone Column.
106
+ member :CYLINDER_COL_CLUSTERED, 92
107
+ # Stacked Cone Column.
108
+ member :CYLINDER_COL_STACKED, 93
109
+ # 100% Stacked Cylinder Column.
110
+ member :CYLINDER_COL_STACKED_100, 94
111
+ # Doughnut.
112
+ member :DOUGHNUT, -4120
113
+ # Exploded Doughnut.
114
+ member :DOUGHNUT_EXPLODED, 80
115
+ # Line.
116
+ member :LINE, 4
117
+ # Line with Markers.
118
+ member :LINE_MARKERS, 65
119
+ # Stacked Line with Markers.
120
+ member :LINE_MARKERS_STACKED, 66
121
+ # 100% Stacked Line with Markers.
122
+ member :LINE_MARKERS_STACKED_100, 67
123
+ # Stacked Line.
124
+ member :LINE_STACKED, 63
125
+ # 100% Stacked Line.
126
+ member :LINE_STACKED_100, 64
127
+ # Pie.
128
+ member :PIE, 5
129
+ # Exploded Pie.
130
+ member :PIE_EXPLODED, 69
131
+ # Pie of Pie.
132
+ member :PIE_OF_PIE, 68
133
+ # Clustered Pyramid Bar.
134
+ member :PYRAMID_BAR_CLUSTERED, 109
135
+ # Stacked Pyramid Bar.
136
+ member :PYRAMID_BAR_STACKED, 110
137
+ # 100% Stacked Pyramid Bar.
138
+ member :PYRAMID_BAR_STACKED_100, 111
139
+ # 3D Pyramid Column.
140
+ member :PYRAMID_COL, 112
141
+ # Clustered Pyramid Column.
142
+ member :PYRAMID_COL_CLUSTERED, 106
143
+ # Stacked Pyramid Column.
144
+ member :PYRAMID_COL_STACKED, 107
145
+ # 100% Stacked Pyramid Column.
146
+ member :PYRAMID_COL_STACKED_100, 108
147
+ # Radar.
148
+ member :RADAR, -4151
149
+ # Filled Radar.
150
+ member :RADAR_FILLED, 82
151
+ # Radar with Data Markers.
152
+ member :RADAR_MARKERS, 81
153
+ # High-Low-Close.
154
+ member :STOCK_HLC, 88
155
+ # Open-High-Low-Close.
156
+ member :STOCK_OHLC, 89
157
+ # Volume-High-Low-Close.
158
+ member :STOCK_VHLC, 90
159
+ # Volume-Open-High-Low-Close.
160
+ member :STOCK_VOHLC, 91
161
+ # 3D Surface.
162
+ member :SURFACE, 83
163
+ # Surface (Top View).
164
+ member :SURFACE_TOP_VIEW, 85
165
+ # Surface (Top View wireframe).
166
+ member :SURFACE_TOP_VIEW_WIREFRAME, 86
167
+ # 3D Surface (wireframe).
168
+ member :SURFACE_WIREFRAME, 84
169
+ # Scatter.
170
+ member :XY_SCATTER, -4169
171
+ # Scatter with Lines.
172
+ member :XY_SCATTER_LINES, 74
173
+ # Scatter with Lines and No Data Markers.
174
+ member :XY_SCATTER_LINES_NO_MARKERS, 75
175
+ # Scatter with Smoothed Lines.
176
+ member :XY_SCATTER_SMOOTH, 72
177
+ # Scatter with Smoothed Lines and No Data Markers.
178
+ member :XY_SCATTER_SMOOTH_NO_MARKERS, 73
179
+ end
180
+
181
+ # Specifies where the data label is positioned.
182
+ class XL_DATA_LABEL_POSITION < XmlBase
183
+ # The data label is positioned above the data point.
184
+ member :ABOVE, 0, xml: "t"
185
+ # The data label is positioned below the data point.
186
+ member :BELOW, 1, xml: "b"
187
+ # Word sets the position of the data label.
188
+ member :BEST_FIT, 5, xml: "bestFit"
189
+ # The data label is centered on the data point or inside a bar or a pie
190
+ # slice.
191
+ member :CENTER, -4108, xml: "ctr"
192
+ # The data label is positioned inside the data point at the bottom edge.
193
+ member :INSIDE_BASE, 4, xml: "inBase"
194
+ # The data label is positioned inside the data point at the top edge.
195
+ member :INSIDE_END, 3, xml: "inEnd"
196
+ # The data label is positioned to the left of the data point.
197
+ member :LEFT, -4131, xml: "l"
198
+ # Data labels are in multiple positions (read-only).
199
+ member :MIXED, 6
200
+ # The data label is positioned outside the data point at the top edge.
201
+ member :OUTSIDE_END, 2, xml: "outEnd"
202
+ # The data label is positioned to the right of the data point.
203
+ member :RIGHT, -4152, xml: "r"
204
+ end
205
+
206
+ # Alias of XL_DATA_LABEL_POSITION, matching the MS API name.
207
+ XL_LABEL_POSITION = XL_DATA_LABEL_POSITION
208
+
209
+ # Specifies the position of the legend on a chart.
210
+ class XL_LEGEND_POSITION < XmlBase
211
+ # Below the chart.
212
+ member :BOTTOM, -4107, xml: "b"
213
+ # In the upper-right corner of the chart border.
214
+ member :CORNER, 2, xml: "tr"
215
+ # A custom position (read-only).
216
+ member :CUSTOM, -4161
217
+ # Left of the chart.
218
+ member :LEFT, -4131, xml: "l"
219
+ # Right of the chart.
220
+ member :RIGHT, -4152, xml: "r"
221
+ # Above the chart.
222
+ member :TOP, -4160, xml: "t"
223
+ end
224
+
225
+ # Specifies the marker style for a point or series in a line, scatter, or
226
+ # radar chart.
227
+ class XL_MARKER_STYLE < XmlBase
228
+ # Automatic markers
229
+ member :AUTOMATIC, -4105, xml: "auto"
230
+ # Circular markers
231
+ member :CIRCLE, 8, xml: "circle"
232
+ # Long bar markers
233
+ member :DASH, -4115, xml: "dash"
234
+ # Diamond-shaped markers
235
+ member :DIAMOND, 2, xml: "diamond"
236
+ # Short bar markers
237
+ member :DOT, -4118, xml: "dot"
238
+ # No markers
239
+ member :NONE, -4142, xml: "none"
240
+ # Picture markers
241
+ member :PICTURE, -4147, xml: "picture"
242
+ # Square markers with a plus sign
243
+ member :PLUS, 9, xml: "plus"
244
+ # Square markers
245
+ member :SQUARE, 1, xml: "square"
246
+ # Square markers with an asterisk
247
+ member :STAR, 5, xml: "star"
248
+ # Triangular markers
249
+ member :TRIANGLE, 3, xml: "triangle"
250
+ # Square markers with an X
251
+ member :X, -4168, xml: "x"
252
+ end
253
+
254
+ # Specifies a type of axis tick for a chart.
255
+ class XL_TICK_MARK < XmlBase
256
+ # Tick mark crosses the axis
257
+ member :CROSS, 4, xml: "cross"
258
+ # Tick mark appears inside the axis
259
+ member :INSIDE, 2, xml: "in"
260
+ # No tick mark
261
+ member :NONE, -4142, xml: "none"
262
+ # Tick mark appears outside the axis
263
+ member :OUTSIDE, 3, xml: "out"
264
+ end
265
+
266
+ # Specifies the position of tick-mark labels on a chart axis.
267
+ class XL_TICK_LABEL_POSITION < XmlBase
268
+ # Top or right side of the chart.
269
+ member :HIGH, -4127, xml: "high"
270
+ # Bottom or left side of the chart.
271
+ member :LOW, -4134, xml: "low"
272
+ # Next to axis (where axis is not at either side of the chart).
273
+ member :NEXT_TO_AXIS, 4, xml: "nextTo"
274
+ # No tick labels.
275
+ member :NONE, -4142, xml: "none"
276
+ end
277
+ end
278
+ end
@@ -0,0 +1,237 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated by tools/generate_enums.py from python-pptx 1.0.2. Do not edit by hand.
4
+
5
+ require "ruby_pptx/enum/base"
6
+
7
+ module Pptx
8
+ module Enum
9
+ # Specifies the color specification scheme
10
+ class MSO_COLOR_TYPE < Base
11
+ # Color is specified by an |RGBColor| value.
12
+ member :RGB, 1
13
+ # Color is one of the preset theme colors
14
+ member :SCHEME, 2
15
+ # Color is specified using Hue, Saturation, and Luminosity values
16
+ member :HSL, 101
17
+ # Color is specified using a named built-in color
18
+ member :PRESET, 102
19
+ # Color is an scRGB color, a wide color gamut RGB color space
20
+ member :SCRGB, 103
21
+ # Color is one specified by the operating system, such as the window
22
+ # background color.
23
+ member :SYSTEM, 104
24
+ end
25
+
26
+ # Specifies the type of bitmap used for the fill of a shape.
27
+ class MSO_FILL_TYPE < Base
28
+ # The shape is transparent, such that whatever is behind the shape shows
29
+ # through. Often this is the slide background, but if a visible shape is
30
+ # behind, that will show through.
31
+ member :BACKGROUND, 5
32
+ # Shape is filled with a gradient
33
+ member :GRADIENT, 3
34
+ # Shape is part of a group and should inherit the fill properties of the
35
+ # group.
36
+ member :GROUP, 101
37
+ # Shape is filled with a pattern
38
+ member :PATTERNED, 2
39
+ # Shape is filled with a bitmapped image
40
+ member :PICTURE, 6
41
+ # Shape is filled with a solid color
42
+ member :SOLID, 1
43
+ # Shape is filled with a texture
44
+ member :TEXTURED, 4
45
+ end
46
+
47
+ # Alias of MSO_FILL_TYPE, matching the MS API name.
48
+ MSO_FILL = MSO_FILL_TYPE
49
+
50
+ # Specifies the dash style for a line.
51
+ class MSO_LINE_DASH_STYLE < XmlBase
52
+ # Line consists of dashes only.
53
+ member :DASH, 4, xml: "dash"
54
+ # Line is a dash-dot pattern.
55
+ member :DASH_DOT, 5, xml: "dashDot"
56
+ # Line is a dash-dot-dot pattern.
57
+ member :DASH_DOT_DOT, 6, xml: "lgDashDotDot"
58
+ # Line consists of long dashes.
59
+ member :LONG_DASH, 7, xml: "lgDash"
60
+ # Line is a long dash-dot pattern.
61
+ member :LONG_DASH_DOT, 8, xml: "lgDashDot"
62
+ # Line is made up of round dots.
63
+ member :ROUND_DOT, 3, xml: "sysDot"
64
+ # Line is solid.
65
+ member :SOLID, 1, xml: "solid"
66
+ # Line is made up of square dots.
67
+ member :SQUARE_DOT, 2, xml: "sysDash"
68
+ # Not supported.
69
+ member :DASH_STYLE_MIXED, -2
70
+ end
71
+
72
+ # Alias of MSO_LINE_DASH_STYLE, matching the MS API name.
73
+ MSO_LINE = MSO_LINE_DASH_STYLE
74
+
75
+ # Specifies the fill pattern used in a shape.
76
+ class MSO_PATTERN_TYPE < XmlBase
77
+ # Cross
78
+ member :CROSS, 51, xml: "cross"
79
+ # Dark Downward Diagonal
80
+ member :DARK_DOWNWARD_DIAGONAL, 15, xml: "dkDnDiag"
81
+ # Dark Horizontal
82
+ member :DARK_HORIZONTAL, 13, xml: "dkHorz"
83
+ # Dark Upward Diagonal
84
+ member :DARK_UPWARD_DIAGONAL, 16, xml: "dkUpDiag"
85
+ # Dark Vertical
86
+ member :DARK_VERTICAL, 14, xml: "dkVert"
87
+ # Dashed Downward Diagonal
88
+ member :DASHED_DOWNWARD_DIAGONAL, 28, xml: "dashDnDiag"
89
+ # Dashed Horizontal
90
+ member :DASHED_HORIZONTAL, 32, xml: "dashHorz"
91
+ # Dashed Upward Diagonal
92
+ member :DASHED_UPWARD_DIAGONAL, 27, xml: "dashUpDiag"
93
+ # Dashed Vertical
94
+ member :DASHED_VERTICAL, 31, xml: "dashVert"
95
+ # Diagonal Brick
96
+ member :DIAGONAL_BRICK, 40, xml: "diagBrick"
97
+ # Diagonal Cross
98
+ member :DIAGONAL_CROSS, 54, xml: "diagCross"
99
+ # Pattern Divot
100
+ member :DIVOT, 46, xml: "divot"
101
+ # Dotted Diamond
102
+ member :DOTTED_DIAMOND, 24, xml: "dotDmnd"
103
+ # Dotted Grid
104
+ member :DOTTED_GRID, 45, xml: "dotGrid"
105
+ # Downward Diagonal
106
+ member :DOWNWARD_DIAGONAL, 52, xml: "dnDiag"
107
+ # Horizontal
108
+ member :HORIZONTAL, 49, xml: "horz"
109
+ # Horizontal Brick
110
+ member :HORIZONTAL_BRICK, 35, xml: "horzBrick"
111
+ # Large Checker Board
112
+ member :LARGE_CHECKER_BOARD, 36, xml: "lgCheck"
113
+ # Large Confetti
114
+ member :LARGE_CONFETTI, 33, xml: "lgConfetti"
115
+ # Large Grid
116
+ member :LARGE_GRID, 34, xml: "lgGrid"
117
+ # Light Downward Diagonal
118
+ member :LIGHT_DOWNWARD_DIAGONAL, 21, xml: "ltDnDiag"
119
+ # Light Horizontal
120
+ member :LIGHT_HORIZONTAL, 19, xml: "ltHorz"
121
+ # Light Upward Diagonal
122
+ member :LIGHT_UPWARD_DIAGONAL, 22, xml: "ltUpDiag"
123
+ # Light Vertical
124
+ member :LIGHT_VERTICAL, 20, xml: "ltVert"
125
+ # Narrow Horizontal
126
+ member :NARROW_HORIZONTAL, 30, xml: "narHorz"
127
+ # Narrow Vertical
128
+ member :NARROW_VERTICAL, 29, xml: "narVert"
129
+ # Outlined Diamond
130
+ member :OUTLINED_DIAMOND, 41, xml: "openDmnd"
131
+ # 10% of the foreground color.
132
+ member :PERCENT_10, 2, xml: "pct10"
133
+ # 20% of the foreground color.
134
+ member :PERCENT_20, 3, xml: "pct20"
135
+ # 25% of the foreground color.
136
+ member :PERCENT_25, 4, xml: "pct25"
137
+ # 30% of the foreground color.
138
+ member :PERCENT_30, 5, xml: "pct30"
139
+ # 40% of the foreground color.
140
+ member :ERCENT_40, 6, xml: "pct40"
141
+ # 5% of the foreground color.
142
+ member :PERCENT_5, 1, xml: "pct5"
143
+ # 50% of the foreground color.
144
+ member :PERCENT_50, 7, xml: "pct50"
145
+ # 60% of the foreground color.
146
+ member :PERCENT_60, 8, xml: "pct60"
147
+ # 70% of the foreground color.
148
+ member :PERCENT_70, 9, xml: "pct70"
149
+ # 75% of the foreground color.
150
+ member :PERCENT_75, 10, xml: "pct75"
151
+ # 80% of the foreground color.
152
+ member :PERCENT_80, 11, xml: "pct80"
153
+ # 90% of the foreground color.
154
+ member :PERCENT_90, 12, xml: "pct90"
155
+ # Plaid
156
+ member :PLAID, 42, xml: "plaid"
157
+ # Shingle
158
+ member :SHINGLE, 47, xml: "shingle"
159
+ # Small Checker Board
160
+ member :SMALL_CHECKER_BOARD, 17, xml: "smCheck"
161
+ # Small Confetti
162
+ member :SMALL_CONFETTI, 37, xml: "smConfetti"
163
+ # Small Grid
164
+ member :SMALL_GRID, 23, xml: "smGrid"
165
+ # Solid Diamond
166
+ member :SOLID_DIAMOND, 39, xml: "solidDmnd"
167
+ # Sphere
168
+ member :SPHERE, 43, xml: "sphere"
169
+ # Trellis
170
+ member :TRELLIS, 18, xml: "trellis"
171
+ # Upward Diagonal
172
+ member :UPWARD_DIAGONAL, 53, xml: "upDiag"
173
+ # Vertical
174
+ member :VERTICAL, 50, xml: "vert"
175
+ # Wave
176
+ member :WAVE, 48, xml: "wave"
177
+ # Weave
178
+ member :WEAVE, 44, xml: "weave"
179
+ # Wide Downward Diagonal
180
+ member :WIDE_DOWNWARD_DIAGONAL, 25, xml: "wdDnDiag"
181
+ # Wide Upward Diagonal
182
+ member :WIDE_UPWARD_DIAGONAL, 26, xml: "wdUpDiag"
183
+ # Zig Zag
184
+ member :ZIG_ZAG, 38, xml: "zigZag"
185
+ # Mixed pattern (read-only).
186
+ member :MIXED, -2
187
+ end
188
+
189
+ # Alias of MSO_PATTERN_TYPE, matching the MS API name.
190
+ MSO_PATTERN = MSO_PATTERN_TYPE
191
+
192
+ # An Office theme color, one of those shown in the color gallery on the
193
+ # formatting ribbon.
194
+ class MSO_THEME_COLOR_INDEX < XmlBase
195
+ # Indicates the color is not a theme color.
196
+ member :NOT_THEME_COLOR, 0
197
+ # Specifies the Accent 1 theme color.
198
+ member :ACCENT_1, 5, xml: "accent1"
199
+ # Specifies the Accent 2 theme color.
200
+ member :ACCENT_2, 6, xml: "accent2"
201
+ # Specifies the Accent 3 theme color.
202
+ member :ACCENT_3, 7, xml: "accent3"
203
+ # Specifies the Accent 4 theme color.
204
+ member :ACCENT_4, 8, xml: "accent4"
205
+ # Specifies the Accent 5 theme color.
206
+ member :ACCENT_5, 9, xml: "accent5"
207
+ # Specifies the Accent 6 theme color.
208
+ member :ACCENT_6, 10, xml: "accent6"
209
+ # Specifies the Background 1 theme color.
210
+ member :BACKGROUND_1, 14, xml: "bg1"
211
+ # Specifies the Background 2 theme color.
212
+ member :BACKGROUND_2, 16, xml: "bg2"
213
+ # Specifies the Dark 1 theme color.
214
+ member :DARK_1, 1, xml: "dk1"
215
+ # Specifies the Dark 2 theme color.
216
+ member :DARK_2, 3, xml: "dk2"
217
+ # Specifies the theme color for a clicked hyperlink.
218
+ member :FOLLOWED_HYPERLINK, 12, xml: "folHlink"
219
+ # Specifies the theme color for a hyperlink.
220
+ member :HYPERLINK, 11, xml: "hlink"
221
+ # Specifies the Light 1 theme color.
222
+ member :LIGHT_1, 2, xml: "lt1"
223
+ # Specifies the Light 2 theme color.
224
+ member :LIGHT_2, 4, xml: "lt2"
225
+ # Specifies the Text 1 theme color.
226
+ member :TEXT_1, 13, xml: "tx1"
227
+ # Specifies the Text 2 theme color.
228
+ member :TEXT_2, 15, xml: "tx2"
229
+ # Indicates multiple theme colors are used, such as in a group shape
230
+ # (read-only).
231
+ member :MIXED, -2
232
+ end
233
+
234
+ # Alias of MSO_THEME_COLOR_INDEX, matching the MS API name.
235
+ MSO_THEME_COLOR = MSO_THEME_COLOR_INDEX
236
+ end
237
+ end