'From Cuis 1.0 of 21 August 2009 [latest update: #268] on 27 August 2009 at 1:11:28 pm'!
!classDefinition: #TextStyle category: #'Graphics-Text'!
Object subclass: #TextStyle
	instanceVariableNames: 'name font alignment tabsArray color firstIndent restIndent rightIndent paragraphSpacingAfter paragraphSpacingBefore '
	classVariableNames: 'AvailableTextStyles DefaultTextStyle '
	poolDictionaries: ''
	category: 'Graphics-Text'!

!TextStyle methodsFor: 'accessing' stamp: 'jmv 8/26/2009 13:37'!
paragraphSpacingAfter
	^paragraphSpacingAfter! !

!TextStyle methodsFor: 'accessing' stamp: 'jmv 8/26/2009 13:37'!
paragraphSpacingBefore
	^paragraphSpacingBefore! !

!TextStyle methodsFor: 'initialization' stamp: 'jmv 8/26/2009 23:27'!
initialize
	firstIndent _ restIndent _ rightIndent _ paragraphSpacingBefore _ paragraphSpacingAfter _ 0! !

!TextStyle methodsFor: 'initialization' stamp: 'jmv 8/26/2009 13:36'!
privateParagraphSpacingAfter: anInteger
	paragraphSpacingAfter _ anInteger! !

!TextStyle methodsFor: 'initialization' stamp: 'jmv 8/26/2009 13:36'!
privateParagraphSpacingBefore: anInteger
	paragraphSpacingBefore _ anInteger! !


!TextStyle class methodsFor: 'examples' stamp: 'jmv 8/27/2009 07:09'!
createExamples
	"
	TextStyle createExamples
	"
	| dejaVu22 dejaVu17 dejaVu14 dejaVu11 dejaVu10 heading1 heading2 heading3 emphasized normal |

	dejaVu22 _ AbstractFont familyName: 'DejaVu' pointSize: 22.
	dejaVu17 _ AbstractFont familyName: 'DejaVu' pointSize: 17.
	dejaVu14 _ AbstractFont familyName: 'DejaVu' pointSize: 14.
	dejaVu11 _ AbstractFont familyName: 'DejaVu' pointSize: 11.
	dejaVu10 _ AbstractFont familyName: 'DejaVu' pointSize: 10.
	
	heading1 _ TextStyle withFont: dejaVu22 name: 'Heading 1' alignment: CharacterScanner centeredCode.
	heading1
		privateParagraphSpacingBefore: 34;
		privateParagraphSpacingAfter: 18.
	self makeAvailable: heading1.

	heading2 _ TextStyle withFont: dejaVu17 bold name: 'Heading 2' alignment: CharacterScanner leftFlushCode.
	heading2
		privateParagraphSpacingBefore: 24;
		privateParagraphSpacingAfter: 8.
	self makeAvailable: heading2.

	heading3 _ TextStyle withFont: dejaVu14 italic name: 'Heading 3' alignment: CharacterScanner leftFlushCode.
	heading3
		privateParagraphSpacingBefore: 18;
		privateParagraphSpacingAfter: 4.
	self makeAvailable: heading3.

	emphasized _ TextStyle withFont: dejaVu10 bold name: 'Emphasized' alignment: CharacterScanner justifiedCode.
	emphasized
		privateFirstIndent: 60;
		privateRestIndent: 60;
		privateRightIndent: 60;
		privateParagraphSpacingBefore: 10;
		privateParagraphSpacingAfter: 2.
	self makeAvailable: emphasized.
	
	normal _ TextStyle withFont: dejaVu11 name: 'Normal' alignment: CharacterScanner justifiedCode.
	normal
		privateFirstIndent: 20;
		privateRestIndent: 8;
		privateRightIndent: 8;
		privateParagraphSpacingBefore: 8;
		privateParagraphSpacingAfter: 2.
	self makeAvailable: normal! !

!classDefinition: #TextStyle category: #'Graphics-Text'!
Object subclass: #TextStyle
	instanceVariableNames: 'name font alignment tabsArray color firstIndent restIndent rightIndent paragraphSpacingBefore paragraphSpacingAfter'
	classVariableNames: 'AvailableTextStyles DefaultTextStyle'
	poolDictionaries: ''
	category: 'Graphics-Text'!
"Postscript:
Leave the line above, and replace the rest of this comment by a useful one.
Executable statements should follow this comment, and should
be separated by periods, with no exclamation points (!!).
Be sure to put any further comments in double-quotes, like this one."

TextStyle allInstancesDo: [ :s |
	s
		privateParagraphSpacingBefore: 0;
		privateParagraphSpacingAfter: 0 ].
TextStyle createExamples!

