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;
|
||||
fForegroundColor: TColor;
|
||||
fSelectedColor: TColor;
|
||||
fScrollbackLines: LongWord;
|
||||
procedure setBackgroundColor(value: TColor);
|
||||
procedure setForegroundColor(value: TColor);
|
||||
procedure setSelectedColor(value: TColor);
|
||||
procedure setScrollBackLines(value: LongWord);
|
||||
protected
|
||||
// Only used at design-time.
|
||||
procedure Paint; override;
|
||||
|
@ -53,6 +55,7 @@ type
|
|||
{$ifdef windows}
|
||||
property terminalProgram: string read fTermProgram write fTermProgram;
|
||||
{$endif}
|
||||
property scrollbackLines: LongWord read fScrollbackLines write setScrollBackLines default 512;
|
||||
// Background color
|
||||
property backgroundColor: TColor read fBackgroundColor write setBackgroundColor default clBlack;
|
||||
// Font color
|
||||
|
@ -326,6 +329,7 @@ begin
|
|||
fSelectedColor:= clWhite;
|
||||
Font.Height:=11;
|
||||
Font.Name:='Monospace';
|
||||
fScrollbackLines:=512;
|
||||
|
||||
{$ifdef windows}
|
||||
fTermProgram := 'cmd.exe';
|
||||
|
@ -349,6 +353,16 @@ procedure TTerminal.Paint;
|
|||
begin
|
||||
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);
|
||||
{$ifdef hasgtk2term}
|
||||
var
|
||||
|
|
|
@ -19,6 +19,7 @@ type
|
|||
fSelectedColor: TColor;
|
||||
fFollowEditors: boolean;
|
||||
fFollowProjects: boolean;
|
||||
fScrollbackLines: longword;
|
||||
fFont: TFont;
|
||||
procedure setFont(value: TFont);
|
||||
public
|
||||
|
@ -32,6 +33,7 @@ type
|
|||
property font: TFont read fFont write setFont;
|
||||
property followEditors: boolean read fFollowEditors write fFollowEditors;
|
||||
property followProjects: boolean read fFollowProjects write fFollowProjects;
|
||||
property scrollbackLines: longword read fScrollbackLines write fScrollbackLines default 512;
|
||||
end;
|
||||
|
||||
// Editable and reversible Terminal options
|
||||
|
@ -92,6 +94,7 @@ begin
|
|||
fSelectedColor:= clBlack;
|
||||
fFont.Name:= 'Monospace';
|
||||
fFont.Size:= 12;
|
||||
fScrollbackLines:=512;
|
||||
end;
|
||||
|
||||
destructor TCETerminalOptionsBase.destroy;
|
||||
|
@ -121,6 +124,7 @@ begin
|
|||
fFont.Height:=fFont.Height-1;
|
||||
fFont.Assign(s.font);
|
||||
fFont.EndUpdate;
|
||||
fScrollbackLines := s.fScrollbackLines;
|
||||
end
|
||||
else inherited;
|
||||
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.endUpdate;
|
||||
w.fTerm.scrollbackLines:=fScrollbackLines;
|
||||
end;
|
||||
|
||||
function TCETerminalOptions.optionedWantCategory(): string;
|
||||
|
|
Loading…
Reference in New Issue