On Thu, 5 Jun 1997, Frank Heckenbach wrote:
Put the mode-dependent fields (those that change in all the view objects between text and graphic mode) into a separate object. There could be an (abstract) superclass, and special subclasses for text resp. graphics mode. The actual objects would contain a pointer of the abstract spureclass type, and the constructors would create text or graphics mode objects as desired.
My own UI library (that is to come a bit later than the base class library) does it this way: I have a TVideo abstract object that I descend into more specific objects. For example, theres a text mode object, a VGA mode 13h object (oh gawd! does this look ugly!), S3 specific VGA object (the card I use is a S3) and a VESA object that can do many modes...
Pierre Phaneuf
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense." - Edsger W. Dijkstra.