mirror of https://gitlab.com/basile.b/dexed.git
term, rm stuff added for the dsgn component
This commit is contained in:
parent
031386fb3e
commit
9ce5dd15e2
|
@ -82,7 +82,8 @@ var
|
|||
vte_terminal_feed: procedure(terminal: PVteTerminal; data: PChar;
|
||||
length: PtrInt); cdecl;
|
||||
|
||||
vte_terminal_feed_child: procedure(terminal: PVteTerminal; data: PChar; length: PtrInt); cdecl;
|
||||
vte_terminal_feed_child: procedure(terminal: PVteTerminal; data: PChar;
|
||||
length: PtrInt); cdecl;
|
||||
|
||||
vte_get_user_shell: function(): PChar;
|
||||
|
||||
|
@ -107,16 +108,26 @@ begin
|
|||
if Lib = 0 then
|
||||
Exit(Loaded);
|
||||
|
||||
@vte_terminal_new := GetProcAddress(Lib, 'vte_terminal_new');
|
||||
@vte_terminal_fork_command_full := GetProcAddress(Lib, 'vte_terminal_fork_command_full');
|
||||
@vte_terminal_set_color_background := GetProcAddress(Lib, 'vte_terminal_set_color_background');
|
||||
@vte_terminal_set_color_foreground := GetProcAddress(Lib, 'vte_terminal_set_color_foreground');
|
||||
@vte_terminal_set_color_highlight := GetProcAddress(Lib, 'vte_terminal_set_color_highlight');
|
||||
@vte_terminal_set_color_highlight_foreground := GetProcAddress(Lib, 'vte_terminal_set_color_highlight_foreground');
|
||||
@vte_terminal_set_font := GetProcAddress(Lib, 'vte_terminal_set_font');
|
||||
@vte_terminal_feed := GetProcAddress(Lib, 'vte_terminal_feed');
|
||||
@vte_terminal_feed_child := GetProcAddress(Lib, 'vte_terminal_feed_child');
|
||||
@vte_get_user_shell := GetProcAddress(Lib, 'vte_get_user_shell');
|
||||
@vte_terminal_new := GetProcAddress(Lib,
|
||||
'vte_terminal_new');
|
||||
@vte_terminal_fork_command_full := GetProcAddress(Lib,
|
||||
'vte_terminal_fork_command_full');
|
||||
@vte_terminal_set_color_background := GetProcAddress(Lib,
|
||||
'vte_terminal_set_color_background');
|
||||
@vte_terminal_set_color_foreground := GetProcAddress(Lib,
|
||||
'vte_terminal_set_color_foreground');
|
||||
@vte_terminal_set_color_highlight := GetProcAddress(Lib,
|
||||
'vte_terminal_set_color_highlight');
|
||||
@vte_terminal_set_color_highlight_foreground := GetProcAddress(Lib,
|
||||
'vte_terminal_set_color_highlight_foreground');
|
||||
@vte_terminal_set_font := GetProcAddress(Lib,
|
||||
'vte_terminal_set_font');
|
||||
@vte_terminal_feed := GetProcAddress(Lib,
|
||||
'vte_terminal_feed');
|
||||
@vte_terminal_feed_child := GetProcAddress(Lib,
|
||||
'vte_terminal_feed_child');
|
||||
@vte_get_user_shell := GetProcAddress(Lib,
|
||||
'vte_get_user_shell');
|
||||
|
||||
// assume all or none
|
||||
Loaded := @vte_terminal_new <> nil;
|
||||
|
|
|
@ -106,7 +106,7 @@ uses
|
|||
type
|
||||
|
||||
TGtk2WSTerminal = class(TWSCustomControl)
|
||||
protected
|
||||
private
|
||||
class procedure SetCallbacks(const AGtkWidget: PGtkWidget;
|
||||
const AWidgetInfo: PWidgetInfo); virtual;
|
||||
published
|
||||
|
@ -266,23 +266,7 @@ begin
|
|||
end;
|
||||
|
||||
procedure TTerminal.Paint;
|
||||
const
|
||||
s = 'linux@user:~$ bash terminal';
|
||||
var
|
||||
w: integer = 0;
|
||||
h: integer = 0;
|
||||
begin
|
||||
if not (csDesigning in ComponentState) then
|
||||
exit;
|
||||
|
||||
Canvas.Pen.Style := psDash;
|
||||
Canvas.Pen.Color := clWhite;
|
||||
Canvas.Brush.Color := clBlack;
|
||||
Canvas.Font.Color := clWhite;
|
||||
Canvas.FillRect(ClientRect);
|
||||
Canvas.Rectangle(ClientRect);
|
||||
Canvas.GetTextSize(s, w, h);
|
||||
Canvas.TextOut((Width - w) div 2, (Height - h) div 2, s);
|
||||
end;
|
||||
|
||||
procedure TTerminal.setBackgroundColor(value: TColor);
|
||||
|
|
|
@ -133,6 +133,7 @@ begin
|
|||
w.fTerm.selectedColor:= selectedColor;
|
||||
w.fTerm.Font.BeginUpdate;
|
||||
w.fTerm.Font.Assign(fFont);
|
||||
// force the change: assigning does always trigger TTerminal.FontChanged.
|
||||
w.fTerm.Font.Size := w.fTerm.Font.Size +1;
|
||||
w.fTerm.Font.Size := w.fTerm.Font.Size -1;
|
||||
w.fTerm.Font.endUpdate;
|
||||
|
|
Loading…
Reference in New Issue