[Lazarus] For what {$IFDEF SYN_LAZARUS} in SynEdit?
Martin
lazarus at mfriebe.de
Fri Apr 22 17:35:25 CEST 2011
>
> http://bugs.freepascal.org/view.php?id=19215
>
> Please check this lines in SynTextDrawer
>
> procedure TheFontStock.SetStyle(Value: TFontStyles);
>
> // ASSERT(idx <= High(TheStockFontPatterns)); //Check this line
>
>
> SY
> Zaher Dirkey
>
I will look at it in due course.
In case... your clean up may be so you can add features later; and
seeing you gone for TextDrawer first.
If you want to add features around drawing, here are a few of my ideas
(all without any idea when..., just distant ideas)
1) Introduction of a TSynCanvas
- More or less to wrap the TSynEdit.Handle
- The class could be known by other classes in SynEdit (without
circle references) and would be used for any Invalidate,
invalidateLines, invalidateRect request.
- Maybe also for painting, so painting is in an event, and the handle
is passed in by the caller.
Also painting is done from other classes, more below
2) Introduction of a TSynViewPort (or TsynEditViewPort)
represents the textarea (as opposed to gutter).
SynEdit takes care of the layout (eg Gutter AlLeft, ViewPort
alClient...), and the classes are responsible for the painting, (using
TsynCanvas, and the arguments to the paint event)
TSynViewPort will also be responsible to store TopLine, LeftChar,
LinesInWindow, CharsInWindow
TSynViewPort would still use TextDrawer, but some stuff may move...
----
Ideally this would even allow to have none LCL versions, like fpgui,
msegui, or delphi... => but that is a long way
You are af course invited to bring up your ideas too.
More information about the Lazarus
mailing list