~ubuntu-branches/ubuntu/natty/geany/natty

« back to all changes in this revision

Viewing changes to src/editor.h

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2010-08-07 03:23:12 UTC
  • mfrom: (1.4.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20100807032312-ot70ac9d50cn79we
Tags: upstream-0.19
ImportĀ upstreamĀ versionĀ 0.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *      along with this program; if not, write to the Free Software
19
19
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
20
 *
21
 
 * $Id: editor.h 4630 2010-01-31 21:54:47Z eht16 $
 
21
 * $Id: editor.h 4894 2010-05-09 15:48:55Z eht16 $
22
22
 */
23
23
 
24
24
 
28
28
#include "Scintilla.h"
29
29
#include "ScintillaWidget.h"
30
30
 
31
 
/** Default character set to define which characters shoud be treated as part of a word. */
 
31
/** Default character set to define which characters should be treated as part of a word. */
32
32
#define GEANY_WORDCHARS                                 "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
33
33
#define GEANY_MAX_WORD_LENGTH                   192
34
34
 
51
51
}
52
52
GeanyAutoIndent;
53
53
 
 
54
typedef enum
 
55
{
 
56
        GEANY_VIRTUAL_SPACE_DISABLED = 0,
 
57
        GEANY_VIRTUAL_SPACE_SELECTION = 1,
 
58
        GEANY_VIRTUAL_SPACE_ALWAYS = 3
 
59
}
 
60
GeanyVirtualSpace;
 
61
 
54
62
 
55
63
/* Auto-close brackets/quotes */
56
64
enum {
92
100
GeanyIndentPrefs;
93
101
 
94
102
 
95
 
/* Default prefs when creating a new editor window.
96
 
 * Some of these can be overridden per document. */
 
103
/** Default prefs when creating a new editor window.
 
104
 * Some of these can be overridden per document or per project. */
97
105
typedef struct GeanyEditorPrefs
98
106
{
99
107
        GeanyIndentPrefs *indentation;  /*< Default indentation prefs. @see editor_get_indent_prefs(). */
100
108
        gboolean        show_white_space;
101
109
        gboolean        show_indent_guide;
102
110
        gboolean        show_line_endings;
103
 
        gint            long_line_type; /* 0 - line, 1 - background, 2 - none */
104
 
        gint            long_line_column;
 
111
        /* 0 - line, 1 - background. This setting may be overriden when a project is opened. Use
 
112
         * @c editor_get_long_line_type(). */
 
113
        gint            long_line_global_type;
 
114
        /* This setting may be overriden when a project is opened. Use @c editor_get_long_line_column(). */
 
115
        gint            long_line_global_column;
105
116
        gchar           *long_line_color;
106
117
        gboolean        show_markers_margin;            /* view menu */
107
118
        gboolean        show_linenumber_margin;         /* view menu */
108
119
        gboolean        show_scrollbars;                        /* hidden pref */
109
 
        gboolean        scroll_stop_at_last_line;       /* hidden pref */
 
120
        gboolean        scroll_stop_at_last_line;
110
121
        gboolean        line_wrapping;
111
122
        gboolean        use_indicators;
112
123
        gboolean        folding;
120
131
        gboolean        complete_snippets;
121
132
        gint            symbolcompletion_min_chars;
122
133
        gint            symbolcompletion_max_height;
123
 
        GHashTable      *snippets;
124
134
        gboolean        brace_match_ltgt;       /* whether to highlight < and > chars (hidden pref) */
125
135
        gboolean        use_gtk_word_boundaries;        /* hidden pref */
126
136
        gboolean        complete_snippets_whilst_editing;       /* hidden pref */
131
141
        guint           autoclose_chars;
132
142
        gboolean        autocomplete_doc_words;
133
143
        gboolean        completion_drops_rest_of_word;
 
144
        gchar           *color_scheme;
 
145
        gint            show_virtual_space;
 
146
        /* This setting may be overriden when a project is opened. Use @c editor_get_long_line_type(). */
 
147
        gboolean        long_line_global_enabled;
134
148
}
135
149
GeanyEditorPrefs;
136
150
 
174
188
 
175
189
gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean force);
176
190
 
177
 
void snippet_goto_next_cursor(ScintillaObject *sci, gint current_pos);
 
191
gboolean editor_complete_word_part(GeanyEditor *editor);
 
192
 
 
193
void editor_goto_next_snippet_cursor(GeanyEditor *editor);
178
194
 
179
195
gboolean editor_complete_snippet(GeanyEditor *editor, gint pos);
180
196
 
212
228
 
213
229
void editor_snippets_free(void);
214
230
 
 
231
/* 0 - line, 1 - background, 2 - disabled */
 
232
gint editor_get_long_line_type(void);
 
233
 
 
234
gint editor_get_long_line_column(void);
 
235
 
215
236
/* General editing functions */
216
237
 
217
238
void editor_find_current_word(GeanyEditor *editor, gint pos, gchar *word, size_t wordlen,
267
288
 
268
289
gboolean editor_goto_pos(GeanyEditor *editor, gint pos, gboolean mark);
269
290
 
270
 
gboolean editor_goto_line(GeanyEditor *editor, gint line_no);
 
291
gboolean editor_goto_line(GeanyEditor *editor, gint line_no, gint offset);
271
292
 
272
293
void editor_set_indentation_guides(GeanyEditor *editor);
273
294
 
275
296
 
276
297
gchar *editor_get_calltip_text(GeanyEditor *editor, const TMTag *tag);
277
298
 
 
299
void editor_insert_text_block(GeanyEditor *editor, const gchar *text,
 
300
                                                          gint insert_pos, gint cursor_index,
 
301
                                                          gint newline_indent_size, gboolean replace_newlines);
 
302
 
278
303
void editor_toggle_fold(GeanyEditor *editor, gint line, gint modifiers);
279
304
 
280
305
#endif