+ UI for selecting edit key set.

git-svn-id: trunk@2430 -
This commit is contained in:
daniel 2006-02-04 16:09:11 +00:00
parent 12730b4cb1
commit 1dc6cdbafb
4 changed files with 31 additions and 15 deletions

View File

@ -441,7 +441,7 @@ begin
NewItem(menu_options_env_codecomplete,'', kbNoKey, cmCodeCompleteOptions, hcCodeCompleteOptions, NewItem(menu_options_env_codecomplete,'', kbNoKey, cmCodeCompleteOptions, hcCodeCompleteOptions,
NewItem(menu_options_env_codetemplates,'', kbNoKey, cmCodeTemplateOptions, hcCodeTemplateOptions, NewItem(menu_options_env_codetemplates,'', kbNoKey, cmCodeTemplateOptions, hcCodeTemplateOptions,
NewItem(menu_options_env_desktop,'', kbNoKey, cmDesktopOptions, hcDesktopOptions, NewItem(menu_options_env_desktop,'', kbNoKey, cmDesktopOptions, hcDesktopOptions,
NewItem(menu_options_env_mouse,'', kbNoKey, cmMouse, hcMouse, NewItem(menu_options_env_keybmouse,'', kbNoKey, cmMouse, hcMouse,
NewItem(menu_options_env_startup,'', kbNoKey, cmStartup, hcStartup, NewItem(menu_options_env_startup,'', kbNoKey, cmStartup, hcStartup,
NewItem(menu_options_env_colors,'', kbNoKey, cmColors, hcColors, NewItem(menu_options_env_colors,'', kbNoKey, cmColors, hcColors,
{$ifdef Unix} {$ifdef Unix}

View File

@ -1178,14 +1178,24 @@ var R,R2: TRect;
D: PCenterDialog; D: PCenterDialog;
SB: PScrollBar; SB: PScrollBar;
CB: PCheckBoxes; CB: PCheckBoxes;
RB1,RB2: PRadioButtons; RB1,RB2,RBKB: PRadioButtons;
begin begin
R.Assign(0,0,62,15); R.Assign(0,0,62,19);
New(D, Init(R, dialog_mouseoptions)); New(D, Init(R, dialog_mouseoptions));
with D^ do with D^ do
begin begin
HelpCtx:=hcMouse; HelpCtx:=hcMouse;
GetExtent(R); R.Grow(-3,-2); R.B.Y:=R.A.Y+3; GetExtent(R); R.Grow(-3,-2); inc(R.A.Y); R.B.Y:=R.A.Y+2;
New(RBkb, Init(R,
NewSItem('~B~orland convention (Shift+Del,Ctrl+Ins,Shift+Ins)',
NewSItem('~M~icrosoft convention (Ctrl+X,Ctrl+C,Ctrl+V)',
nil))));
RBkb^.Press(integer(EditKeys));
Insert(RBkb);
R.move(0,-1); R.B.Y:=R.A.Y+1;
Insert(New(PLabel, Init(R, '~K~eys for cut, copy and paste:', RBkb)));
R.Move(0,(R.B.Y-R.A.Y)+3); R.B.Y:=R.A.Y+3;
R2.Copy(R); Inc(R2.A.Y,2); R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2 -1; R2.Copy(R); Inc(R2.A.Y,2); R2.B.X:=R2.A.X+(R2.B.X-R2.A.X) div 2 -1;
New(SB, Init(R2)); SB^.GrowMode:=0; SB^.Options:=SB^.Options or ofSelectable; New(SB, Init(R2)); SB^.GrowMode:=0; SB^.Options:=SB^.Options or ofSelectable;
SB^.SetParams(DoubleDelay,1,20,1,1); SB^.SetParams(DoubleDelay,1,20,1,1);
@ -1232,13 +1242,19 @@ begin
Insert(New(PLabel, Init(R2, label_mouse_altrightmousebuttonaction, RB2))); Insert(New(PLabel, Init(R2, label_mouse_altrightmousebuttonaction, RB2)));
end; end;
InsertButtons(D); InsertButtons(D);
RB1^.Select;
RBkb^.Select;
if Desktop^.ExecView(D)=cmOK then if Desktop^.ExecView(D)=cmOK then
begin begin
MouseReverse:=CB^.Mark(0); MouseReverse:=CB^.Mark(0);
DoubleDelay:=SB^.Value; DoubleDelay:=SB^.Value;
CtrlMouseAction:=RB1^.Value; CtrlMouseAction:=RB1^.Value;
AltMouseAction:=RB2^.Value; AltMouseAction:=RB2^.Value;
if Tedit_key_modes(RBkb^.value)<>EditKeys then
begin
EditKeys:=Tedit_key_modes(RBkb^.value);
reload_menubar;
end;
end; end;
Dispose(D, Done); Dispose(D, Done);
end; end;

View File

@ -144,7 +144,7 @@ const
menu_options_env_codecomplete = 'Code~C~omplete...'; menu_options_env_codecomplete = 'Code~C~omplete...';
menu_options_env_codetemplates = 'Code~T~emplates...'; menu_options_env_codetemplates = 'Code~T~emplates...';
menu_options_env_desktop = '~D~esktop...'; menu_options_env_desktop = '~D~esktop...';
menu_options_env_mouse = '~M~ouse...'; menu_options_env_keybmouse = 'Keyboard & ~m~ouse...';
menu_options_env_startup = '~S~tartup...'; menu_options_env_startup = '~S~tartup...';
menu_options_env_colors= '~C~olors'; menu_options_env_colors= '~C~olors';
menu_options_learn_keys= 'Learn ~K~eys'; menu_options_learn_keys= 'Learn ~K~eys';
@ -450,17 +450,17 @@ const
dialog_mouseoptions = 'Mouse Options'; dialog_mouseoptions = 'Mouse Options';
label_mouse_speedbar = 'Fast Medium Slow'; label_mouse_speedbar = 'Fast Medium Slow';
label_mouse_doubleclickspeed = '~M~ouse double click'; label_mouse_doubleclickspeed = 'Mouse ~d~ouble click';
label_mouse_reversebuttons = '~R~everse mouse buttons'; label_mouse_reversebuttons = '~R~everse mouse buttons';
label_mouse_crtlrightmousebuttonaction = 'Ctrl+Right mouse button'; label_mouse_crtlrightmousebuttonaction = 'Ctrl+Right mouse button';
label_mouse_altrightmousebuttonaction = 'Alt+Right mouse button'; label_mouse_altrightmousebuttonaction = 'Alt+Right mouse button';
label_mouse_act_nothing = '~N~othing'; label_mouse_act_nothing = 'Nothing';
label_mouse_act_topicsearch = '~T~opic search'; label_mouse_act_topicsearch = 'Topic search';
label_mouse_act_gotocursor = '~G~o to cursor'; label_mouse_act_gotocursor = 'Go to cursor';
label_mouse_act_breakpoint = '~B~reakpoint'; label_mouse_act_breakpoint = 'Breakpoint';
label_mouse_act_evaluate = '~E~valuate'; label_mouse_act_evaluate = 'Evaluate';
label_mouse_act_addwatch = '~A~dd watch'; label_mouse_act_addwatch = 'Add watch';
label_mouse_act_browsesymbol = 'Browse ~s~ymbol'; label_mouse_act_browsesymbol = 'Browse symbol';
label_colors_grp_browser = 'Browser'; label_colors_grp_browser = 'Browser';
label_colors_framepassive = 'Frame passive'; label_colors_framepassive = 'Frame passive';

View File

@ -131,7 +131,7 @@ const
menu_options_env_codecomplete = 'Code~C~omplete...'; menu_options_env_codecomplete = 'Code~C~omplete...';
menu_options_env_codetemplates = 'Code~T~emplates...'; menu_options_env_codetemplates = 'Code~T~emplates...';
menu_options_env_desktop = '~A~sztal...'; menu_options_env_desktop = '~A~sztal...';
menu_options_env_mouse = 'E~g~r...'; menu_options_env_keybmouse = 'Keyboard E~g~r...';
menu_options_env_startup = '~I~ndul s...'; menu_options_env_startup = '~I~ndul s...';
menu_options_env_colors= 'Sz¡~n~ek'; menu_options_env_colors= 'Sz¡~n~ek';
menu_options_learn_keys= 'Learn ~K~eys';{ NOT TRANSLATED } menu_options_learn_keys= 'Learn ~K~eys';{ NOT TRANSLATED }