Class: Google::Apis::DocsV1::ParagraphStyle

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/docs_v1/classes.rb,
generated/google/apis/docs_v1/representations.rb,
generated/google/apis/docs_v1/representations.rb

Overview

Styles that apply to a whole paragraph. Inherited paragraph styles are represented as unset fields in this message. A paragraph style's parent depends on where the paragraph style is defined:

  • The ParagraphStyle on a Paragraph inherits from the paragraph's corresponding named style type.
  • The ParagraphStyle on a named style inherits from the normal text named style.
  • The ParagraphStyle of the normal text named style inherits from the default paragraph style in the Docs editor.
  • The ParagraphStyle on a Paragraph element that is contained in a table may inherit its paragraph style from the table style. If the paragraph style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ParagraphStyle

Returns a new instance of ParagraphStyle



3188
3189
3190
# File 'generated/google/apis/docs_v1/classes.rb', line 3188

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#alignmentString

The text alignment for this paragraph. Corresponds to the JSON property alignment

Returns:

  • (String)


3071
3072
3073
# File 'generated/google/apis/docs_v1/classes.rb', line 3071

def alignment
  @alignment
end

#avoid_widow_and_orphanBoolean Also known as: avoid_widow_and_orphan?

Whether to avoid widows and orphans for the paragraph. If unset, the value is inherited from the parent. Corresponds to the JSON property avoidWidowAndOrphan

Returns:

  • (Boolean)


3077
3078
3079
# File 'generated/google/apis/docs_v1/classes.rb', line 3077

def avoid_widow_and_orphan
  @avoid_widow_and_orphan
end

#border_betweenGoogle::Apis::DocsV1::ParagraphBorder

A border around a paragraph. Corresponds to the JSON property borderBetween



3083
3084
3085
# File 'generated/google/apis/docs_v1/classes.rb', line 3083

def border_between
  @border_between
end

#border_bottomGoogle::Apis::DocsV1::ParagraphBorder

A border around a paragraph. Corresponds to the JSON property borderBottom



3088
3089
3090
# File 'generated/google/apis/docs_v1/classes.rb', line 3088

def border_bottom
  @border_bottom
end

#border_leftGoogle::Apis::DocsV1::ParagraphBorder

A border around a paragraph. Corresponds to the JSON property borderLeft



3093
3094
3095
# File 'generated/google/apis/docs_v1/classes.rb', line 3093

def border_left
  @border_left
end

#border_rightGoogle::Apis::DocsV1::ParagraphBorder

A border around a paragraph. Corresponds to the JSON property borderRight



3098
3099
3100
# File 'generated/google/apis/docs_v1/classes.rb', line 3098

def border_right
  @border_right
end

#border_topGoogle::Apis::DocsV1::ParagraphBorder

A border around a paragraph. Corresponds to the JSON property borderTop



3103
3104
3105
# File 'generated/google/apis/docs_v1/classes.rb', line 3103

def border_top
  @border_top
end

#directionString

The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since paragraph direction is not inherited. Corresponds to the JSON property direction

Returns:

  • (String)


3110
3111
3112
# File 'generated/google/apis/docs_v1/classes.rb', line 3110

def direction
  @direction
end

#heading_idString

The heading ID of the paragraph. If empty, then this paragraph is not a heading. This property is read-only. Corresponds to the JSON property headingId

Returns:

  • (String)


3116
3117
3118
# File 'generated/google/apis/docs_v1/classes.rb', line 3116

def heading_id
  @heading_id
end

#indent_endGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property indentEnd



3121
3122
3123
# File 'generated/google/apis/docs_v1/classes.rb', line 3121

def indent_end
  @indent_end
end

#indent_first_lineGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property indentFirstLine



3126
3127
3128
# File 'generated/google/apis/docs_v1/classes.rb', line 3126

def indent_first_line
  @indent_first_line
end

#indent_startGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property indentStart



3131
3132
3133
# File 'generated/google/apis/docs_v1/classes.rb', line 3131

def indent_start
  @indent_start
end

#keep_lines_togetherBoolean Also known as: keep_lines_together?

Whether all lines of the paragraph should be laid out on the same page or column if possible. If unset, the value is inherited from the parent. Corresponds to the JSON property keepLinesTogether

Returns:

  • (Boolean)


3137
3138
3139
# File 'generated/google/apis/docs_v1/classes.rb', line 3137

def keep_lines_together
  @keep_lines_together
end

#keep_with_nextBoolean Also known as: keep_with_next?

Whether at least a part of this paragraph should be laid out on the same page or column as the next paragraph if possible. If unset, the value is inherited from the parent. Corresponds to the JSON property keepWithNext

Returns:

  • (Boolean)


3145
3146
3147
# File 'generated/google/apis/docs_v1/classes.rb', line 3145

def keep_with_next
  @keep_with_next
end

#line_spacingFloat

The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent. Corresponds to the JSON property lineSpacing

Returns:

  • (Float)


3152
3153
3154
# File 'generated/google/apis/docs_v1/classes.rb', line 3152

def line_spacing
  @line_spacing
end

#named_style_typeString

The named style type of the paragraph. Since updating the named style type affects other properties within ParagraphStyle, the named style type is applied before the other properties are updated. Corresponds to the JSON property namedStyleType

Returns:

  • (String)


3160
3161
3162
# File 'generated/google/apis/docs_v1/classes.rb', line 3160

def named_style_type
  @named_style_type
end

#shadingGoogle::Apis::DocsV1::Shading

The shading of a paragraph. Corresponds to the JSON property shading



3165
3166
3167
# File 'generated/google/apis/docs_v1/classes.rb', line 3165

def shading
  @shading
end

#space_aboveGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property spaceAbove



3170
3171
3172
# File 'generated/google/apis/docs_v1/classes.rb', line 3170

def space_above
  @space_above
end

#space_belowGoogle::Apis::DocsV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property spaceBelow



3175
3176
3177
# File 'generated/google/apis/docs_v1/classes.rb', line 3175

def space_below
  @space_below
end

#spacing_modeString

The spacing mode for the paragraph. Corresponds to the JSON property spacingMode

Returns:

  • (String)


3180
3181
3182
# File 'generated/google/apis/docs_v1/classes.rb', line 3180

def spacing_mode
  @spacing_mode
end

#tab_stopsArray<Google::Apis::DocsV1::TabStop>

A list of the tab stops for this paragraph. The list of tab stops is not inherited. This property is read-only. Corresponds to the JSON property tabStops

Returns:



3186
3187
3188
# File 'generated/google/apis/docs_v1/classes.rb', line 3186

def tab_stops
  @tab_stops
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
# File 'generated/google/apis/docs_v1/classes.rb', line 3193

def update!(**args)
  @alignment = args[:alignment] if args.key?(:alignment)
  @avoid_widow_and_orphan = args[:avoid_widow_and_orphan] if args.key?(:avoid_widow_and_orphan)
  @border_between = args[:border_between] if args.key?(:border_between)
  @border_bottom = args[:border_bottom] if args.key?(:border_bottom)
  @border_left = args[:border_left] if args.key?(:border_left)
  @border_right = args[:border_right] if args.key?(:border_right)
  @border_top = args[:border_top] if args.key?(:border_top)
  @direction = args[:direction] if args.key?(:direction)
  @heading_id = args[:heading_id] if args.key?(:heading_id)
  @indent_end = args[:indent_end] if args.key?(:indent_end)
  @indent_first_line = args[:indent_first_line] if args.key?(:indent_first_line)
  @indent_start = args[:indent_start] if args.key?(:indent_start)
  @keep_lines_together = args[:keep_lines_together] if args.key?(:keep_lines_together)
  @keep_with_next = args[:keep_with_next] if args.key?(:keep_with_next)
  @line_spacing = args[:line_spacing] if args.key?(:line_spacing)
  @named_style_type = args[:named_style_type] if args.key?(:named_style_type)
  @shading = args[:shading] if args.key?(:shading)
  @space_above = args[:space_above] if args.key?(:space_above)
  @space_below = args[:space_below] if args.key?(:space_below)
  @spacing_mode = args[:spacing_mode] if args.key?(:spacing_mode)
  @tab_stops = args[:tab_stops] if args.key?(:tab_stops)
end