mirror of https://gitlab.com/basile.b/dexed.git
terminal, add the scrollbacklines property
This commit is contained in:
parent
bd792efe0d
commit
113a53ab54
|
@ -33,9 +33,11 @@ type
|
||||||
fBackgroundColor: TColor;
|
fBackgroundColor: TColor;
|
||||||
fForegroundColor: TColor;
|
fForegroundColor: TColor;
|
||||||
fSelectedColor: TColor;
|
fSelectedColor: TColor;
|
||||||
|
fScrollbackLines: LongWord;
|
||||||
procedure setBackgroundColor(value: TColor);
|
procedure setBackgroundColor(value: TColor);
|
||||||
procedure setForegroundColor(value: TColor);
|
procedure setForegroundColor(value: TColor);
|
||||||
procedure setSelectedColor(value: TColor);
|
procedure setSelectedColor(value: TColor);
|
||||||
|
procedure setScrollBackLines(value: LongWord);
|
||||||
protected
|
protected
|
||||||
// Only used at design-time.
|
// Only used at design-time.
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
|
@ -53,6 +55,7 @@ type
|
||||||
{$ifdef windows}
|
{$ifdef windows}
|
||||||
property terminalProgram: string read fTermProgram write fTermProgram;
|
property terminalProgram: string read fTermProgram write fTermProgram;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
property scrollbackLines: LongWord read fScrollbackLines write setScrollBackLines default 512;
|
||||||
// Background color
|
// Background color
|
||||||
property backgroundColor: TColor read fBackgroundColor write setBackgroundColor default clBlack;
|
property backgroundColor: TColor read fBackgroundColor write setBackgroundColor default clBlack;
|
||||||
// Font color
|
// Font color
|
||||||
|
@ -326,6 +329,7 @@ begin
|
||||||
fSelectedColor:= clWhite;
|
fSelectedColor:= clWhite;
|
||||||
Font.Height:=11;
|
Font.Height:=11;
|
||||||
Font.Name:='Monospace';
|
Font.Name:='Monospace';
|
||||||
|
fScrollbackLines:=512;
|
||||||
|
|
||||||
{$ifdef windows}
|
{$ifdef windows}
|
||||||
fTermProgram := 'cmd.exe';
|
fTermProgram := 'cmd.exe';
|
||||||
|
@ -349,6 +353,16 @@ procedure TTerminal.Paint;
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTerminal.setScrollBackLines(value: LongWord);
|
||||||
|
var
|
||||||
|
v: TGValue;
|
||||||
|
begin
|
||||||
|
fScrollbackLines:=value;
|
||||||
|
v.g_type:= 1;
|
||||||
|
v.data[0].v_uint := fScrollbackLines;
|
||||||
|
g_object_set_property(PGObject(PWidgetInfo(FInfo).ClientWidget), 'scrollback-lines', @v);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTerminal.setBackgroundColor(value: TColor);
|
procedure TTerminal.setBackgroundColor(value: TColor);
|
||||||
{$ifdef hasgtk2term}
|
{$ifdef hasgtk2term}
|
||||||
var
|
var
|
||||||
|
|
|
@ -19,6 +19,7 @@ type
|
||||||
fSelectedColor: TColor;
|
fSelectedColor: TColor;
|
||||||
fFollowEditors: boolean;
|
fFollowEditors: boolean;
|
||||||
fFollowProjects: boolean;
|
fFollowProjects: boolean;
|
||||||
|
fScrollbackLines: longword;
|
||||||
fFont: TFont;
|
fFont: TFont;
|
||||||
procedure setFont(value: TFont);
|
procedure setFont(value: TFont);
|
||||||
public
|
public
|
||||||
|
@ -32,6 +33,7 @@ type
|
||||||
property font: TFont read fFont write setFont;
|
property font: TFont read fFont write setFont;
|
||||||
property followEditors: boolean read fFollowEditors write fFollowEditors;
|
property followEditors: boolean read fFollowEditors write fFollowEditors;
|
||||||
property followProjects: boolean read fFollowProjects write fFollowProjects;
|
property followProjects: boolean read fFollowProjects write fFollowProjects;
|
||||||
|
property scrollbackLines: longword read fScrollbackLines write fScrollbackLines default 512;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Editable and reversible Terminal options
|
// Editable and reversible Terminal options
|
||||||
|
@ -92,6 +94,7 @@ begin
|
||||||
fSelectedColor:= clBlack;
|
fSelectedColor:= clBlack;
|
||||||
fFont.Name:= 'Monospace';
|
fFont.Name:= 'Monospace';
|
||||||
fFont.Size:= 12;
|
fFont.Size:= 12;
|
||||||
|
fScrollbackLines:=512;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCETerminalOptionsBase.destroy;
|
destructor TCETerminalOptionsBase.destroy;
|
||||||
|
@ -121,6 +124,7 @@ begin
|
||||||
fFont.Height:=fFont.Height-1;
|
fFont.Height:=fFont.Height-1;
|
||||||
fFont.Assign(s.font);
|
fFont.Assign(s.font);
|
||||||
fFont.EndUpdate;
|
fFont.EndUpdate;
|
||||||
|
fScrollbackLines := s.fScrollbackLines;
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
@ -145,6 +149,7 @@ begin
|
||||||
w.fTerm.Font.Size := w.fTerm.Font.Size +1;
|
w.fTerm.Font.Size := w.fTerm.Font.Size +1;
|
||||||
w.fTerm.Font.Size := w.fTerm.Font.Size -1;
|
w.fTerm.Font.Size := w.fTerm.Font.Size -1;
|
||||||
w.fTerm.Font.endUpdate;
|
w.fTerm.Font.endUpdate;
|
||||||
|
w.fTerm.scrollbackLines:=fScrollbackLines;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCETerminalOptions.optionedWantCategory(): string;
|
function TCETerminalOptions.optionedWantCategory(): string;
|
||||||
|
|
Loading…
Reference in New Issue