added new editor options: Right Mouse moves cursor and Tab Indent Blocks

git-svn-id: trunk@6546 -
This commit is contained in:
mattias 2005-01-11 15:22:04 +00:00
parent f4ad4bf427
commit e79682cb9c
2 changed files with 40 additions and 2 deletions

View File

@ -299,6 +299,7 @@ type
HalfPageScrollCheckBox:TCheckBox;
KeepCaretXCheckBox:TCheckBox;
PersistentCaretCheckBox:TCheckBox;
RightMouseMovesCursorCheckBox:TCheckBox;
ScrollByOneLessCheckBox:TCheckBox;
ScrollPastEofCheckBox:TCheckBox;
ScrollPastEolCheckBox:TCheckBox;
@ -306,6 +307,7 @@ type
ShowScrollHintCheckBox:TCheckBox;
SmartTabsCheckBox:TCheckBox;
TabsToSpacesCheckBox:TCheckBox;
TabIndentCheckBox:TCheckBox;
TrimTrailingSpacesCheckBox:TCheckBox;
UndoAfterSaveCheckBox:TCheckBox;
DoubleClickLineCheckBox:TCheckBox;
@ -2408,6 +2410,7 @@ begin
SetOption(HalfPageScrollCheckBox,eoHalfPageScroll);
SetOption(KeepCaretXCheckBox,eoKeepCaretX);
SetOption(PersistentCaretCheckBox,eoPersistentCaret);
SetOption(RightMouseMovesCursorCheckBox,eoRightMouseMovesCursor);
// not for Preview: SetOption(NoSelectionCheckBox,eoNoSelection);
SetOption(ScrollByOneLessCheckBox,eoScrollByOneLess);
SetOption(ScrollPastEoFCheckBox,eoScrollPastEoF);
@ -2415,6 +2418,7 @@ begin
SetOption(ShowScrollHintCheckBox,eoShowScrollHint);
SetOption(SmartTabsCheckBox,eoSmartTabs);
SetOption(TabsToSpacesCheckBox,eoTabsToSpaces);
SetOption(TabIndentCheckBox,eoTabIndent);
SetOption(TrimTrailingSpacesCheckBox,eoTrimTrailingSpaces);
for a:=Low(PreviewEdits) to High(PreviewEdits) do begin
@ -3382,7 +3386,7 @@ begin
Top:=5;
Left:=5;
Width:=MaxX-10;
Height:=24*12; // 24 pixels per line
Height:=21*13+13; // 21 pixels per line
Caption:=lismenueditoroptions;
end;
@ -3482,6 +3486,17 @@ begin
end;
inc(y,ChkBoxH);
RightMouseMovesCursorCheckBox:=TCheckBox.Create(Self);
with RightMouseMovesCursorCheckBox do begin
Name:='RightMouseMovesCursorCheckBox';
Parent:=EditorOptionsGroupBox;
SetBounds(x,y,ChkBoxW,Height);
Caption:=dlgRightMouseMovesCursor;
Checked:=eoRightMouseMovesCursor in EditorOpts.SynEditOptions;
OnClick:=@GeneralCheckBoxOnClick;
end;
inc(y,ChkBoxH);
ScrollByOneLessCheckBox:=TCheckBox.Create(Self);
with ScrollByOneLessCheckBox do begin
Name:='ScrollByOneLessCheckBox';
@ -3583,6 +3598,17 @@ begin
end;
inc(y,ChkBoxH);
TabIndentCheckBox:=TCheckBox.Create(Self);
with TabIndentCheckBox do begin
Name:='TabIndentCheckBox';
Parent:=EditorOptionsGroupBox;
SetBounds(x,y,ChkBoxW,Height);
Caption:=dlgTabIndent;
Checked:=eoTabIndent in EditorOpts.SynEditOptions;
OnClick:=@GeneralCheckBoxOnClick;
end;
inc(y,ChkBoxH);
TrimTrailingSpacesCheckBox:=TCheckBox.Create(Self);
with TrimTrailingSpacesCheckBox do begin
Name:='TrimTrailingSpacesCheckBox';
@ -3752,7 +3778,7 @@ begin
Top:=5;
Left:=5;
Width:=MaxX-10;
Height:=21*12+31; // 21 pixels per option
Height:=21*13+31; // 21 pixels per option
end;
// many, many checkboxes ...
@ -3800,6 +3826,11 @@ begin
end;
inc(y,ChkBoxH);
with RightMouseMovesCursorCheckBox do begin
SetBounds(x,y,ChkBoxW,Height);
end;
inc(y,ChkBoxH);
with ScrollByOneLessCheckBox do begin
SetBounds(x,y,ChkBoxW,Height);
end;
@ -3849,6 +3880,11 @@ begin
end;
inc(y,ChkBoxH);
with TabIndentCheckBox do begin
SetBounds(x,y,ChkBoxW,Height);
end;
inc(y,ChkBoxH);
with TrimTrailingSpacesCheckBox do begin
SetBounds(x,y,ChkBoxW,Height);
end;

View File

@ -754,6 +754,7 @@ resourcestring
dlgHalfPageScroll = 'Half page scroll';
dlgKeepCaretX = 'Keep X caret';
dlgPersistentCaret = 'Persistent caret';
dlgRightMouseMovesCursor = 'Right mouse moves caret';
dlgScrollByOneLess = 'Scroll by one less';
dlgScrollPastEndFile = 'Scroll past end of file';
dlgScrollPastEndLine = 'Scroll past end of line';
@ -763,6 +764,7 @@ resourcestring
dlgShowGutterHints = 'Show gutter hints';
dlgSmartTabs = 'Smart tabs';
dlgTabsToSpaces = 'Tabs to spaces';
dlgTabIndent = 'Tab indents blocks';
dlgTrimTrailingSpaces = 'Trim trailing spaces';
dlgUndoAfterSave = 'Undo after save';
dlgDoubleClickLine = 'Double click line';