Recent

Author Topic: Create terminal user interfaces with Lazarus?  (Read 1807 times)

asdf1337

  • Jr. Member
  • **
  • Posts: 56
Create terminal user interfaces with Lazarus?
« on: February 23, 2021, 10:44:05 pm »
Hi,
is there a way for simple creation of terminal user interfaces with Lazarus?
So that something like this, this or this can be created in the normal Lazarus IDE. :)
If there is not a way, does anyone have some tips how such an TUI could be created in Pascal in an easy way? (should work on Windows and Linux, best case would also allow Delphi compilation)
Thanks.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Create terminal user interfaces with Lazarus?
« Reply #1 on: February 24, 2021, 04:25:59 am »
If you mean building such applications as you would a GUI one, then AFAIK it can't be done with Lazarus. There are other TUI generators but all they do (very basically) is to allow you to design "screens" and then create the code to build them.

If, however, you mean frameworks like Icaza's in the first example, your best bet will probably be Free Vision, which is a multi-platform "clone" of Borland's Turbo Vision.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5462
  • Compiler Developer
Re: Create terminal user interfaces with Lazarus?
« Reply #2 on: February 24, 2021, 10:00:05 am »
Well, there is the DialEdit mentioned in this thread and also provided in this thread (hosted on GitHub). However this is not yet ported to Free Pascal and it's only a textmode application.

In theory it might be possible to use Lazarus' Designer Mediator as mentioned here to design Free Vision windows using a designer.

asdf1337

  • Jr. Member
  • **
  • Posts: 56
Re: Create terminal user interfaces with Lazarus?
« Reply #3 on: February 24, 2021, 09:28:41 pm »
There are other TUI generators but all they do (very basically) is to allow you to design "screens" and then create the code to build them.
Do you have some examples I could have a look at?


Well, there is the DialEdit mentioned in this thread and also provided in this thread (hosted on GitHub). However this is not yet ported to Free Pascal and it's only a textmode application.
Hmm tested it but it only uses old objects and records but not classes etc. And also don't know if it'll work in linux shells as well as windows cmd.exe :(

In theory it might be possible to use Lazarus' Designer Mediator as mentioned here to design Free Vision windows using a designer.
That would be a really nice feature to have.
Creating TUI based on ncurses for linux and the Windows console for MS Windows in the simple way Lazarus/Delphi provides :) :)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11444
  • FPC developer.
Re: Create terminal user interfaces with Lazarus?
« Reply #4 on: February 24, 2021, 09:52:53 pm »
There are other TUI generators but all they do (very basically) is to allow you to design "screens" and then create the code to build them.
Do you have some examples I could have a look at?

It comes with Free Pascal, and is called the textmode IDE, the binary name is fp(.exe). See if you have it installed

 

asdf1337

  • Jr. Member
  • **
  • Posts: 56
Re: Create terminal user interfaces with Lazarus?
« Reply #5 on: February 24, 2021, 10:16:59 pm »
There are other TUI generators but all they do (very basically) is to allow you to design "screens" and then create the code to build them.
Do you have some examples I could have a look at?

It comes with Free Pascal, and is called the textmode IDE, the binary name is fp(.exe). See if you have it installed

Yes, I've it but it's only a textmode IDE? Not a designer for a TUI?

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Create terminal user interfaces with Lazarus?
« Reply #6 on: February 24, 2021, 10:26:10 pm »
Do you have some examples I could have a look at?

No, sorry. I know they exists but it has been quite some time since I last tested one :-[

Maybe you can find something by googling for "Turbo Vision UI generator" or similar terms ...
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5462
  • Compiler Developer
Re: Create terminal user interfaces with Lazarus?
« Reply #7 on: February 25, 2021, 08:58:27 am »
Well, there is the DialEdit mentioned in this thread and also provided in this thread (hosted on GitHub). However this is not yet ported to Free Pascal and it's only a textmode application.
Hmm tested it but it only uses old objects and records but not classes etc. And also don't know if it'll work in linux shells as well as windows cmd.exe :(

Of course it's only records and objects, because it uses Turbo Vision or Free Vision which are object based. I'm not aware of any TUI Object Pascal framework based on classes, you'd have to start from the ground up.

Also the text mode IDE which is based on FV as well runs without (big) problems on *nix shells.

 

TinyPortal © 2005-2018