33 #include <vdk/gtksourceview.h>
34 #include <vdk/rawpixbuf.h>
35 #define INSERT_MARK "insert"
55 virtual void LocalConnect();
56 static int TabHandler (GtkWidget *
widget,
59 static void HandleRealize(GtkWidget*, gpointer);
62 GtkSourceBuffer* buffer;
64 bool MakeCompletion(
const char* word);
66 void ShowTipWindow(
char* word);
68 int ShowParenMatch(
int start,
char keyval,
70 bool insert,
int restore);
71 static int OnKeyRelease (GtkWidget *widget,
74 static void OnBufferChanged(GtkWidget* buf, gpointer gp);
113 GtkStateType state = GTK_STATE_NORMAL);
116 GtkStateType state = GTK_STATE_NORMAL);
123 GtkSourceBuffer*
Buffer(
void) {
return buffer; }
128 void Scroll (
int pointer = -1,
int margin = 0);
132 void Scroll(
int line,
int col,
int margin = 0);
142 VDKReadWriteValueProp<VDKEditor,bool> Syntax;
152 VDKReadWriteValueProp<VDKEditor,int>
Column;
156 VDKReadWriteValueProp<VDKEditor,int>
Line;
160 VDKReadOnlyValueProp<VDKEditor,unsigned int> Length;
164 VDKReadWriteValueProp<VDKEditor,bool> Editable;
168 VDKReadWriteValueProp<VDKEditor,int> TabStop;
172 VDKReadWriteValueProp<VDKEditor,unsigned int> MaxUndo;
176 VDKReadWriteValueProp<VDKEditor,bool> LineAutoSelect;
180 VDKReadWriteValueProp<VDKEditor,bool> ShowLineNumbers;
192 VDKReadWriteValueProp<VDKEditor,bool>
Changed;
212 gchar*
GetChars(
int start = 0,
int end = -1);
228 void TextInsert(
const char* txt,
int nchar = -1);
290 void ScrollToPos (
int pointer = -1,
int margin = 0);
334 void SetSyntax(
bool f);
335 void SetPointer(
int p);
339 void SetTabStop(
int r);
341 void SetColumn(
int r);
343 unsigned int GetLength();
345 void SetEditable(
bool f);
346 void SetShowLineNumbers(
bool f);
347 bool GetShowLineNumbers(
void);
348 int GetFirstVisibleLine();
349 int GetLastVisibleLine();
351 void SetChanged(
bool f);
352 void SetMaxUndo(
int );
362 Tipwin(
VDKForm* owner,
char* tip):
363 VDKForm(owner,NULL,v_box,GTK_WINDOW_POPUP),tip(tip)