mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 21:00:38 +01:00
fpvectorial: Adds default prototype for text spans
git-svn-id: trunk@43106 -
This commit is contained in:
parent
04708ba54b
commit
3409da264c
@ -1136,6 +1136,7 @@ type
|
|||||||
// List of common styles, for conveniently finding them
|
// List of common styles, for conveniently finding them
|
||||||
StyleTextBody, StyleHeading1, StyleHeading2, StyleHeading3: TvStyle;
|
StyleTextBody, StyleHeading1, StyleHeading2, StyleHeading3: TvStyle;
|
||||||
StyleBulletList, StyleNumberList : TvListStyle;
|
StyleBulletList, StyleNumberList : TvListStyle;
|
||||||
|
StyleTextSpanBold, StyleTextSpanItalic, StyleTextSpanUnderline: TvStyle;
|
||||||
{ Base methods }
|
{ Base methods }
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -6169,6 +6170,8 @@ end;
|
|||||||
function TvVectorialDocument.AddTextPageSequence: TvTextPageSequence;
|
function TvVectorialDocument.AddTextPageSequence: TvTextPageSequence;
|
||||||
begin
|
begin
|
||||||
Result := TvTextPageSequence.Create(Self);
|
Result := TvTextPageSequence.Create(Self);
|
||||||
|
Result.Width := Width;
|
||||||
|
Result.Height := Height;
|
||||||
FPages.Add(Result);
|
FPages.Add(Result);
|
||||||
if FCurrentPageIndex < 0 then FCurrentPageIndex := FPages.Count-1;
|
if FCurrentPageIndex < 0 then FCurrentPageIndex := FPages.Count-1;
|
||||||
end;
|
end;
|
||||||
@ -6281,6 +6284,27 @@ begin
|
|||||||
lCurListLevelStyle.MarginLeft := 16.35*(i + 1);
|
lCurListLevelStyle.MarginLeft := 16.35*(i + 1);
|
||||||
lCurListLevelStyle.HangingIndent := 6.35 + 3*i;
|
lCurListLevelStyle.HangingIndent := 6.35 + 3*i;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// ---------------------------------
|
||||||
|
// Text Span Items
|
||||||
|
// ---------------------------------
|
||||||
|
StyleTextSpanBold := AddStyle();
|
||||||
|
StyleTextSpanBold.Kind := vskTextSpan; // This implies this style should not be applied to Paragraphs
|
||||||
|
StyleTextSpanBold.Name := 'Bold';
|
||||||
|
StyleTextSpanBold.Font.Bold := True;
|
||||||
|
StyleTextSpanBold.SetElements := StyleTextSpanBold.SetElements + [spbfFontBold];
|
||||||
|
|
||||||
|
StyleTextSpanItalic := AddStyle();
|
||||||
|
StyleTextSpanItalic.Kind := vskTextSpan; // This implies this style should not be applied to Paragraphs
|
||||||
|
StyleTextSpanItalic.Name := 'Italic';
|
||||||
|
StyleTextSpanItalic.Font.Italic := True;
|
||||||
|
StyleTextSpanItalic.SetElements := StyleTextSpanItalic.SetElements + [spbfFontItalic];
|
||||||
|
|
||||||
|
StyleTextSpanUnderline := AddStyle();
|
||||||
|
StyleTextSpanUnderline.Kind := vskTextSpan; // This implies this style should not be applied to Paragraphs
|
||||||
|
StyleTextSpanUnderline.Name := 'Underline';
|
||||||
|
StyleTextSpanUnderline.Font.Underline := True;
|
||||||
|
StyleTextSpanUnderline.SetElements := StyleTextSpanUnderline.SetElements + [spbfFontUnderline];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TvVectorialDocument.GetStyleCount: Integer;
|
function TvVectorialDocument.GetStyleCount: Integer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user