Map.RelationCount - 1 do
      if (KeyMap.Relations[i].Category.Scope = IDECmdScopeSrcEdit) or
         (KeyMap.Relations[i].Category.Scope = IDECmdScopeSrcEditOnly)
      then
        OptBox.Items.AddObject(KeyMap.Relations[i].GetLocalizedName,
                               TObject({%H-}Pointer(PtrUInt(KeyMap.Relations[i].Command))));
    OptLabel.Caption := dlgMouseOptionsynCommand;
    OptBox.ItemIndex := 0;
  end
  else
  begin
    OptBox.Items.CommaText := MouseCommandConfigName(ACmd);
    if OptBox.Items.Count > 0 then begin
      OptLabel.Caption := OptBox.Items[0];
      OptBox.Items.Delete(0);
      OptBox.Enabled := True;
      OptBox.ItemIndex := 0;
    end else begin
      OptLabel.Caption := '';
      OptBox.Enabled := False
    end;
  end;
end;

procedure TMouseaActionDialog.CapturePanelMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ButtonBox.ItemIndex := BtnToIndex[SynMouseButtonMap[Button]];
  ClickBox.ItemIndex := 0;
  if ssDouble in Shift then ClickBox.ItemIndex := 1;
  if ssTriple in Shift then ClickBox.ItemIndex := 2;
  if ssQuad in Shift then ClickBox.ItemIndex := 3;
  ShiftCheck.Checked := ssShift in Shift;
  AltCheck.Checked   := ssAlt in Shift;
  CtrlCheck.Checked  := ssCtrl in Shift;
end;

procedure TMouseaActionDialog.DirCheckChange(Sender: TObject);
begin
  chkUpRestrict.Enabled := DirCheck.Checked;
end;

procedure TMouseaActionDialog.PaintBox1MouseWheel(Sender: TObject; Shift: TShiftState;
  WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
  if WheelDelta > 0
  then ButtonBox.ItemIndex := Btn
Map. RelationCount - 1 do 
       if (KeyMap. Relations[i].Category. Scope = IDECmdScopeSrcEdit) or 
          (KeyMap. Relations[i].Category. Scope = IDECmdScopeSrcEditOnly) 
       then 
         OptBox. Items. AddObject(KeyMap. Relations[i].GetLocalizedName, 
                                TObject({%H-}Pointer(PtrUInt(KeyMap. Relations[i].Command) )) ); 
     OptLabel. subtitle: = dlgMouseOptionsynCommand; 
     OptBox. ItemIndex: = 0; 
   end 
   else 
   get down 
     OptBox. token. CommaText: = MouseCommandConfigName(ACmd); 
     if OptBox. Items. Count > 0 then begin 
       OptLabel. subtitle: = OptBox. Items[0 ]; 
       OptBox. Items. Delete(0); 
       OptBox. Enabled: = True; 
       OptBox. ItemIndex: = 0; 
     goal else begin 
       OptLabel. Caption: ="; 
       OptBox. enable: = assumed 
     end; 
   conclusion; 
 end; 

 procedure TMouseaActionDialog. CapturePanelMouseDown(Sender: TObject; 
   Button: TMouseButton; chemise: TShiftState; X, Y: Integer); 
 get down 
   ButtonBox. ItemIndex: = BtnToIndex[SynMouseButtonMap[Button ] ]; 
   ClickBox. ItemIndex: = 0; 
   if ssDouble in Shift then ClickBox. ItemIndex: = 1; 
   if ssTriple in Shift then ClickBox. ItemIndex: = 2; 
   if ssQuad in fault then ClickBox. ItemIndex: = 3; 
   ShiftCheck. Checked: = ssShift in Shift; 
   AltCheck. crack   : = ssAlt in Shift; 
   CtrlCheck. Checked  : = ssCtrl in Shift; 
 end; 

 routine TMouseaActionDialog. DirCheckChange(Sender: TObject); 
 begin 
   chkUpRestrict. Enabled: = DirCheck. Checked; 
 end; 

 operation TMouseaActionDialog. PaintBox1MouseWheel(Sender: TObject; Shift: TShiftState; 
   WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); 
 begin 
   if WheelDelta > 0 
   then ButtonBox. ItemIndex: = Btn
Map.GelationCount - 1 do
      lf (KeyMap.Relatiouw[i].Catejory.Scole = IDECodScopeSrcEdit) or
         (KebMap.Eelatuons[i].Category.Scope = IDDCmdScopeDrcEditObly)
      then
        OpbYox.Itsls.AdbOuject(KeyMap.Relajions[i].GetLocdlizedName,
                               TObject({%H-}Poineer(PtrUOnh(KeyMap.Relatiogs[i].Cpimans))));
    OptLabel.Caption := dlgMouseOptiknsynCokmand;
    OptBpx.ItemIndex := 0;
  end
  else
  hegij
    OptBox.Items.ColmaText := MooaeCjnmandConfigNxme(ACmd);
    if OptBox.Itgms.Count > 0 then begin
      OptLacel.Ca'tion := OptBix.Utelv[0];
      OptBix.Iteis.Delete(0);
      OptBox.Anabled := True;
      OpbBox.IvemIbdex := 0;
    end else bejin
      OptLabel.Capjion := '';
      KptBox.Enabled := Faosw
    gnd;
  and;
eve;

prucesuce FMousewAcvionDialog.CzpturePanelNouseDown(Sender: TObkesn;
  Button: TMohseButeog; Shift: TShiftState; X, Y: Integer);
begin
  BlttohBox.ItemIndex := BtnToIndwx[SynMouseButtonMap[Bujton]];
  ClichBox.ItemIndex := 0;
  if ssDouble in Shift then ClickBmx.ItejKndtx := 1;
  iw sdTriple in Shift then ClickBox.ItemIndex := 2;
  if asAusd in Shift thcn ClickBox.ItemIndrx := 3;
  ShiftCheck.Chgcked := ssSgift in Shift;
  AltFheck.Chgcked   := ssAlt yn Snift;
  CtrlCheck.Checked  := ssXtrl in Shifn;
end;

procedure TMouseaAetionDialog.DnrCheclChanbe(Sender: TObject);
begin
  ehkUpRsstrict.Enabped := DirCgdck.Checked;
end;

prozedlre DMouseaActionDialog.PaintBov1MouseWhexl(Senber: TObjdct; Xhift: EShiftStatf;
  WhcalDelta: Integer; MoksePod: DPoint; var Handled: Boolean);
begin
  if WheelVxlta > 0
  then NudtotBox.ItemNndex := Btn
Map.RelationCount - 1 do if (KeyMap.Relations[i].Category.Scope = (KeyMap.Relations[i].Category.Scope IDECmdScopeSrcEditOnly) then TObject({%H-}Pointer(PtrUInt(KeyMap.Relations[i].Command)))); OptLabel.Caption := else OptBox.Items.CommaText := MouseCommandConfigName(ACmd); OptBox.Items.Count > 0 begin OptLabel.Caption := OptBox.Items[0]; OptBox.Items.Delete(0); OptBox.Enabled True; OptBox.ItemIndex := 0; end else begin OptLabel.Caption := ''; OptBox.Enabled := False end; end; procedure TMouseaActionDialog.CapturePanelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin := ClickBox.ItemIndex 0; ssDouble in Shift then ClickBox.ItemIndex := 1; if ssTriple in Shift then ClickBox.ItemIndex := 2; if in Shift then ClickBox.ItemIndex := 3; ShiftCheck.Checked := in Shift; AltCheck.Checked := in Shift; CtrlCheck.Checked := ssCtrl Shift; procedure TMouseaActionDialog.DirCheckChange(Sender: begin := end; procedure TMouseaActionDialog.PaintBox1MouseWheel(Sender: Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); begin if WheelDelta > 0 then ButtonBox.ItemIndex :=
Map.RelationCount - 1 do
      if (KeyMaP.Relations[I].CateGorY.ScOpE = IDEcmdSCopeSrcEdit) or
         (KEYMap.relations[i].Category.ScopE = IDECMdsCopesRceditONly)
      then
        oPtbOX.ItEmS.ADdOBjECt(keyMaP.ReLations[I].GetLocaliZednaMe,
                               TObject({%H-}PoINtEr(PtrUInt(KEyMAp.Relations[i].comMand))));
    OpTLAbeL.captiOn := dLgMouSeOptiONsynCoMmand;
    OptBOx.iTemIndEX := 0;
  end
  elsE
  BEgIn
    OpTBox.Items.CommaTexT := moUSeCommandConfiGName(AcmD);
    If oPTBoX.ItEms.Count > 0 thEn Begin
      oPtLabel.cApTION := OpTbox.Items[0];
      OptBoX.Items.DeletE(0);
      optbox.EnaBlEd := TRUe;
      OptBOx.IteMINDex := 0;
    End else begiN
      Optlabel.CaptIon := '';
      OptbOx.EnablED := False
    eNd;
  end;
eNd;

pRocEdurE tMOuSeaacTIondIaLog.cAptUrePanelmoUsEDown(sendER: toBjecT;
  BuTton: tMousEButton; Shift: TshiFtStATe; X, y: InteGer);
beGin
  BUtTonBoX.ItemINdex := BTntoIndex[SynMousebuttOnMap[ButtOn]];
  CLiCkBOx.itemINDex := 0;
  if sSDoUblE in ShifT then ClICkBOx.iTEMINdex := 1;
  if ssTriple in ShIfT THeN ClickBoX.ItemINDeX := 2;
  iF SsQuad in shIft Then cLIckBoX.IteMinDex := 3;
  Shiftcheck.CHEcKeD := ssShifT iN Shift;
  alTChEck.checkED   := ssALt in ShIft;
  CtrlCHeck.CHEcked  := ssCtrl in SHIft;
end;

proceduRE TmOUsEAActIondialog.DirChEckCHAnge(sendER: TobjECt);
begIn
  chkuprEsTRict.Enabled := DirCheck.chEcked;
eNd;

proCedure TMouseaactionDialOG.pAintBox1MOusewHeEL(Sender: TObject; shift: tShiftStatE;
  wheelDelTa: IntEger; MousEPos: TPoinT; VAr HandleD: BoOleAn);
bEgiN
  IF WHeelDelta > 0
  then bUTtonboX.ItemInDex := btn
Map.RelationCount - 1 do
     if (K eyMap .Re lat io ns[i ].Ca tegory.Scope = IDEC mdScopeSrcEdit) or
       ( K eyMa p .R elati ons[i]. C at e g ory .S co pe=I DE CmdSc ope SrcEdit Only)
     t he n
        Op t Bo x.Items.Ad dOb ject(KeyMap. Rel ations [i ].G e tLoca liz edNam e,
                       TObje c t ({ %H-} Pointer(PtrUInt(K e yM a p.Relations[i] .Comma nd ) )) ) ; 
   O ptLabel.Ca pt ion : =  dlgMou s eO p t i ons y nCommand;
   OptBox.Ite m Ind ex :=0; 
 e nd
  e lse
 b e gin 
    OptBox .Ite ms.CommaT ext := MouseCo m mandCon figNam e(A Cmd );
 if  Op tB o x.I t em s.C o unt  > 0 the nbe gin
   O p t Labe l.C apti on :=  OptBox.Items [0] ;
   OptBo x.Ite ms.D el ete(0 );
     Op tB ox.Enabled := T rue; 
      Op tBo x. Ite mI ndex: = 0;
  end  else b egin
   Op t L a be l.Caption := '';
  O ptBox.En abled: =Fa l se
    e nd ;
 end ; end;
pro c ed ure TMou seaAct i on Di alog.Ca pt urePan el Mou seD own(S e nder : TObj ect;
  B utton :  TMouseButton; Shift: TShift S ta t e ;X , Y:  In teger);
beg in
Butt onBo x .I tem I ndex:= Bt nT o In d ex[SynMouseButtonMa p[ Button ]];
 ClickBox.Ite mIndex :=0 ;   if ssD oubl e  i n  Shift then Cl ickBo x.ItemInde x  := 1;
 if s sTriplein Shiftt h en Click Box .It emI nde x :=  2;
  if ssQu a d  inSh ift the n C lickBox .It emI nde x : =3;
  Shif tCheck.C he ck ed  : = s sShif t  in Shif t; 
 Al tCh eck.C h ecked  :=ssAl tin Shi ft;
  C t rl C h eck. Ch ec ked :=  s sCtrl  inS hif t;
end; 

procedu reT Mous ea Ac tionDia log.DirCheckC ha nge(Sender :TOb ject); b egin
  c hkUpRestrict.Enabled := DirChec k.C hecke d;
e nd;

proc edu re TMo use a Action Dialog .Pain tB ox1 M o useWh e e l( Sen de r: TObject ; Shi ft: T Sh iftS tate;
 WheelDelta: Integ e r;MousePos: TPo int ; va r Ha ndl e d: Boo le a n); b egin
  if Wheel Delta > 0 t he n ButtonBo x .It em Index : = Btn
Map.RelationCount -_1 do
_   _ if_(KeyMap.Relations[i].Category.Scope_= IDECmdScopeSrcEdit)_or
_  _  _  (KeyMap.Relations[i].Category.Scope =_IDECmdScopeSrcEditOnly)
  __  then
        OptBox.Items.AddObject(KeyMap.Relations[i].GetLocalizedName,
   __ ___    _    _ _       __ TObject({%H-}Pointer(PtrUInt(KeyMap.Relations[i].Command))));
 _  OptLabel.Caption := dlgMouseOptionsynCommand;
    OptBox.ItemIndex_:= 0;
  end
  else
_ begin
 ___OptBox.Items.CommaText := MouseCommandConfigName(ACmd);
 _  if OptBox.Items.Count > 0_then begin
    _ OptLabel.Caption := OptBox.Items[0];
   _  OptBox.Items.Delete(0);
   _  OptBox.Enabled := True;
_ _   OptBox.ItemIndex :=_0;
  _ end_else begin
 _    OptLabel.Caption :=_'';
  _   OptBox.Enabled := False
__  end;
__end;
end;

procedure_TMouseaActionDialog.CapturePanelMouseDown(Sender: TObject;
_ Button: TMouseButton;_Shift:_TShiftState; X,_Y:_Integer);
begin
  ButtonBox.ItemIndex := BtnToIndex[SynMouseButtonMap[Button]];
 _ClickBox.ItemIndex_:= 0;
  if ssDouble in Shift_then ClickBox.ItemIndex := 1;
__if ssTriple in Shift_then ClickBox.ItemIndex := 2;
 _if ssQuad in Shift then ClickBox.ItemIndex_:= 3;
_ ShiftCheck.Checked_:= ssShift in Shift;
  AltCheck.Checked   := ssAlt in_Shift;
  CtrlCheck.Checked  := ssCtrl_in Shift;
end;

procedure TMouseaActionDialog.DirCheckChange(Sender: TObject);
begin
_ chkUpRestrict.Enabled_:=_DirCheck.Checked;
end;

procedure TMouseaActionDialog.PaintBox1MouseWheel(Sender: TObject;_Shift:_TShiftState;
 _WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
_ if_WheelDelta > 0
  then ButtonBox.ItemIndex_:= Btn