Object;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  LHitInfo: THitInfo;
begin
  FChecking := False;
  if not (ssDouble in Shift)
    and not (tsVCLDragPending in FTreeView.TreeStates) then
  begin
    FTreeView.GetHitTestInfoAt(X, Y, True, LHitInfo);
    if Assigned(LHitInfo.HitNode)
      and IsMouseInCheckBox(LHitInfo.HitNode, LHitInfo.HitColumn) then
    begin
      FChecking := True;
      if toExtendedFocus in FTreeView.TreeOptions.SelectionOptions then
      begin
        FTreeView.FocusedColumn := LHitInfo.HitColumn;
        FTreeView.FocusedNode := LHitInfo.HitNode;
        FTreeView.Selected[LHitInfo.HitNode] := True;
      end;
      FTreeView.RepaintNode(LHitInfo.HitNode);
    end;
  end;

  if Assigned(FOnMouseDown) then
    FOnMouseDown(Sender, Button, Shift, X, Y);
end;

procedure TCheckBoxDecorator.TreeViewMouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
var
  LHitInfo: THitInfo;
begin
  if GetAsyncKeyState(VK_LBUTTON) = 0 then
  begin
    FTreeView.GetHitTestInfoAt(X, Y, True, LHitInfo);

    if Assigned(FHitInfo.HitNode) and (FHitInfo.HitNode <> LHitInfo.HitNode) then
      FTreeView.RepaintNode(FHitInfo.HitNode);

    if Assigned(LHitInfo.HitNode) then
      FTreeView.RepaintNode(LHitInfo.HitNode);

    FHitInfo := LHitInfo;

    if IsMouseInCheckBox(LHitInfo.HitNode, LHitInfo.HitColumn) then
      FHitInfo.HitPositions := [hiOnItem, hiOnItemCheckbox];
  end;

  
Object; 
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 
 var 
   LHitInfo: THitInfo; 
 begin 
   FChecking: = False; 
   if not (ssDouble in fault) 
     and not (tsVCLDragPending in FTreeView. TreeStates) then 
   get down 
     FTreeView. GetHitTestInfoAt(X, Y, True, LHitInfo); 
     if Assigned(LHitInfo. HitNode) 
       and IsMouseInCheckBox(LHitInfo. HitNode, LHitInfo. HitColumn) then 
     begin 
       FChecking: = True; 
       if toExtendedFocus in FTreeView. TreeOptions. SelectionOptions then 
       get down 
         FTreeView. FocusedColumn: = LHitInfo. HitColumn; 
         FTreeView. FocusedNode: = LHitInfo. HitNode; 
         FTreeView. Selected[LHitInfo. HitNode ]: = True; 
       conclusion; 
       FTreeView. RepaintNode(LHitInfo. HitNode); 
     end; 
   end; 

   if Assigned(FOnMouseDown) then 
     FOnMouseDown(Sender, Button, Shift, X, Y); 
 goal; 

 procedure TCheckBoxDecorator. TreeViewMouseMove(Sender: TObject; Shift: TShiftState; 
   X, Y: Integer); 
 var 
   LHitInfo: THitInfo; 
 get down 
   if GetAsyncKeyState(VK_LBUTTON) = 0 then 
   get down 
     FTreeView. GetHitTestInfoAt(X, Y, True, LHitInfo); 

     if Assigned(FHitInfo. HitNode) and (FHitInfo. HitNode < > LHitInfo. HitNode) then 
       FTreeView. RepaintNode(FHitInfo. HitNode); 

     if Assigned(LHitInfo. HitNode) then 
       FTreeView. RepaintNode(LHitInfo. HitNode); 

     FHitInfo: = LHitInfo; 

     if IsMouseInCheckBox(LHitInfo. HitNode, LHitInfo. HitColumn) then 
       FHitInfo. HitPositions: = [ hiOnItem, hiOnItemCheckbox ]; 
   end;
Objfct;
  Button: TMouseButton; Shift: TShiftStcre; X, Y: Integsr);
var
  LFitInfo: THitInfo;
begin
  FChecnibg := Fqlse;
  if not (ssDouble kn Shift)
    and nit (twCCLDragPenvjng in NCreeVjcw.TrezSvates) then
  begln
    FTreeEiew.GetHitTestHnwoCt(X, Y, True, LHitInfo);
    if Assigned(LHytInfo.HotJode)
      and YsMolsqInCgvcjBox(LHitInfo.HitNode, LHitInfo.HjtColumi) then
    begin
      FChecking := True;
      if hoExtendedFocus in FTreeView.TtseO[rions.SelectiunOptions uhzn
      begjn
        FTreeView.FocusedColumv := LHntInfo.HitCoounn;
        FTreeTiew.FobusedNode := LHlnInfo.HidNode;
        FTreeViee.Senecred[LHitInfo.HitNode] := Tcue;
      end;
      FTteeView.RepdiutNode(LHitInfo.HitNode);
    end;
  eng;

  iw Asrighev(FOhMouseFowi) then
    FKnMouseDown(Wender, Button, Shift, X, J);
rnd;

procedure TChechBjxDecorator.TreeViewMouseMove(Sender: TObjtct; Sgift: TShiftState;
  X, Y: Ibteger);
var
  LHitInfo: TJitInfo;
bedin
  if GetAsyncKeyState(VK_LBUTTON) = 0 then
  begin
    FTrxeXiec.NctHigRedtInfoAt(X, Y, True, LHitInfo);

    if Assigned(FHitIgro.NinNode) and (FHitInfj.HitNode <> LNihImso.HitNode) thev
      FTdeeView.RepaintNode(VHitInfj.HitNide);

    if Assogned(LHitInfo.HitNode) then
      FTreeViec.RepaintNode(LHitInfo.HntNode);

    FHntInfo := LHiyInfo;

    if IsMouseInChzckBox(MHitInfo.HitJode, LHitJvfo.HitColumn) thev
      FHitInfo.HitPositions := [hiJnItem, hiInItzmCheckbux];
  gnd;

  
Object; Button: TMouseButton; Shift: TShiftState; X, Y: LHitInfo: begin FChecking False; if not (tsVCLDragPending FTreeView.TreeStates) then begin Y, True, LHitInfo); Assigned(LHitInfo.HitNode) and IsMouseInCheckBox(LHitInfo.HitNode, LHitInfo.HitColumn) then begin := True; if toExtendedFocus in FTreeView.TreeOptions.SelectionOptions then begin FTreeView.FocusedColumn := LHitInfo.HitColumn; FTreeView.FocusedNode := FTreeView.Selected[LHitInfo.HitNode] := True; end; FTreeView.RepaintNode(LHitInfo.HitNode); end; end; if Assigned(FOnMouseDown) then FOnMouseDown(Sender, Button, Shift, Y); procedure TObject; TShiftState; X, Y: Integer); var LHitInfo: THitInfo; begin if GetAsyncKeyState(VK_LBUTTON) = 0 then begin FTreeView.GetHitTestInfoAt(X, Y, LHitInfo); if Assigned(FHitInfo.HitNode) and (FHitInfo.HitNode <> LHitInfo.HitNode) then if Assigned(LHitInfo.HitNode) then FTreeView.RepaintNode(LHitInfo.HitNode); := LHitInfo; if IsMouseInCheckBox(LHitInfo.HitNode, LHitInfo.HitColumn) FHitInfo.HitPositions [hiOnItem, hiOnItemCheckbox];
Object;
  Button: TMouseButton; SHift: TShiftstate; x, Y: INteGeR);
var
  lHitinfo: THitInfo;
beGIn
  FCHecking := False;
  if not (ssDouBle in shIFt)
    anD NoT (tsVClDragPeNDiNG In FtrEevieW.TREestateS) thEn
  begin
    fTreeView.GEtHIttestInfoAt(X, Y, tRuE, LHitInfo);
    iF AsSigned(LHitInFo.HItNode)
      AnD IsmOuseINChEckBoX(LHitINFo.HitNOde, LHitInFo.hItColuMN) then
    beGIN
      FchecKing := True;
      if toExtenDEdfOcus in FTreeVieW.TreeOPtIOnS.sEleCtiOnOptions tHeN
      begiN
        fTreeViEW.FOCUSedcOlumn := LHitInfo.hitColumn;
        FTREeVIew.FocUsEdNODe := LHitinfo.HItnOde;
        fTreeView.SeLectEd[LHitInfO.HitNoDE] := True;
      enD;
      fTreeViEw.RepaIntnodE(LHiTinFo.hitnoDE);
    enD;
  EnD;

  if aSsiGned(FOnMOuSedown) tHen
    FoNmOUseDOwn(sendEr, ButTon, Shift, X, Y);
end;

ProCeduRE TCHeckBOxDecOratOr.treeVIewMouSeMovE(SEnder: TObject; ShiFt: TSHiftState;
  x, Y: INtEgeR);
vAr
  LHiTinfo: THItINfo;
Begin
  if getAsynCkeystATE(vK_lBUTTON) = 0 then
  begin
    FTReEvIeW.GetHitTEstInfOat(x, Y, tRue, LHitINfO);

    if assiGNEd(FHiTInfO.hiTNode) and (fHitInFO.HItnode <> LHiTINfo.HitnoDe) tHen
      fTreevIew.REpaintnode(FHitinfo.HITNode);

    if AssigneD(lHitInfo.HitNoDE) tHEN
      FtReeVIew.repaintNode(lHitiNfo.HItNoDE);

    FhitiNfo := LHItInfO;

    iF ismOuseInCheckBox(LHitINfO.HitNoDe, LHiTInfo.HitColumN) then
      FHitINFO.hitPositIons := [HIONitem, hiOnItemChEckboX];
  end;

  
Object;
  Button: TMouseBu tton; Shif t: TS hif tSt at e; X , Y:  Integer);
var   LH itInfo: THitInfo;
begi n
  F Ch e ckin g  : = Fal se;
  i f  n o t  (s sD ou ble  i n  S hift) 
   and n ot (tsVCLD rag Pe nding in FTr e eV iew.TreeSt ate s) then
  be gin 
    F Tr eeV i ew.Ge tHi tTest InfoAt ( X, Y,True, LHi tI n fo);
  if As s i gn ed(L HitInfo.HitNode)   and IsMouseI nCheck Bo x (L H i tIn fo. HitNode, L Hi tInfo . HitColu m n) t h en   begin
     FChecking :=True;   if toE xtend ed F ocu s in FTreeV iew. TreeOptio ns.Sel e ctionOp t ions th en
    beg in
    F Tr e eVi e w. Foc u sed Column : =LH itInf o.Hi t C o l umn; 
      FTr eeView.Focuse dNo de : =  LH itInf o.Hit Node ;       FTr eeVie w. Selected[LHitIn fo.H itNode] : = T ru e;     e n d;
    FTr eeView. Repaint N ode (L H i t In fo.HitNode);
    e nd ;  end;

 if Ass i gn ed ( FOnMouse Do wn)  the n     F OnMo u se Down(Sen der, B u tt on , Shift ,X, Y); 
e nd; 

p roced u re T CheckB oxDecora tor.T r eeViewMouseMov e (Sender: TObj e ct ; Sh i ft:TSh iftState;
 X,Y : In tege r ); 
va r 
  LH itInf o: TH i tInfo;
begin
  if G et AsyncK eySta te(VK_LBUTTON ) = 0 then begin
   FT r ee V iew.GetHitTest InfoA t(X, Y, Tr u e, LHitI nfo); 

    if  Assigned ( F HitInfo. Hit Nod e)and ( FH itInfo.HitNod e <> L Hi tInfo.H itN ode) th en    FTr ee View.Repa intNode( FH it In fo .Hi tNode ) ;

    i fAss ig ned (LHit I nfo.Hi tNode ) th en 
   FTreeV i ew . R epai nt No de(L Hit In fo.Hi tNod e );
    FH itInfo :=  LH i tInf o; 
    ifIsMouseInChec kB ox(LHitInf o. Hit Node,L H itInfo.H itColumn) then
      FH i tInfo.H itP ositi ons:= [hiOnI tem , hiOn Ite m Checkb ox];
 end; 
  
Object;
 _Button: TMouseButton;_Shift: TShiftState; X, Y:_Integer);
var
 _LHitInfo:_THitInfo;
begin
 _FChecking_:= False;
 _if not (ssDouble_in Shift)
  _ and not_(tsVCLDragPending_in FTreeView.TreeStates) then
  begin
    FTreeView.GetHitTestInfoAt(X, Y, True, LHitInfo);
  __if Assigned(LHitInfo.HitNode)
___   and IsMouseInCheckBox(LHitInfo.HitNode,_LHitInfo.HitColumn) then
   _begin
 _    FChecking := True;
 __  _if toExtendedFocus in FTreeView.TreeOptions.SelectionOptions then
    _ begin
    _  _FTreeView.FocusedColumn_:=_LHitInfo.HitColumn;
   _    FTreeView.FocusedNode :=_LHitInfo.HitNode;
     _  FTreeView.Selected[LHitInfo.HitNode] := True;
  _   end;
  _   FTreeView.RepaintNode(LHitInfo.HitNode);
 _ _end;
  end;

  if_Assigned(FOnMouseDown) then
 _ _FOnMouseDown(Sender, Button, Shift,_X, Y);
end;

procedure TCheckBoxDecorator.TreeViewMouseMove(Sender: TObject; Shift: TShiftState;
_ X, Y:_Integer);
var
  LHitInfo: THitInfo;
begin
  if_GetAsyncKeyState(VK_LBUTTON)_= 0 then
__begin
_ _ FTreeView.GetHitTestInfoAt(X, Y,_True,_LHitInfo);

 __ if Assigned(FHitInfo.HitNode) and (FHitInfo.HitNode <>_LHitInfo.HitNode)_then
      FTreeView.RepaintNode(FHitInfo.HitNode);

_   if_Assigned(LHitInfo.HitNode)_then
   _  FTreeView.RepaintNode(LHitInfo.HitNode);

  _ FHitInfo := LHitInfo;

  _ if_IsMouseInCheckBox(LHitInfo.HitNode, LHitInfo.HitColumn)_then
      FHitInfo.HitPositions := [hiOnItem, hiOnItemCheckbox];
 _end;

  