-
Notifications
You must be signed in to change notification settings - Fork 0
/
C_GTK_TextView.hpp
65 lines (45 loc) · 1.42 KB
/
C_GTK_TextView.hpp
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
//////////////////////////////////////////////////////////////////////////////////
// [ GTK_TextView_Class_Header ]
//////////////////////////////////////////////////////////////////////////////////
//
// TEXTVIEW
//
// [::Last modi: 24.11.16 L.ey (µ~)::]
//
//
#ifndef _C_GTK_TEXTVIEW_H_
#define _C_GTK_TEXTVIEW_H_
#include <string>
using namespace std;
#include <gtk/gtk.h>
//////////////////////////////////////////////////////////////////////////////////
// CONSTANT
//////////////////////////////////////////////////////////////////////////////////
const int C_GTK_TEXTVIEW_ERROR = 0x00;
const int C_GTK_TEXTVIEW_READY = 0x01;
//////////////////////////////////////////////////////////////////////////////////
// STRUCT
//////////////////////////////////////////////////////////////////////////////////
class C_GTK_TextView {
public:
C_GTK_TextView();
~C_GTK_TextView();
GtkWidget* create();
GtkWidget* getTextView();
GtkTextBuffer* getTextBuffer();
int setTextBuffer(GtkTextBuffer* pTextBuffer);
int getText(string* pOut);
int setText(string* pIn);
int clear();
int setSize(int x, int y);
int setBackground(const GdkRGBA *color);
int setColor(const GdkRGBA *color);
int setFont(const char* pFont);
int hide();
int show();
private:
GtkWidget* ptextview;
GtkTextBuffer* ptextbuffer;
int status;
};
#endif // _C_GTK_TEXTVIEW_H_