Class: Google::Apis::DocsV1::ParagraphStyle
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::ParagraphStyle
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/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's 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
-
#alignment ⇒ String
The text alignment for this paragraph.
-
#avoid_widow_and_orphan ⇒ Boolean
(also: #avoid_widow_and_orphan?)
Whether to avoid widows and orphans for the paragraph.
-
#border_between ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
-
#border_bottom ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
-
#border_left ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
-
#border_right ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
-
#border_top ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
-
#direction ⇒ String
The text direction of this paragraph.
-
#heading_id ⇒ String
The heading ID of the paragraph.
-
#indent_end ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
-
#indent_first_line ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
-
#indent_start ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
-
#keep_lines_together ⇒ Boolean
(also: #keep_lines_together?)
Whether all lines of the paragraph should be laid out on the same page or column if possible.
-
#keep_with_next ⇒ Boolean
(also: #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.
-
#line_spacing ⇒ Float
The amount of space between lines, as a percentage of normal, where normal is represented as 100.0.
-
#named_style_type ⇒ String
The named style type of the paragraph.
-
#page_break_before ⇒ Boolean
(also: #page_break_before?)
Whether the current paragraph should always start at the beginning of a page.
-
#shading ⇒ Google::Apis::DocsV1::Shading
The shading of a paragraph.
-
#space_above ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
-
#space_below ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
-
#spacing_mode ⇒ String
The spacing mode for the paragraph.
-
#tab_stops ⇒ Array<Google::Apis::DocsV1::TabStop>
A list of the tab stops for this paragraph.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ParagraphStyle
constructor
A new instance of ParagraphStyle.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ParagraphStyle
Returns a new instance of ParagraphStyle.
3990 3991 3992 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3990 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alignment ⇒ String
The text alignment for this paragraph.
Corresponds to the JSON property alignment
3865 3866 3867 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3865 def alignment @alignment end |
#avoid_widow_and_orphan ⇒ Boolean 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
3871 3872 3873 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3871 def avoid_widow_and_orphan @avoid_widow_and_orphan end |
#border_between ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
Corresponds to the JSON property borderBetween
3877 3878 3879 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3877 def border_between @border_between end |
#border_bottom ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
Corresponds to the JSON property borderBottom
3882 3883 3884 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3882 def border_bottom @border_bottom end |
#border_left ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
Corresponds to the JSON property borderLeft
3887 3888 3889 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3887 def border_left @border_left end |
#border_right ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
Corresponds to the JSON property borderRight
3892 3893 3894 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3892 def border_right @border_right end |
#border_top ⇒ Google::Apis::DocsV1::ParagraphBorder
A border around a paragraph.
Corresponds to the JSON property borderTop
3897 3898 3899 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3897 def border_top @border_top end |
#direction ⇒ String
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
3903 3904 3905 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3903 def direction @direction end |
#heading_id ⇒ String
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
3909 3910 3911 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3909 def heading_id @heading_id end |
#indent_end ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property indentEnd
3914 3915 3916 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3914 def indent_end @indent_end end |
#indent_first_line ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property indentFirstLine
3919 3920 3921 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3919 def indent_first_line @indent_first_line end |
#indent_start ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property indentStart
3924 3925 3926 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3924 def indent_start @indent_start end |
#keep_lines_together ⇒ Boolean 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
3930 3931 3932 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3930 def keep_lines_together @keep_lines_together end |
#keep_with_next ⇒ Boolean 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
3938 3939 3940 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3938 def keep_with_next @keep_with_next end |
#line_spacing ⇒ Float
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
3945 3946 3947 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3945 def line_spacing @line_spacing end |
#named_style_type ⇒ String
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
3952 3953 3954 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3952 def named_style_type @named_style_type end |
#page_break_before ⇒ Boolean Also known as: page_break_before?
Whether the current paragraph should always start at the beginning of a page.
If unset, the value is inherited from the parent. Attempting to update
page_break_before for paragraphs in unsupported regions, including Table,
Header, Footer and Footnote, can result in an invalid document state that
returns a 400 bad request error.
Corresponds to the JSON property pageBreakBefore
3961 3962 3963 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3961 def page_break_before @page_break_before end |
#shading ⇒ Google::Apis::DocsV1::Shading
The shading of a paragraph.
Corresponds to the JSON property shading
3967 3968 3969 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3967 def shading @shading end |
#space_above ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property spaceAbove
3972 3973 3974 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3972 def space_above @space_above end |
#space_below ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property spaceBelow
3977 3978 3979 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3977 def space_below @space_below end |
#spacing_mode ⇒ String
The spacing mode for the paragraph.
Corresponds to the JSON property spacingMode
3982 3983 3984 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3982 def spacing_mode @spacing_mode end |
#tab_stops ⇒ Array<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
3988 3989 3990 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3988 def tab_stops @tab_stops end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 |
# File 'lib/google/apis/docs_v1/classes.rb', line 3995 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) @page_break_before = args[:page_break_before] if args.key?(:page_break_before) @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 |