Recent

Author Topic: [SynEdit] TCustomSynEdit.MouseDown doesn't get called for RightGutter !!!  (Read 2720 times)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Hello,

does anyone know why TCustomSynEdit.MouseDown doesn't get called
when the mouse is clicked on the right gutter (Part is TSynGutterLineOverview).
I am not able to get any information if and where mouse is clicked on right guttter!

Pascal
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11290
  • Debugger - SynEdit - and more
    • wiki
Please report on Mantis.

Technical background is that the overviewgutter is a separate wincontrol. This helps to reduce painting.

The gutter is supposed to forward events, but that may not have been fully implemented.

Pascal

  • Hero Member
  • *****
  • Posts: 932
Okay,

this makes sense. I will have a look at it and mybe i can submit a fix.

Pascal


laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Martin,

where can i see that TSynGutterLineOverview is a separate WinControl?

It looks like every other gutter:

TSynGutterLineOverview = class(TSynGutterPartBase)
TSynGutterPartBase = class(TSynObjectListItem)
TSynObjectListItem = class(TSynEditFriend)
TSynEditFriend = class(TComponent)
TComponent = class(TPersistent,IUnknown,IInterfaceComponentReference)

BTW: I am using 1.4RC3
« Last Edit: April 17, 2015, 07:25:43 pm by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11290
  • Debugger - SynEdit - and more
    • wiki
Code: [Select]
  TSynGutterLineOverview = class(TSynGutterPartBase)
  private
    FProviders: TSynGutterLineOverviewProviderList;
    FWinControl: TSynChildWinControl;
....
procedure TSynGutterLineOverview.Init;
begin
...
  FWinControl := TSynChildWinControl.Create(Self);

That will need to override MouseDown/Up etc, and forward it.

Or maybe it can be made to ignore them in the WindProc handler, and pass them to parent.

The problem is that the overviewgutter invalidates at a different y pos than the rest of SynEdit.
In cases where the minimum bounding rect will be invalidated/painted this leads to lots of extra painting (especially during scroll, and that can visible slow down scrolling).

So this is only needed for painting. All else (hittest, cursor, mouse, etc) can go to SynEdit.

 

TinyPortal © 2005-2018