home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / test / vtcanvas.cpp < prev    next >
C/C++ Source or Header  |  1998-11-30  |  3KB  |  110 lines

  1. //=======================================================================
  2. //@V@:Note: This file generated by vgen V1.00 (14:06:08 08 Aug 1996).
  3. //    vtcnv.cpp:    Source for testTextCanvasPane class
  4. //=======================================================================
  5.  
  6. #include <v/vutil.h>
  7. #include "vtcanvas.h"
  8. #include "vtcmdwin.h"
  9.  
  10. //=================>>> testTextCanvasPane::testTextCanvasPane <<<================
  11.   testTextCanvasPane::testTextCanvasPane(testCmdWindow* cw)
  12.   {
  13.     _myCmdw = cw;
  14.   }
  15.  
  16. //=================>>> testTextCanvasPane::~testTextCanvasPane <<<================
  17.   testTextCanvasPane::~testTextCanvasPane()
  18.   {
  19.   }
  20.  
  21. //=====================>>> testTextCanvasPane::HPage <<<========================
  22.   void testTextCanvasPane::HPage(int shown, int top)
  23.   {
  24.     vTextCanvasPane::HPage(shown, top);
  25.     _myCmdw->SetShownTop(shown,top);
  26.   }
  27.  
  28. //=====================>>> testTextCanvasPane::VPage <<<========================
  29.   void testTextCanvasPane::VPage(int shown, int top)
  30.   {
  31.     vTextCanvasPane::VPage(shown, top);
  32.     _myCmdw->SetShownTop(shown,top);
  33.   }
  34.  
  35. //====================>>> testTextCanvasPane::HScroll <<<======================
  36.   void testTextCanvasPane::HScroll(int step)
  37.   {
  38.     int shown,top;
  39.     (void) GetHScroll(shown,top);
  40.     if (step > 0 && top < 100)
  41.     SetHScroll(shown,++top);
  42.     else if (step < 0 && top > 0)
  43.     SetHScroll(shown,--top);
  44.     _myCmdw->SetShownTop(shown,top);
  45.   }
  46.  
  47. //====================>>> testTextCanvasPane::VScroll <<<======================
  48.   void testTextCanvasPane::VScroll(int step)
  49.   {
  50.     int shown,top;
  51.     (void) GetVScroll(shown,top);
  52.     if (step > 0 && top < 100)
  53.     SetVScroll(shown,++top);
  54.     else if (step < 0 && top > 0)
  55.     SetVScroll(shown,--top);
  56.     _myCmdw->SetShownTop(shown,top);
  57.   }
  58.  
  59. //===================>>> testTextCanvasPane::FontChanged <<<==================
  60.   void testTextCanvasPane::FontChanged(VCONST vFont& newFont)
  61.   {
  62.     vTextCanvasPane::FontChanged(newFont);
  63.   }
  64.  
  65. //===================>>> testTextCanvasPane::TextMouseDown <<<==================
  66.   void testTextCanvasPane::TextMouseDown(int row, int col, int button)
  67.   {
  68.     vTextCanvasPane::TextMouseDown(row,col,button);
  69.   }
  70.  
  71. //======================>>> testTextCanvasPane::TextMouseUp <<<==================
  72.   void testTextCanvasPane::TextMouseUp(int row, int col, int button)
  73.   {
  74.     vTextCanvasPane::TextMouseUp(row,col,button);
  75.   }
  76.  
  77. //======================>>> testTextCanvasPane::TextMouseMove <<<=================
  78.   void testTextCanvasPane::TextMouseMove(int row, int col, int button)
  79.   {
  80.     vTextCanvasPane::TextMouseMove(row,col,button);
  81.   }
  82.  
  83. //=========================>>> testTextCanvasPane::Redraw <<<======================
  84.   void testTextCanvasPane::Redraw(int x, int y, int w, int h)
  85.   {
  86.     vTextCanvasPane::Redraw(x,y,w,h);
  87.   }
  88.  
  89. //======================>>> testTextCanvasPane::ResizeText <<<======================
  90.   void testTextCanvasPane::ResizeText(const int rows, const int cols)
  91.   {
  92.     static int first = 1;
  93.     if (first)
  94.       {
  95.     first = 0;
  96.     vColor test;
  97.     int bits = test.BitsOfColor();
  98.     char bitstr[10];
  99.     IntToStr(bits,bitstr);
  100.     DrawText("Display Bits of Color: "); DrawText(bitstr);
  101.         DrawText(" -  Text Canvas Size: ");
  102.         IntToStr(rows,bitstr) ; DrawText(bitstr); DrawText(",");
  103.         IntToStr(cols,bitstr) ; DrawText(bitstr);
  104.     DrawText("\n\n");
  105.       }
  106. //    else
  107. //    DrawText("Resize Event\n");
  108.     vTextCanvasPane::ResizeText(rows,cols);
  109.   }
  110.