home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 10.ddi / TVSRC.ZIP / TVTEXT1.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  4.1 KB  |  119 lines

  1. /*------------------------------------------------------------*/
  2. /* filename -       tvtext1.cpp                               */
  3. /*                                                            */
  4. /*------------------------------------------------------------*/
  5.  
  6. /*------------------------------------------------------------*/
  7. /*                                                            */
  8. /*    Turbo Vision -  Version 1.0                             */
  9. /*                                                            */
  10. /*                                                            */
  11. /*    Copyright (c) 1991 by Borland International             */
  12. /*    All Rights Reserved.                                    */
  13. /*                                                            */
  14. /*------------------------------------------------------------*/
  15.  
  16. #define Uses_TScreen
  17. #define Uses_TRadioButtons
  18. #define Uses_TMenuBox
  19. #define Uses_TFrame
  20. #define Uses_TIndicator
  21. #define Uses_THistory
  22. #define Uses_TColorSelector
  23. #define Uses_TMonoSelector
  24. #define Uses_TColorDialog
  25. #define Uses_TInputLine
  26. #define Uses_TStatusLine
  27. #define Uses_TCheckBoxes
  28. #define Uses_TScrollBar
  29. #define Uses_TButton
  30. #define Uses_TDirListBox
  31. #define Uses_TFileEditor
  32. #include <tv.h>
  33.  
  34. #include <dos.h>
  35.  
  36. static unsigned getCodePage()
  37. {
  38.     //  get version number, in the form of a normal number
  39.     unsigned ver = (_version >> 8) | (_version << 8);
  40.     if( ver < 0x30C )
  41.         return 437; // United States code page, for all versions before 3.3
  42.  
  43.     _AX = 0x6601;   // get code page
  44.     geninterrupt( 0x21 );
  45.     return _BX;
  46. }
  47.  
  48. void TDisplay::updateIntlChars()
  49. {
  50.     if(getCodePage() != 437 )
  51.         TFrame::frameChars[30] = '═';
  52. }
  53.  
  54. extern const uchar specialChars[] =
  55. {
  56.     175, 174, 26, 27, ' ', ' '
  57. };
  58.  
  59. const char * near TRadioButtons::button = " ( ) ";
  60.  
  61. const char * near TMenuBox::frameChars = " \332\304\277  \300\304\331  \263 \263  \303\304\264 ";
  62.  
  63. const char near TFrame::initFrame[19] =
  64.   "\x06\x0A\x0C\x05\x00\x05\x03\x0A\x09\x16\x1A\x1C\x15\x00\x15\x13\x1A\x19";
  65.  
  66. char near TFrame::frameChars[33] = 
  67.     "   └ │┌├ ┘─┴┐┤┬┼   ╚ ║╔╟ ╝═╧╗╢╤ "; // for UnitedStates code page
  68.  
  69. const char * near TFrame::closeIcon = "[~\xFE~]";
  70. const char * near TFrame::zoomIcon = "[~\x18~]";
  71. const char * near TFrame::unZoomIcon = "[~\x12~]";
  72. const char * near TFrame::dragIcon = "~─┘~";
  73.  
  74. const char near TIndicator::dragFrame = '\xCD';
  75. const char near TIndicator::normalFrame = '\xC4';
  76.  
  77. const char * near THistory::icon = "\xDE~\x19~\xDD";
  78.  
  79. const char near TColorSelector::icon = '\xDB';
  80.  
  81. const char * near TMonoSelector::button = " ( ) ";
  82. const char * near TMonoSelector::normal = "Normal";
  83. const char * near TMonoSelector::highlight = "Highlight";
  84. const char * near TMonoSelector::underline = "Underline";
  85. const char * near TMonoSelector::inverse = "Inverse";
  86.  
  87. const char * near TColorDialog::colors = "Colors";
  88. const char * near TColorDialog::groupText = "~G~roup";
  89. const char * near TColorDialog::itemText = "~I~tem";
  90. const char * near TColorDialog::forText = "~F~oreground";
  91. const char * near TColorDialog::bakText = "~B~ackground";
  92. const char * near TColorDialog::textText = "Text ";
  93. const char * near TColorDialog::colorText = "Color";
  94. const char * near TColorDialog::okText = "O~K~";
  95. const char * near TColorDialog::cancelText = "Cancel";
  96.  
  97. const char near TInputLine::rightArrow = '\x10';
  98. const char near TInputLine::leftArrow = '\x11';
  99.  
  100. const char * near TStatusLine::hintSeparator = "\xB3 ";
  101.  
  102. const char * near TCheckBoxes::button = " [ ] ";
  103.  
  104. TScrollChars near TScrollBar::vChars = {30, 31, 177, 254, 178};
  105. TScrollChars near TScrollBar::hChars = {17, 16, 177, 254, 178};
  106.  
  107. const char * near TButton::shadows = "\xDC\xDB\xDF";
  108. const char * near TButton::markers = "[]";
  109.  
  110. const char * near TDirListBox::pathDir   = "└─┬";
  111. const char * near TDirListBox::firstDir  =   "└┬─";
  112. const char * near TDirListBox::middleDir =   " ├─";
  113. const char * near TDirListBox::lastDir   =   " └─";
  114. const char * near TDirListBox::drives = "Drives";
  115. const char * near TDirListBox::graphics = "└├─";
  116.  
  117. const char * near TFileEditor::backupExt = ".BAK";
  118.  
  119.