Working on keybindings window (unfinished)
This commit is contained in:
parent
b1b87b4cd2
commit
88c3401679
|
@ -66,6 +66,9 @@ begin
|
|||
DefaultCell := default(TEnhancedVideoCell);
|
||||
DefaultCell.ForegroundColor := DefaultFgColor;
|
||||
DefaultCell.BackgroundColor := DefaultBgColor;
|
||||
DefaultCell.EGC_SingleChar := ' ';
|
||||
DefaultCell.Attribute := 0;
|
||||
DefaultCell.EnhancedVideoAttributes := [];
|
||||
AnsiParser.Init(App, DefaultCell);
|
||||
end;
|
||||
|
||||
|
@ -139,8 +142,7 @@ begin
|
|||
LongestLine := 0;
|
||||
LineCount := Length(Lines);
|
||||
{ clear the screen }
|
||||
OChar := default(TEnhancedVideoCell);
|
||||
OChar.EGC_SingleChar := chr(32);
|
||||
OChar := DefaultCell;
|
||||
AddToDrawBuf(DrawBuffer, OChar, Size.X);
|
||||
WriteLine(0, 0, Size.X, Size.Y, DrawBuffer);
|
||||
DrawBuffer := default(TDrawBuffer);
|
||||
|
|
|
@ -256,8 +256,8 @@ implementation
|
|||
ResultStr: RawByteString = '';
|
||||
RequestStr: AnsiString = '';
|
||||
Part: RawByteString = '';
|
||||
Buf: array[0..1048577] of Char = '';
|
||||
Count: Integer = 1048576;
|
||||
Buf: array[0..4097] of Char = '';
|
||||
Count: Integer = 4096;
|
||||
IsMenu: Boolean = False;
|
||||
ReadResult: LongInt = 1;
|
||||
Menu: TGopherMenuItems;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
unit TurboGopherApplication;
|
||||
{$codepage UTF8}
|
||||
{$mode objFPC}{$H+}{$codepage UTF8}
|
||||
|
||||
interface
|
||||
|
||||
|
@ -21,6 +21,7 @@ uses
|
|||
const
|
||||
cmGo = 1000;
|
||||
cmNewBrowser = 1001;
|
||||
cmPrefs = 1002;
|
||||
|
||||
type
|
||||
|
||||
|
@ -64,7 +65,8 @@ implementation
|
|||
LogWindow,
|
||||
BrowserWindow,
|
||||
BrowserWindowFactory,
|
||||
GoWindow;
|
||||
GoWindow,
|
||||
KeybindingsWindow;
|
||||
|
||||
var
|
||||
FLogger: PLogger = nil;
|
||||
|
@ -72,6 +74,7 @@ implementation
|
|||
FLogWindow: TLogWindow;
|
||||
FGoWindow: TGoWindow;
|
||||
FBrowserWindowFactory: TBrowserWindowFactory;
|
||||
FKeybindingsWindow: TKeybindingsWindow;
|
||||
|
||||
{ TTGApp }
|
||||
|
||||
|
@ -118,6 +121,10 @@ implementation
|
|||
begin
|
||||
FLogger^.Debug('Received tile');
|
||||
end;
|
||||
cmPrefs:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -161,7 +168,9 @@ implementation
|
|||
NewMenu(
|
||||
NewSubMenu('~F~ile', hcNoContext,
|
||||
NewMenu(
|
||||
NewItem('~Q~uit', 'Alt-X', kbAltX, cmQuit, hcNoContext, nil)
|
||||
NewItem('~P~references', 'Alt-P', kbAltP, cmPrefs, hcNoContext,
|
||||
NewItem('~Q~uit', 'Alt-X', kbAltX, cmQuit, hcNoContext, nil)
|
||||
)
|
||||
),
|
||||
NewSubMenu('~B~rowse', hcNoContext,
|
||||
NewMenu(
|
||||
|
@ -172,7 +181,7 @@ implementation
|
|||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
);
|
||||
end;
|
||||
|
||||
{ TTurboGopherApplication }
|
||||
|
@ -190,6 +199,7 @@ implementation
|
|||
FLogWindow := TLogWindow.Init(Self);
|
||||
FLogWindow.InstanceSize; (* dummy thing to get rid of unused warn *)
|
||||
FGoWindow := TGoWindow.Create(Self);
|
||||
FKeybindingsWindow := TKeybindingsWindow.Create(Self);
|
||||
end;
|
||||
|
||||
procedure TTurboGopherApplication.CloseBrowserWindow(WindowNumber: Integer);
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
unit KeybindingsWindow;
|
||||
{$mode objFPC}{$H+}{$codepage UTF8}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
TurboGopherApplication,
|
||||
TurboGopherWindow,
|
||||
|
||||
Classes,
|
||||
Objects,
|
||||
SysUtils,
|
||||
UApp,
|
||||
UDialogs,
|
||||
UDrivers,
|
||||
UViews;
|
||||
|
||||
type
|
||||
|
||||
PKeybindingsView = ^TKeybindingsView;
|
||||
TKeybindingsView = object(TWindow)
|
||||
|
||||
end;
|
||||
|
||||
PKeybindingsWindow = ^TKeybindingsWindow;
|
||||
TKeybindingsWindow = class(TTurboGopherWindow)
|
||||
constructor Create(var TheApp: TTurboGopherApplication);
|
||||
var
|
||||
App: TTurboGopherApplication;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
constructor TKeybindingsWindow.Create(var TheApp: TTurboGopherApplication);
|
||||
begin
|
||||
App := TheApp;
|
||||
end;
|
||||
|
||||
end.
|
|
@ -8,7 +8,7 @@ cthreads,
|
|||
Classes,
|
||||
CustApp,
|
||||
SysUtils,
|
||||
TurboGopherApplication;
|
||||
TurboGopherApplication, KeybindingsWindow;
|
||||
|
||||
Var
|
||||
Application: TTurboGopherApplication;
|
||||
|
|
Loading…
Reference in New Issue