home *** CD-ROM | disk | FTP | other *** search
- /*-----------------------------------------------------------------------*/
- /* filename - tdemo1.hpp */
- /* */
- /* function(s) */
- /* declarations for the TDemoApp class which */
- /* demonstrates TVColorDialog */
- /* */
- /* author - Michael "Mick" Newton */
- /* */
- /*-----------------------------------------------------------------------*/
-
- /*-----------------------------------------------------------------------*/
- /* */
- /* TDEMO1.HPP */
- /* */
- /* TVColorDialog shareware version 2.0 */
- /* Copyright (C) 1992,1993 Comsoft Software */
- /* All Rights Reserved. */
- /* */
- /* */
- /*-----------------------------------------------------------------------*/
-
-
- #if !defined __TDEMO1_HPP
- #define __TDEMO1_HPP
-
-
- // Forward references to Turbo Vision classes *****************************
-
- class far TApplication;
- class far TColorGroup;
- class far TDeskTop;
- class far TEvent;
- class far TMenuBar;
- class far TPalette;
- class far TRect;
- class far TStatusLine;
-
-
-
-
-
- // Defines ****************************************************************
-
- // Desktop pattern characters
- // NOTE: These are the actual ASCII codes for the characters which will
- // be displayed as pattern character choices in TVColorDialog.
- // You can modify the first 16 values to display different pattern
- // character choices in the dialog. The last value however should
- // not be changed because this string is accessed in the demo as a
- // null terminated string.
- //
- #define patterns "\xB0\xB1\xB2\x20\xCE\xBE\xC5\xDB" \
- "\xD8\xD7\xDD\xD0\xDF\xFE\xC4\xB3" \
- "\x00" // <--- Do not modify
-
-
-
-
- // Data struct for options dialog *****************************************
-
- struct TOptionRec
- {
- ushort addHelp; // Include help checkbox
- ushort patternCount; // Pattern count radiobutton
- ushort videoMode; // Video mode radiobutton
- };
-
-
-
-
-
- // TDemoApp ***************************************************************
-
- class TDemoApp : public TApplication
- {
- public:
- TDemoApp();
- virtual void shutDown();
- static TStatusLine *initStatusLine(TRect r);
- static TMenuBar *initMenuBar(TRect r);
- static TDeskTop *initDeskTop(TRect r);
- virtual TPalette& getPalette() const;
- virtual void getEvent(TEvent& event);
- virtual void handleEvent(TEvent& event);
- protected:
- private:
- TOptionRec optrec; // Options data record
- ushort patternIndex; // Current desktop pattern char index
- void about(); // About dialog
- void writePalette(); // Writes app's palette to file
- TColorGroup &buildGroup1(); // Color group build function 1 of 5
- TColorGroup &buildGroup2(); // Color group build function 2 of 5
- TColorGroup &buildGroup3(); // Color group build function 3 of 5
- TColorGroup &buildGroup4(); // Color group build function 4 of 5
- TColorGroup &buildGroup5(); // Color group build function 5 of 5
- void colors(); // Executes the TVColorDialog
- void options(); // Executes the options dialog
- void setVideoMode(); // Sets program video mode
- void xdialog1(); // Executes a TXDialog1 dialog
- void xdialog2(); // Executes a TXDialog2 dialog
- void xdialog3(); // Executes a TXDialog3 dialog
- void helpDialog(); // Notifies user if help button pressed
- };
-
-
-
-
-
- // Non-member function declarations ***************************************
-
- void exitfunc(void);
-
-
- #endif
-
- // End of TDEMO1.HPP
-
-
-
-