File: vtcanvas.cpp

package info (click to toggle)
v1 1.17-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,812 kB
  • ctags: 6,780
  • sloc: cpp: 43,604; ansic: 5,003; makefile: 955; sh: 30
file content (104 lines) | stat: -rw-r--r-- 3,322 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//=======================================================================
//@V@:Note: This file generated by vgen V1.00 (14:06:08 08 Aug 1996).
//	vtcnv.cpp:	Source for testTextCanvasPane class
//=======================================================================

#include <v/vutil.h>
#include "vtcanvas.h"
#include "vtcmdwin.h"

//=================>>> testTextCanvasPane::testTextCanvasPane <<<================
  testTextCanvasPane::testTextCanvasPane(testCmdWindow* cw)
  {
    _myCmdw = cw;
  }

//=================>>> testTextCanvasPane::~testTextCanvasPane <<<================
  testTextCanvasPane::~testTextCanvasPane()
  {
  }

//=====================>>> testTextCanvasPane::HPage <<<========================
  void testTextCanvasPane::HPage(int shown, int top)
  {
    vTextCanvasPane::HPage(shown, top);
    _myCmdw->SetShownTop(shown,top);
  }

//=====================>>> testTextCanvasPane::VPage <<<========================
  void testTextCanvasPane::VPage(int shown, int top)
  {
    vTextCanvasPane::VPage(shown, top);
    _myCmdw->SetShownTop(shown,top);
  }

//====================>>> testTextCanvasPane::HScroll <<<======================
  void testTextCanvasPane::HScroll(int step)
  {
    int shown,top;
    (void) GetHScroll(shown,top);
    if (step > 0 && top < 100)
	SetHScroll(shown,++top);
    else if (step < 0 && top > 0)
	SetHScroll(shown,--top);
    _myCmdw->SetShownTop(shown,top);
  }

//====================>>> testTextCanvasPane::VScroll <<<======================
  void testTextCanvasPane::VScroll(int step)
  {
    int shown,top;
    (void) GetVScroll(shown,top);
    if (step > 0 && top < 100)
	SetVScroll(shown,++top);
    else if (step < 0 && top > 0)
	SetVScroll(shown,--top);
    _myCmdw->SetShownTop(shown,top);
  }

//===================>>> testTextCanvasPane::FontChanged <<<==================
  void testTextCanvasPane::FontChanged(vFont& newFont)
  {
    vTextCanvasPane::FontChanged(newFont);
  }

//===================>>> testTextCanvasPane::TextMouseDown <<<==================
  void testTextCanvasPane::TextMouseDown(int row, int col, int button)
  {
    vTextCanvasPane::TextMouseDown(row,col,button);
  }

//======================>>> testTextCanvasPane::TextMouseUp <<<==================
  void testTextCanvasPane::TextMouseUp(int row, int col, int button)
  {
    vTextCanvasPane::TextMouseUp(row,col,button);
  }

//======================>>> testTextCanvasPane::TextMouseMove <<<=================
  void testTextCanvasPane::TextMouseMove(int row, int col, int button)
  {
    vTextCanvasPane::TextMouseMove(row,col,button);
  }

//=========================>>> testTextCanvasPane::Redraw <<<======================
  void testTextCanvasPane::Redraw(int x, int y, int w, int h)
  {
    vTextCanvasPane::Redraw(x,y,w,h);
  }

//======================>>> testTextCanvasPane::ResizeText <<<======================
  void testTextCanvasPane::ResizeText(const int rows, const int cols)
  {
    static int first = 1;
    if (first)
      {
	first = 0;
	vColor test;
	int bits = test.BitsOfColor();
	char bitstr[10];
	IntToStr(bits,bitstr);
	DrawText("Display Bits of Color: "); DrawText(bitstr);
	DrawText("\n\n");
      }
    vTextCanvasPane::ResizeText(rows,cols);
  }