home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,604 of 4,255   
   Alexei A. Frounze to James Harris   
   Re: TUI interface   
   14 Jul 21 17:37:32   
   
   From: alexfrunews@gmail.com   
      
   On Wednesday, July 14, 2021 at 6:56:34 AM UTC-7, James Harris wrote:   
   > Is there already a good standard way to interface with a textual   
   > display? What I'm looking for is a pre-defined set of calls which I can   
   > just implement rather than having to design from scratch.   
   ...   
   > * calls to manage widgets which go in those windows   
   > * options, for example what to do when a line of text would extend past   
   > the right-hand side of the available space (wrap or not), how to render   
   > a window's borders, what controls a window should have, how elements   
   > should be placed within windows, etc   
      
   If you can find an old book on Turbo Vision or are willing to go through   
   its code, you may find some answers there.   
   I think, it was designed pretty well. It was hard to appreciate initially   
   though, because I mostly saw lots of "stupid" OOP code and boilerplate   
   stuff that seemed unpleasant and unnecessary (in part, also because   
   I was working with the Pascal variant, which is wordier than C++).   
   [Speaking of the stupid OOP, I must say, it's natural for the UI.]   
   But once you understood more of it, you could see how you could   
   write stuff that would fit in neatly and benefit from the framework.   
   Specifically, I'd advise to look at the kind of messages sent between   
   those widgets and how they were handled.   
   Objects drawing themselves into various rectangle buffers (visible or   
   not) is probably more straightforward, even if requires lots of code   
   and a few tedious pieces here and there with off by one bugs.   
      
   Alex   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca