DCSB Libs Progress
Published by KermMartian 13 years, 9 months ago (2010-06-27T15:12:37+00:00) | Discuss this article

Since before Doors CS 6.0 was released in 2007, I have thrown around the idea of including Doors CS-specific BASIC libraries in the shell. In the past I have always ended up rejecting the idea, either because of a lack of space in the app, or more often, because I was concerned about breaking the compability for which I had always striven by making the DCS BASIC header compatible with every other parser. With the addition of a third page to Doors CS, as well as the inclusion of libraries to support XLib, Celtc III, PicArc, and Omnicalc, I have decided that offering additional functionality to BASIC programmers who want it is more important than ensuring wide compatibility of Doors CS program.

Of course, programmers are encouraged to make programs that work with or with the Doors CS libraries; just as real(0) and Det([[1]]) can be used to detect if XLib or Celtic III is installed, Doors CS has a token detection sequence. If no library is installed, det([[42]]) will return 42. If Celtic III is installed, it will return 0. If Doors CS is installed and providing both Celtic III and Doors CS libraries, it will return the value 1337. So far, thirteen main Doors CS libraries have been designed (but please feel free to suggest changes and additions!); all can be accessed using the sum() token. Just as with Celtic's use of the det() token, sum() will continue to function normally if used with a list as the first argument. If the first argument is instead an integer, Doors CS will intercept it, and perform one of the following planned functions:

:: sum(0) - Determine the length of a string of tokens in variable-width font
:: sum(1) - Scan in specified direction along the graphscreen from a starting point until a differently-valued pixel is encountered
:: sum(2) - Copy the homescreen to the graph buffer
:: sum(3) - List all present Pic 1-255 variables, including their archive status
:: sum(4) - Archive or unarchive a Pic 1-255 variable
:: sum(5) - Return version of installed DCSB Lib
:: sum(6) - Simple GUI mouse, taking starting coords and returning ending coords
:: sum(7) - Push item onto GUI stack. 25 subfunctions.
:: sum(8) - Pop item(s) off GUI stack
:: sum(9) - Open GUI stack.
:: sum(10) - Close GUI stack.
:: sum(11) - Render GUI without invoking mouse.
:: sum(12) - Render GUI and invoke mouse.
:: sum(13) - More graphical scrolling Menu() alternative.

All the libraries except sum(7), sum(12), and sum(13) have been implemented. Continue reading at the discuss link for details on these libraries.

The images below demonstrate some of the already-implemented features


Permalink

Advertisement