Difference between revisions of "TabulationParagraphStyle class"

From Catglobe Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|Name=<nowiki>TabulationParagraphStyle</nowiki>
 
|Name=<nowiki>TabulationParagraphStyle</nowiki>
 
|Description=<nowiki>Styles for a paragraph</nowiki>
 
|Description=<nowiki>Styles for a paragraph</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Description=<nowiki>Create a new ParagraphStyle</nowiki>}}
 
{{CGscriptConstructors_Template|Description=<nowiki>Create a new ParagraphStyle</nowiki>}}
 
|Methods=
 
|Methods=
Line 8: Line 8:
 
{{CGscriptParameters_Template|Type=TabulationBullet|Name=<nowiki>bulletSettings</nowiki>|Description=<nowiki>Styling of the bullets</nowiki>}}
 
{{CGscriptParameters_Template|Type=TabulationBullet|Name=<nowiki>bulletSettings</nowiki>|Description=<nowiki>Styling of the bullets</nowiki>}}
 
|Description=<nowiki>Apply Bulletsettings to paragraphStyle to turn the paragraph into a list of bullets</nowiki>}}
 
|Description=<nowiki>Apply Bulletsettings to paragraphStyle to turn the paragraph into a list of bullets</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Alignment</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set alignment of paragraph: Left, Right, Center, Justify</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Alignment</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set alignment of paragraph: Left, Right, Center, Justify</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsHtml</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set IsHtml. Defines if the paragraph contains html that should be parsed.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MarginBottomPoints</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set marginBottom in points. Must be 0-400 points</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MarginBottomPoints</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set marginBottom in points. Must be 0-400 points</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MarginLeftPoints</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set marginLeft in points. Must be 0-400 points</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MarginLeftPoints</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set marginLeft in points. Must be 0-400 points</nowiki>}}
Line 16: Line 17:
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MarginTopPoints</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set marginTop in points. Must be 0-400 points</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>MarginTopPoints</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/Set marginTop in points. Must be 0-400 points</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 +
 +
Relevant classes and function : [[TabulationTextStyle class|TabulationTextStyle]], [[TabulationParagraph class|TabulationParagraph]], [[Tabulation_addParagraph]]
  
 
=== <span style="color:#DF8621">'''Examples'''</span> ===
 
=== <span style="color:#DF8621">'''Examples'''</span> ===
Line 24: Line 27:
 
TabulationParagraphStyle paragraphStyle = new TabulationParagraphStyle();
 
TabulationParagraphStyle paragraphStyle = new TabulationParagraphStyle();
 
paragraphStyle.Alignment = "center"; //left, right, center.
 
paragraphStyle.Alignment = "center"; //left, right, center.
paragraphStyle.MarginTopPoints = 10; //1-399
+
paragraphStyle.MarginTopPoints = 10; //0-400
paragraphStyle.MarginLeftPoints = 10;//1-399
+
paragraphStyle.MarginLeftPoints = 10;//0-400
 +
 
 +
TabulationTextStyle textStyle = new TabulationTextStyle();
 +
textStyle.Color = Color_getByName("red"); //Takes a color array-
 +
//textStyle.Color = Color_getByRGB(255,0,0); // can also be set from rgb.
 +
//textStyle.Color = new Color("red",false); // can also be set by Color object
 +
textStyle.FontFace = "Bariol Regular";
 +
textStyle.FontSize = 40; //1-399
 +
textStyle.Bold = false;
 +
textStyle.Italic = false;
 +
textStyle.Underline = false;
 +
 
 +
TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle);
 +
paragraph.AddPortion("Some text", textStyle);
 +
 
 +
Tabulation_addParagraph(paragraph);
 
</source>
 
</source>

Latest revision as of 09:19, 2 July 2020

TabulationParagraphStyle



Styles for a paragraph

Parent class

Inherits from object

Constructors

  • () - Create a new ParagraphStyle

Methods

  • Empty SetBulletSetting(TabulationBullet bulletSettings "Styling of the bullets") - Apply Bulletsettings to paragraphStyle to turn the paragraph into a list of bullets
  • (From object) string ToString() - The string representation of the object.

Properties

  • string Alignment { get; set; } - Get/Set alignment of paragraph: Left, Right, Center, Justify
  • bool IsHtml { get; set; } - Get/Set IsHtml. Defines if the paragraph contains html that should be parsed.
  • int MarginBottomPoints { get; set; } - Get/Set marginBottom in points. Must be 0-400 points
  • int MarginLeftPoints { get; set; } - Get/Set marginLeft in points. Must be 0-400 points
  • int MarginRightPoints { get; set; } - Get/Set marginRight in points. Must be 0-400 points
  • int MarginTopPoints { get; set; } - Get/Set marginTop in points. Must be 0-400 points
  • string ObjectTypeName { get; } - The name of the type of object.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.


Relevant classes and function : TabulationTextStyle, TabulationParagraph, Tabulation_addParagraph

Examples

TabulationParagraphStyle paragraphStyle = new TabulationParagraphStyle();
paragraphStyle.Alignment = "center"; //left, right, center.
paragraphStyle.MarginTopPoints = 10; //0-400
paragraphStyle.MarginLeftPoints = 10;//0-400

TabulationTextStyle textStyle = new TabulationTextStyle();
textStyle.Color = Color_getByName("red"); //Takes a color array-
//textStyle.Color = Color_getByRGB(255,0,0); // can also be set from rgb.
//textStyle.Color = new Color("red",false); // can also be set by Color object
textStyle.FontFace = "Bariol Regular";
textStyle.FontSize = 40; //1-399
textStyle.Bold = false;
textStyle.Italic = false;
textStyle.Underline = false;

TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle);
paragraph.AddPortion("Some text", textStyle);

Tabulation_addParagraph(paragraph);