-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodeTextEditor.cpp
59 lines (43 loc) · 1.07 KB
/
codeTextEditor.cpp
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
#include "codeTextEditor.h"
codeTextEditor::codeTextEditor()
{
}//fonksiyon sonu
codeTextEditor::~codeTextEditor()
{
}//fonksiyon sonu
void codeTextEditor::draw(float Mx, float My)
{
fbo.begin();
documentList[activeDocument].draw(Mx, My, alan->runActive);
fbo.end();
fbo.draw(alan->x * Mx, alan->y * My, alan->witdh * Mx, alan->height * My);
}//fonksiyon sonu
void codeTextEditor::clikc(int x, int y, int button)
{
konum = (y - alan->y) / lineSize;
int t = (y - alan->y) / lineSize;
documentList[activeDocument].clikc(x,y,button,konum);
}//fonksiyon sonu
void codeTextEditor::keypressed(int key)
{
documentList[activeDocument].keypressed(key);
}//fonksiyon sonu
void codeTextEditor::setup()
{
/*
activeLine = 0;
lineSize = 16;
addlines();
*/
activeDocument = 0;
lineSize = 16;
fontSize = 12;
codeDocument add = codeDocument();
add.setup(lineSize,fontSize);
codeDocument add2 = codeDocument();
add2.setup(lineSize, fontSize);
//draw için ilk ekleme
documentList.push_back(add);
//setup için ilk ekleme
documentList.push_back(add2);
}//fonksiyon sonu