QB64 Phoenix Edition
The TUI (Text User Interface) program - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10)
+---- Thread: The TUI (Text User Interface) program (/showthread.php?tid=913)



The TUI (Text User Interface) program - BDS107 - 09-23-2022

Somewhere on (I think) a forum I found the QB64 program TUI.
I really don't remember where I found it, but I still wanted to take a look at TUI.
Is there a "manual" for this Text User Interface somewhere?
Some lines of this code:

Code: (Select All)
tui "set highintensity=true"
statusbar = tui("add type=label;name=statusbar;caption= Ready.;x=1;y=25;w=80;h=1;fg=0;bg=3")

tui "set defaults;fg=0;bg=7;fghover=7;bghover=0;fghotkey=15"

filemenu = tui("add type=menubar;parent=0;name=filemenu;caption=&File")
tui "set defaults;parent=filemenu"
filemenunew = tui("add type=menuitem;name=filemenunew;caption=&New  Ctrl+N")
tui "add type=menuitem;caption=-"
filemenuexit = tui("add type=menuitem;name=filemenuexit;caption=E&xit")



RE: The TUI (Text User Interface) program - RhoSigma - 09-23-2022

(09-23-2022, 06:28 PM)BDS107 Wrote: Somewhere on (I think) a forum I found the QB64 program TUI.
I really don't remember where I found it, but I still wanted to take a look at TUI.
Is there a "manual" for this Text User Interface somewhere?
Some lines of this code:

Code: (Select All)
tui "set highintensity=true"
statusbar = tui("add type=label;name=statusbar;caption= Ready.;x=1;y=25;w=80;h=1;fg=0;bg=3")

tui "set defaults;fg=0;bg=7;fghover=7;bghover=0;fghotkey=15"

filemenu = tui("add type=menubar;parent=0;name=filemenu;caption=&File")
tui "set defaults;parent=filemenu"
filemenunew = tui("add type=menuitem;name=filemenunew;caption=&New  Ctrl+N")
tui "add type=menuitem;caption=-"
filemenuexit = tui("add type=menuitem;name=filemenuexit;caption=E&xit")

you probably got it from Fellippes GitHub here https://github.com/FellippeHeitor/tui, I followed his development back the days and I'm pretty sure it's in an unfinished experimental state and probably will remain in this state as Fellippe dropped all development in the beginning of this year. The only documentation are the few comments inside the source file. However, also on Fellippes GitHub you'll find his InForm repository, a GUI designing tool with a comprehensive GitHub based Wiki, but that project is also abandoned. In alternative you can also try my GuiTools Framework (see my signature) or @bplus its VS (Very Simple GUI) here: https://staging.qb64phoenix.com/showthread.php?tid=689


RE: The TUI (Text User Interface) program - BDS107 - 09-24-2022

Oh yes, it was this one. Too bad there isn't more info.
The proposal you submitted seems very nice, but I was looking for something for SCREEN 0.
If I'm not mistaken, there was a TUI in MS-Basic QBX 7.1 at the time. Was it already converted to QB64?


RE: The TUI (Text User Interface) program - Pete - 09-24-2022

What are you trying to make. Menus? Popup windows?

Pete


RE: The TUI (Text User Interface) program - BDS107 - 09-24-2022

I was looking at a TUI to make programming a little easier.
I saw an example on the FarManager (a Norton Commander clone). See also https://www.farmanager.com/screenshots.php?l=en
I was wondering if there was such a thing in QB64.


RE: The TUI (Text User Interface) program - RhoSigma - 09-24-2022

(09-24-2022, 10:09 AM)BDS107 Wrote: I was looking at a TUI to make programming a little easier.
I saw an example on the FarManager (a Norton Commander clone). See also https://www.farmanager.com/screenshots.php?l=en
I was wondering if there was such a thing in QB64.

I think to remember that Matt (aka @DSMan195276) made some kind of GUI library a couple years back, but also not sure if it's in usable state and made for SCREEN 0. Maybe he can tell you more about.


RE: The TUI (Text User Interface) program - DSMan195276 - 09-24-2022

Wow, I cannot believe you actually remember that. You can see most of it here, I would note that "a couple years back" was a decade ago  Big Grin

As you can probably tell the TUI code started as just a smaller part of my FTP client, It's been so long that I really don't remember it all that well. I'm pretty sure the important part was the TYPE box_type which was the type underpinning all the GUI elements, which is pretty similar to other GUIs out there for QB64. A more interesting detail was making use of _MEM to allow me to keep some arrays and variable-length strings in the TYPE itself, which makes it a bit more generic. I have a picture below for fun:

[Image: image.png]

I had started on an attempt to separate the GUI logic into its own library but it never got very far. There's some interesting ideas in there but most of the GUI logic is too intermingled with the rest of the FTP stuff. if someone wanted they might be able to take it as a starting point, but honestly could be easier to just start fresh with a better design.