enum syntax_highlight_colors { HIGHLIGHT_COLOR_COMMAND1, HIGHLIGHT_COLOR_COMMAND2, HIGHLIGHT_COLOR_TEXT, HIGHLIGHT_COLOR_ERROR, HIGHLIGHT_COLOR_COUNT }; enum KryTextEditorSyntaxHighlightMode { SYNTAX_HIGHLIGHT_NONE, SYNTAX_HIGHLIGHT_SYNTAX, SYNTAX_HIGHLIGHT_CODE }; struct KryRange { int start; int end; }; struct KryTextEditor { GtkHBox *hbox_text_editor; GtkVBox *vbox_syntax_highlight_controls; GtkTextView *view; GtkRadioButton *button_syntax_highlight_none; GtkRadioButton *button_syntax_highlight_syntax; GtkRadioButton *button_syntax_highlight_code; int highlight_color_changed_signal_id[4]; enum KryTextEditorSyntaxHighlightMode syntax_highlight_mode; struct KryRange *spell_word_clicked; struct pavl_table *table_incorrect_words; GList *recheck_ranges; gboolean disable_spellcheck; gboolean spell_disable_right_click; GtkTextTag *tag_spelling_error; GtkTextTag *tag_command_error; GtkTextTag *tag_command1; GtkTextTag *tag_command2; GtkTextTag *tag_text; GtkTextTag *tag_gear; }; struct KryTextEditor *gui_text_editor_new(); void gui_text_editor_free(struct KryTextEditor *editor); GtkWidget *gui_text_editor_get_widget(struct KryTextEditor *editor); GtkWidget *gui_text_editor_get_syntax_highlight_controls(struct KryTextEditor *editor); GtkTextView *gui_text_editor_get_view(struct KryTextEditor *editor); GtkTextBuffer *gui_text_editor_get_buffer(struct KryTextEditor *editor); enum KryTextEditorSyntaxHighlightMode gui_text_editor_get_syntax_highlight_mode(KryTextEditor *editor); char *gui_text_editor_get_text(struct KryTextEditor *editor, int *insert_curso = NULL, int *selection_cursor = NULL); char *gui_text_editor_replace_placeholders(char *text, krySSACommandHighlighterHiddenPartList *parts_obj, int *insert_cursor = NULL, int *selection_cursor = NULL); void gui_text_editor_set_text(struct KryTextEditor *editor, char *text); void gui_text_editor_do_syntax_highlighting(struct KryTextEditor *editor, gboolean user_action); void gui_text_editor_set_syntax_highlight_mode(struct KryTextEditor *editor, enum KryTextEditorSyntaxHighlightMode mode); void gui_text_editor_spell_disable_right_click(struct KryTextEditor *editor); void gui_text_editor_disable_spellcheck(struct KryTextEditor *editor); void gui_text_editor_set_text_from_highlighter(struct KryTextEditor *editor, krySSACommandHighlighter & highlighter);