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)
provides a raw color object
Definition: colors.h:37
Provides a nice source editor wrapping Mike Hammerson GtkSourceView. Editor provides:
Definition: vdkeditor.h:52
void Clear()
Definition: vdkeditor.cc:502
GtkSourceBuffer * Buffer(void)
Definition: vdkeditor.h:123
bool SaveToFile(const char *filename)
Definition: vdkeditor.cc:525
void RemoveLineMarks(int line)
Definition: vdkeditor.cc:902
VDKReadWriteValueProp< VDKEditor, int > Column
Definition: vdkeditor.h:152
static TokenList * LoadTokens(const char *filename)
Definition: vdkeditor.cc:1377
bool AddMarkIcon(VDKPixbuf *image, const char *icon_key, bool overwrite=true)
Definition: vdkeditor.cc:874
virtual void SetBackground(VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
Definition: vdkeditor.cc:114
void SelectText(int start, int end)
Definition: vdkeditor.cc:1314
int GetLineAtOffset(int offset)
Definition: vdkeditor.cc:601
void ForwardDelete(int nchars)
Definition: vdkeditor.cc:567
virtual void SetFont(VDKFont *font)
Definition: vdkeditor.cc:107
TokenList * SetTokens(TokenList *tkl=NULL)
Definition: vdkeditor.h:105
VDKReadWriteValueProp< VDKEditor, int > Line
Definition: vdkeditor.h:156
void InstallSyntaxTable(VDKColor *key_color, VDKFont *key_font, VDKColor *gtk_color, VDKFont *gtk_font, VDKColor *macro_color, VDKFont *macro_font, VDKColor *pp_color, VDKFont *pp_font, VDKColor *const_color, VDKFont *const_font, VDKColor *comment_color, VDKFont *comment_font)
Definition: vdkeditor.cc:190
void ClearSyntaxTable()
Definition: vdkeditor.cc:161
void ScrollToLine(int line, int col, int margin=0)
Definition: vdkeditor.cc:1363
VDKEditor(VDKForm *owner, GtkSourceBuffer *buff=NULL)
Definition: vdkeditor.cc:37
VDKReadOnlyValueProp< VDKEditor, int > LastVisibleLine
Definition: vdkeditor.h:188
void ScrollToPos(int pointer=-1, int margin=0)
Definition: vdkeditor.cc:1349
virtual void SetForeground(VDKRgb rgb, GtkStateType state=GTK_STATE_NORMAL)
Definition: vdkeditor.cc:129
void Eol()
Definition: vdkeditor.h:222
gchar * GetChars(int start=0, int end=-1)
Definition: vdkeditor.cc:511
void AddLineMark(int line, const char *icon_key)
Definition: vdkeditor.cc:886
bool IsLineVisible(int line)
Definition: vdkeditor.h:242
VDKReadWriteValueProp< VDKEditor, int > Pointer
Definition: vdkeditor.h:148
void RemoveLineMark(int line, const char *icon_key)
Definition: vdkeditor.cc:894
void Scroll(int pointer=-1, int margin=0)
Definition: vdkeditor.cc:476
void BackwardDelete(int nchars)
Definition: vdkeditor.cc:587
bool LoadFromFile(const char *filename)
Definition: vdkeditor.cc:137
char * GetWord(int pos=-1)
Definition: vdkeditor.cc:632
virtual ~VDKEditor()
Definition: vdkeditor.cc:99
VDKReadWriteValueProp< VDKEditor, bool > Changed
Definition: vdkeditor.h:192
void UnselectText()
Definition: vdkeditor.cc:1330
VDKReadOnlyValueProp< VDKEditor, int > FirstVisibleLine
Definition: vdkeditor.h:184
void TextInsert(const char *txt, int nchar=-1)
Definition: vdkeditor.cc:559
void RemoveAllLineMarks()
Definition: vdkeditor.cc:909
Provides a raw font.
Definition: vdkfont.h:38
Provides a gtklabel wrapper.
Definition: label.h:41
GtkWidget * widget
Definition: vdkobj.h:241
Provides a raw image wrapping GdkPixbuf This class should in time substitute VDKRawPixmap that from n...
Definition: rawpixbuf.h:41
Provides a simple RGB color structure.
Definition: vdkutils.h:38
provides a VDKValueList iterator
Definition: value_sem_list.h:180