ParagraphStyle.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Slides;
  18. class ParagraphStyle extends \Google\Model
  19. {
  20. /**
  21. * The paragraph alignment is inherited from the parent.
  22. */
  23. public const ALIGNMENT_ALIGNMENT_UNSPECIFIED = 'ALIGNMENT_UNSPECIFIED';
  24. /**
  25. * The paragraph is aligned to the start of the line. Left-aligned for LTR
  26. * text, right-aligned otherwise.
  27. */
  28. public const ALIGNMENT_START = 'START';
  29. /**
  30. * The paragraph is centered.
  31. */
  32. public const ALIGNMENT_CENTER = 'CENTER';
  33. /**
  34. * The paragraph is aligned to the end of the line. Right-aligned for LTR
  35. * text, left-aligned otherwise.
  36. */
  37. public const ALIGNMENT_END = 'END';
  38. /**
  39. * The paragraph is justified.
  40. */
  41. public const ALIGNMENT_JUSTIFIED = 'JUSTIFIED';
  42. /**
  43. * The text direction is inherited from the parent.
  44. */
  45. public const DIRECTION_TEXT_DIRECTION_UNSPECIFIED = 'TEXT_DIRECTION_UNSPECIFIED';
  46. /**
  47. * The text goes from left to right.
  48. */
  49. public const DIRECTION_LEFT_TO_RIGHT = 'LEFT_TO_RIGHT';
  50. /**
  51. * The text goes from right to left.
  52. */
  53. public const DIRECTION_RIGHT_TO_LEFT = 'RIGHT_TO_LEFT';
  54. /**
  55. * The spacing mode is inherited from the parent.
  56. */
  57. public const SPACING_MODE_SPACING_MODE_UNSPECIFIED = 'SPACING_MODE_UNSPECIFIED';
  58. /**
  59. * Paragraph spacing is always rendered.
  60. */
  61. public const SPACING_MODE_NEVER_COLLAPSE = 'NEVER_COLLAPSE';
  62. /**
  63. * Paragraph spacing is skipped between list elements.
  64. */
  65. public const SPACING_MODE_COLLAPSE_LISTS = 'COLLAPSE_LISTS';
  66. /**
  67. * The text alignment for this paragraph.
  68. *
  69. * @var string
  70. */
  71. public $alignment;
  72. /**
  73. * The text direction of this paragraph. If unset, the value defaults to
  74. * LEFT_TO_RIGHT since text direction is not inherited.
  75. *
  76. * @var string
  77. */
  78. public $direction;
  79. protected $indentEndType = Dimension::class;
  80. protected $indentEndDataType = '';
  81. protected $indentFirstLineType = Dimension::class;
  82. protected $indentFirstLineDataType = '';
  83. protected $indentStartType = Dimension::class;
  84. protected $indentStartDataType = '';
  85. /**
  86. * The amount of space between lines, as a percentage of normal, where normal
  87. * is represented as 100.0. If unset, the value is inherited from the parent.
  88. *
  89. * @var float
  90. */
  91. public $lineSpacing;
  92. protected $spaceAboveType = Dimension::class;
  93. protected $spaceAboveDataType = '';
  94. protected $spaceBelowType = Dimension::class;
  95. protected $spaceBelowDataType = '';
  96. /**
  97. * The spacing mode for the paragraph.
  98. *
  99. * @var string
  100. */
  101. public $spacingMode;
  102. /**
  103. * The text alignment for this paragraph.
  104. *
  105. * Accepted values: ALIGNMENT_UNSPECIFIED, START, CENTER, END, JUSTIFIED
  106. *
  107. * @param self::ALIGNMENT_* $alignment
  108. */
  109. public function setAlignment($alignment)
  110. {
  111. $this->alignment = $alignment;
  112. }
  113. /**
  114. * @return self::ALIGNMENT_*
  115. */
  116. public function getAlignment()
  117. {
  118. return $this->alignment;
  119. }
  120. /**
  121. * The text direction of this paragraph. If unset, the value defaults to
  122. * LEFT_TO_RIGHT since text direction is not inherited.
  123. *
  124. * Accepted values: TEXT_DIRECTION_UNSPECIFIED, LEFT_TO_RIGHT, RIGHT_TO_LEFT
  125. *
  126. * @param self::DIRECTION_* $direction
  127. */
  128. public function setDirection($direction)
  129. {
  130. $this->direction = $direction;
  131. }
  132. /**
  133. * @return self::DIRECTION_*
  134. */
  135. public function getDirection()
  136. {
  137. return $this->direction;
  138. }
  139. /**
  140. * The amount indentation for the paragraph on the side that corresponds to
  141. * the end of the text, based on the current text direction. If unset, the
  142. * value is inherited from the parent.
  143. *
  144. * @param Dimension $indentEnd
  145. */
  146. public function setIndentEnd(Dimension $indentEnd)
  147. {
  148. $this->indentEnd = $indentEnd;
  149. }
  150. /**
  151. * @return Dimension
  152. */
  153. public function getIndentEnd()
  154. {
  155. return $this->indentEnd;
  156. }
  157. /**
  158. * The amount of indentation for the start of the first line of the paragraph.
  159. * If unset, the value is inherited from the parent.
  160. *
  161. * @param Dimension $indentFirstLine
  162. */
  163. public function setIndentFirstLine(Dimension $indentFirstLine)
  164. {
  165. $this->indentFirstLine = $indentFirstLine;
  166. }
  167. /**
  168. * @return Dimension
  169. */
  170. public function getIndentFirstLine()
  171. {
  172. return $this->indentFirstLine;
  173. }
  174. /**
  175. * The amount indentation for the paragraph on the side that corresponds to
  176. * the start of the text, based on the current text direction. If unset, the
  177. * value is inherited from the parent.
  178. *
  179. * @param Dimension $indentStart
  180. */
  181. public function setIndentStart(Dimension $indentStart)
  182. {
  183. $this->indentStart = $indentStart;
  184. }
  185. /**
  186. * @return Dimension
  187. */
  188. public function getIndentStart()
  189. {
  190. return $this->indentStart;
  191. }
  192. /**
  193. * The amount of space between lines, as a percentage of normal, where normal
  194. * is represented as 100.0. If unset, the value is inherited from the parent.
  195. *
  196. * @param float $lineSpacing
  197. */
  198. public function setLineSpacing($lineSpacing)
  199. {
  200. $this->lineSpacing = $lineSpacing;
  201. }
  202. /**
  203. * @return float
  204. */
  205. public function getLineSpacing()
  206. {
  207. return $this->lineSpacing;
  208. }
  209. /**
  210. * The amount of extra space above the paragraph. If unset, the value is
  211. * inherited from the parent.
  212. *
  213. * @param Dimension $spaceAbove
  214. */
  215. public function setSpaceAbove(Dimension $spaceAbove)
  216. {
  217. $this->spaceAbove = $spaceAbove;
  218. }
  219. /**
  220. * @return Dimension
  221. */
  222. public function getSpaceAbove()
  223. {
  224. return $this->spaceAbove;
  225. }
  226. /**
  227. * The amount of extra space below the paragraph. If unset, the value is
  228. * inherited from the parent.
  229. *
  230. * @param Dimension $spaceBelow
  231. */
  232. public function setSpaceBelow(Dimension $spaceBelow)
  233. {
  234. $this->spaceBelow = $spaceBelow;
  235. }
  236. /**
  237. * @return Dimension
  238. */
  239. public function getSpaceBelow()
  240. {
  241. return $this->spaceBelow;
  242. }
  243. /**
  244. * The spacing mode for the paragraph.
  245. *
  246. * Accepted values: SPACING_MODE_UNSPECIFIED, NEVER_COLLAPSE, COLLAPSE_LISTS
  247. *
  248. * @param self::SPACING_MODE_* $spacingMode
  249. */
  250. public function setSpacingMode($spacingMode)
  251. {
  252. $this->spacingMode = $spacingMode;
  253. }
  254. /**
  255. * @return self::SPACING_MODE_*
  256. */
  257. public function getSpacingMode()
  258. {
  259. return $this->spacingMode;
  260. }
  261. }
  262. // Adding a class alias for backwards compatibility with the previous class name.
  263. class_alias(ParagraphStyle::class, 'Google_Service_Slides_ParagraphStyle');