03-12-2026 09:36 AM
With the future of LabWindows unconfirmed, I have been working on rearchitecting a large project I maintain. My main goal was to isolate all the program logic from the user interface. Once I had a proof-of-concept of that, I was able to build the core logic on macOS as a terminal program (or on a PC using a non-LabWindows compiler).
On a whim, I decided to build a text-based user interface (along with a LabWindows one when building under LabWindows). I ended up using the ncurses library which handles text windows with overlays (and background windows still being able to update under them). I let an A.I. do all this work since it was just proof-of-concept stuff.
I slowly had it implement LabWindows-like API calls, such as NewPanel, DispayPanel, NewCtrl, SetCtrlAttribute, SetCtrlVal (though I used a different naming convention). I just did enough for what my user interface needed, and have to adjust the top/left/width/height to be character positions for the text interface versus pixel positions for the GUI.
My ultimately goal would be to build the LabWindows panels programmatically, and restrict them to basic stuff that I can replicate in the text interface with only minor adjustments. So far, it is working quite well.
And now I ask ... has anyone else worked on making a LabWindows-like API to build GUI code outside of LabWindows? It seems something like that is needed now more than ever, and many of the "simple" features would probably be easy to replicate.
03-12-2026 11:07 AM - edited 03-12-2026 11:08 AM
I remember I wrote a converter for CVI to Web interface... 3 decades ago. It could do a simplified version of most controls IIRC. I think the code is still publicly available. I used it in one project back then.
03-12-2026 01:15 PM
@gdargaud wrote:
I remember I wrote a converter for CVI to Web interface... 3 decades ago. It could do a simplified version of most controls IIRC. I think the code is still publicly available. I used it in one project back then.
Any page that starts with a Douglas Adams quote gets my attention. Back in the late 1990s, my hobby-business was named after a Hitchhiker's Guide reference, as were some of our products.
I took a look at the tutorial page. This looks interesting, as moving to a web interface is our ultimate goal, though by then we'd be running all our code on an embedded board with some kind of TCP/IP interface rather than using a Windows PC.
I will be taking a look at this. Thank you for sharing.
03-12-2026 01:19 PM
@gdargaud wrote:
I remember I wrote a converter for CVI to Web interface... 3 decades ago. It could do a simplified version of most controls IIRC. I think the code is still publicly available. I used it in one project back then.
Did some search/replace change this, or do you use some kind of #define for "&&" to work as "and"?
Active = Mode!=VAL_INDICATOR and Visible and !Dimmed;
03-13-2026 03:52 AM - edited 03-13-2026 03:53 AM
It's been standard C since the introduction of #include <iso646.h> in the 90s. I always found it more readable this way.
This code is *old* so it will probably require some tweaks. I don't know if the cgi library still exist.