Blender  V2.93
space_text.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include <string.h>
25 
26 #include "DNA_text_types.h"
27 
28 #include "MEM_guardedalloc.h"
29 
30 #include "BLI_blenlib.h"
31 
32 #include "BKE_context.h"
33 #include "BKE_global.h"
34 #include "BKE_lib_id.h"
35 #include "BKE_screen.h"
36 
37 #include "ED_screen.h"
38 #include "ED_space_api.h"
39 
40 #include "WM_api.h"
41 #include "WM_types.h"
42 
43 #include "UI_interface.h"
44 #include "UI_resources.h"
45 #include "UI_view2d.h"
46 
47 #include "RNA_access.h"
48 
49 #include "text_format.h"
50 #include "text_intern.h" /* own include */
51 
52 /* ******************** default callbacks for text space ***************** */
53 
55 {
56  ARegion *region;
57  SpaceText *stext;
58 
59  stext = MEM_callocN(sizeof(SpaceText), "inittext");
60  stext->spacetype = SPACE_TEXT;
61 
62  stext->lheight = 12;
63  stext->tabnumber = 4;
64  stext->margin_column = 80;
65  stext->showsyntax = true;
66  stext->showlinenrs = true;
67 
68  /* header */
69  region = MEM_callocN(sizeof(ARegion), "header for text");
70 
71  BLI_addtail(&stext->regionbase, region);
72  region->regiontype = RGN_TYPE_HEADER;
74 
75  /* footer */
76  region = MEM_callocN(sizeof(ARegion), "footer for text");
77  BLI_addtail(&stext->regionbase, region);
78  region->regiontype = RGN_TYPE_FOOTER;
80 
81  /* properties region */
82  region = MEM_callocN(sizeof(ARegion), "properties region for text");
83 
84  BLI_addtail(&stext->regionbase, region);
85  region->regiontype = RGN_TYPE_UI;
86  region->alignment = RGN_ALIGN_RIGHT;
87  region->flag = RGN_FLAG_HIDDEN;
88 
89  /* main region */
90  region = MEM_callocN(sizeof(ARegion), "main region for text");
91 
92  BLI_addtail(&stext->regionbase, region);
93  region->regiontype = RGN_TYPE_WINDOW;
94 
95  return (SpaceLink *)stext;
96 }
97 
98 /* not spacelink itself */
99 static void text_free(SpaceLink *sl)
100 {
101  SpaceText *stext = (SpaceText *)sl;
102 
103  stext->text = NULL;
104  text_free_caches(stext);
105 }
106 
107 /* spacetype; init callback */
108 static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
109 {
110 }
111 
113 {
114  SpaceText *stextn = MEM_dupallocN(sl);
115 
116  /* clear or remove stuff from old */
117 
118  stextn->runtime.drawcache = NULL; /* space need its own cache */
119 
120  return (SpaceLink *)stextn;
121 }
122 
124 {
125  ScrArea *area = params->area;
126  wmNotifier *wmn = params->notifier;
127  SpaceText *st = area->spacedata.first;
128 
129  /* context changes */
130  switch (wmn->category) {
131  case NC_TEXT:
132  /* check if active text was changed, no need to redraw if text isn't active
133  * (reference == NULL) means text was unlinked, should update anyway for this
134  * case -- no way to know was text active before unlinking or not */
135  if (wmn->reference && wmn->reference != st->text) {
136  break;
137  }
138 
139  switch (wmn->data) {
140  case ND_DISPLAY:
141  case ND_CURSOR:
143  break;
144  }
145 
146  switch (wmn->action) {
147  case NA_EDITED:
148  if (st->text) {
151  }
152 
154  ATTR_FALLTHROUGH; /* fall down to tag redraw */
155  case NA_ADDED:
156  case NA_REMOVED:
157  case NA_SELECTED:
159  break;
160  }
161 
162  break;
163  case NC_SPACE:
164  if (wmn->data == ND_SPACE_TEXT) {
166  }
167  break;
168  }
169 }
170 
171 static void text_operatortypes(void)
172 {
182 
187 
193 
197 
199 
205 
211 
214 
219 
221 
223 
225 
227 }
228 
229 static void text_keymap(struct wmKeyConfig *keyconf)
230 {
231  WM_keymap_ensure(keyconf, "Text Generic", SPACE_TEXT, 0);
232  WM_keymap_ensure(keyconf, "Text", SPACE_TEXT, 0);
233 }
234 
235 const char *text_context_dir[] = {"edit_text", NULL};
236 
237 static int /*eContextResult*/ text_context(const bContext *C,
238  const char *member,
240 {
242 
243  if (CTX_data_dir(member)) {
245  return CTX_RESULT_OK;
246  }
247  if (CTX_data_equals(member, "edit_text")) {
248  if (st->text != NULL) {
250  }
251  return CTX_RESULT_OK;
252  }
253 
255 }
256 
257 /********************* main region ********************/
258 
259 /* add handlers, stuff you only do once or on area/region changes */
261 {
262  wmKeyMap *keymap;
263  ListBase *lb;
264 
265  UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
266 
267  /* own keymap */
268  keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, 0);
270  keymap = WM_keymap_ensure(wm->defaultconf, "Text", SPACE_TEXT, 0);
272 
273  /* add drop boxes */
275 
277 }
278 
279 static void text_main_region_draw(const bContext *C, ARegion *region)
280 {
281  /* draw entirely, view changes should be handled here */
283  // View2D *v2d = &region->v2d;
284 
285  /* clear and setup matrix */
287 
288  // UI_view2d_view_ortho(v2d);
289 
290  /* data... */
291  draw_text_main(st, region);
292 
293  /* reset view matrix */
294  // UI_view2d_view_restore(C);
295 
296  /* scrollers? */
297 }
298 
299 static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
300 {
301  SpaceText *st = area->spacedata.first;
302  int wmcursor = WM_CURSOR_TEXT_EDIT;
303 
305  win->eventstate->x - region->winrct.xmin,
307  wmcursor = WM_CURSOR_DEFAULT;
308  }
309 
310  WM_cursor_set(win, wmcursor);
311 }
312 
313 /* ************* dropboxes ************* */
314 
316  wmDrag *drag,
317  const wmEvent *UNUSED(event),
318  const char **UNUSED(r_tooltip))
319 {
320  if (drag->type == WM_DRAG_PATH) {
321  /* rule might not work? */
322  if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_TEXT, ICON_FILE_BLANK)) {
323  return true;
324  }
325  }
326  return false;
327 }
328 
329 static void text_drop_copy(wmDrag *drag, wmDropBox *drop)
330 {
331  /* copy drag path to properties */
332  RNA_string_set(drop->ptr, "filepath", drag->path);
333 }
334 
336  wmDrag *drag,
337  const wmEvent *UNUSED(event),
338  const char **UNUSED(r_tooltip))
339 {
340  return (drag->type == WM_DRAG_ID);
341 }
342 
343 static void text_drop_paste(wmDrag *drag, wmDropBox *drop)
344 {
345  char *text;
346  ID *id = WM_drag_get_local_ID(drag, 0);
347 
348  /* copy drag path to properties */
349  text = RNA_path_full_ID_py(G_MAIN, id);
350  RNA_string_set(drop->ptr, "text", text);
351  MEM_freeN(text);
352 }
353 
354 /* this region dropbox definition */
355 static void text_dropboxes(void)
356 {
358 
359  WM_dropbox_add(lb, "TEXT_OT_open", text_drop_poll, text_drop_copy, NULL);
360  WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_paste_poll, text_drop_paste, NULL);
361 }
362 
363 /* ************* end drop *********** */
364 
365 /****************** header region ******************/
366 
367 /* add handlers, stuff you only do once or on area/region changes */
369 {
370  ED_region_header_init(region);
371 }
372 
373 static void text_header_region_draw(const bContext *C, ARegion *region)
374 {
375  ED_region_header(C, region);
376 }
377 
378 /****************** properties region ******************/
379 
380 /* add handlers, stuff you only do once or on area/region changes */
382 {
383  wmKeyMap *keymap;
384 
386  ED_region_panels_init(wm, region);
387 
388  /* own keymaps */
389  keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, 0);
391 }
392 
393 static void text_properties_region_draw(const bContext *C, ARegion *region)
394 {
396 
397  ED_region_panels(C, region);
398 
399  /* this flag trick is make sure buttons have been added already */
400  if (st->flags & ST_FIND_ACTIVATE) {
401  if (UI_textbutton_activate_rna(C, region, st, "find_text")) {
402  /* if the panel was already open we need to do another redraw */
405  }
406  st->flags &= ~ST_FIND_ACTIVATE;
407  }
408 }
409 
410 static void text_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
411 {
412  SpaceText *stext = (SpaceText *)slink;
413 
414  if (!ELEM(GS(old_id->name), ID_TXT)) {
415  return;
416  }
417 
418  if ((ID *)stext->text == old_id) {
419  stext->text = (Text *)new_id;
420  id_us_ensure_real(new_id);
421  }
422 }
423 
424 /********************* registration ********************/
425 
426 /* only called once, from space/spacetypes.c */
428 {
429  SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype text");
430  ARegionType *art;
431 
432  st->spaceid = SPACE_TEXT;
433  strncpy(st->name, "Text", BKE_ST_MAXNAME);
434 
435  st->create = text_create;
436  st->free = text_free;
437  st->init = text_init;
440  st->keymap = text_keymap;
441  st->listener = text_listener;
442  st->context = text_context;
444  st->id_remap = text_id_remap;
445 
446  /* regions: main window */
447  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
448  art->regionid = RGN_TYPE_WINDOW;
451  art->cursor = text_cursor;
452  art->event_cursor = true;
453 
454  BLI_addhead(&st->regiontypes, art);
455 
456  /* regions: properties */
457  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
458  art->regionid = RGN_TYPE_UI;
460  art->keymapflag = ED_KEYMAP_UI;
461 
464  BLI_addhead(&st->regiontypes, art);
465 
466  /* regions: header */
467  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
468  art->regionid = RGN_TYPE_HEADER;
469  art->prefsizey = HEADERY;
471 
474  BLI_addhead(&st->regiontypes, art);
475 
476  /* regions: footer */
477  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
478  art->regionid = RGN_TYPE_FOOTER;
479  art->prefsizey = HEADERY;
483  BLI_addhead(&st->regiontypes, art);
484 
486 
487  /* register formatters */
493 }
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:714
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
Definition: context.c:672
bool CTX_data_equals(const char *member, const char *str)
Definition: context.c:623
void CTX_data_id_pointer_set(bContextDataResult *result, struct ID *id)
Definition: context.c:633
bool CTX_data_dir(const char *member)
Definition: context.c:628
@ CTX_RESULT_MEMBER_NOT_FOUND
Definition: BKE_context.h:86
@ CTX_RESULT_OK
Definition: BKE_context.h:83
struct SpaceText * CTX_wm_space_text(const bContext *C)
Definition: context.c:782
#define G_MAIN
Definition: BKE_global.h:232
void id_us_ensure_real(struct ID *id)
Definition: lib_id.c:238
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:68
void BKE_spacetype_register(struct SpaceType *st)
Definition: screen.c:420
#define ATTR_FALLTHROUGH
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:87
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
bool BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y)
#define UNUSED(x)
#define ELEM(...)
@ ID_TXT
Definition: DNA_ID_enums.h:74
#define HEADERY
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
@ RGN_FLAG_HIDDEN
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_FOOTER
@ RGN_TYPE_HEADER
@ SPACE_TEXT
@ ST_FIND_ACTIVATE
@ USER_HEADER_BOTTOM
@ V2D_SCROLL_VERTICAL_HIDE
@ V2D_SCROLL_RIGHT
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:745
void ED_region_header(const struct bContext *C, struct ARegion *region)
void ED_region_panels(const struct bContext *C, struct ARegion *region)
void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *region)
Definition: area.c:3090
void ED_region_header_init(struct ARegion *region)
Definition: area.c:3358
@ ED_KEYMAP_UI
Definition: ED_screen.h:440
@ ED_KEYMAP_HEADER
Definition: ED_screen.h:446
@ ED_KEYMAP_VIEW2D
Definition: ED_screen.h:443
@ ED_KEYMAP_FOOTER
Definition: ED_screen.h:447
Read Guarded memory(de)allocation.
#define C
Definition: RandGen.cpp:39
#define UI_COMPACT_PANEL_WIDTH
Definition: UI_interface.h:244
bool UI_textbutton_activate_rna(const struct bContext *C, struct ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
@ TH_BACK
Definition: UI_resources.h:55
void UI_ThemeClearColor(int colorid)
Definition: resources.c:1478
void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy)
Definition: view2d.c:240
@ V2D_COMMONVIEW_STANDARD
Definition: UI_view2d.h:51
#define WM_DRAG_PATH
Definition: WM_types.h:876
#define ND_CURSOR
Definition: WM_types.h:390
#define ND_DISPLAY
Definition: WM_types.h:391
#define NA_ADDED
Definition: WM_types.h:464
#define NA_EDITED
Definition: WM_types.h:462
#define NC_TEXT
Definition: WM_types.h:287
#define NA_REMOVED
Definition: WM_types.h:465
#define ND_SPACE_TEXT
Definition: WM_types.h:425
#define WM_DRAG_ID
Definition: WM_types.h:873
#define NC_SPACE
Definition: WM_types.h:293
#define NA_SELECTED
Definition: WM_types.h:467
unsigned int U
Definition: btGjkEpa3.h:78
Scene scene
static void text_update_edited(bContext *C, Object *obedit, int mode)
Definition: editfont.c:408
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
#define GS(x)
Definition: iris.c:241
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_dupallocN)(const void *vmemh)
Definition: mallocn.c:42
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:6550
char * RNA_path_full_ID_py(Main *bmain, ID *id)
Definition: rna_access.c:6088
const char * text_context_dir[]
Definition: space_text.c:235
static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
Definition: space_text.c:299
static SpaceLink * text_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
Definition: space_text.c:54
static void text_header_region_draw(const bContext *C, ARegion *region)
Definition: space_text.c:373
static void text_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
Definition: space_text.c:368
static void text_drop_copy(wmDrag *drag, wmDropBox *drop)
Definition: space_text.c:329
static void text_free(SpaceLink *sl)
Definition: space_text.c:99
static void text_properties_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_text.c:381
static void text_dropboxes(void)
Definition: space_text.c:355
static void text_main_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_text.c:260
static void text_keymap(struct wmKeyConfig *keyconf)
Definition: space_text.c:229
static void text_operatortypes(void)
Definition: space_text.c:171
static void text_drop_paste(wmDrag *drag, wmDropBox *drop)
Definition: space_text.c:343
static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
Definition: space_text.c:108
static bool text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(r_tooltip))
Definition: space_text.c:335
static void text_properties_region_draw(const bContext *C, ARegion *region)
Definition: space_text.c:393
static bool text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(r_tooltip))
Definition: space_text.c:315
static void text_main_region_draw(const bContext *C, ARegion *region)
Definition: space_text.c:279
static void text_listener(const wmSpaceTypeListenerParams *params)
Definition: space_text.c:123
void ED_spacetype_text(void)
Definition: space_text.c:427
static void text_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
Definition: space_text.c:410
static int text_context(const bContext *C, const char *member, bContextDataResult *result)
Definition: space_text.c:237
static SpaceLink * text_duplicate(SpaceLink *sl)
Definition: space_text.c:112
void(* draw)(const struct bContext *C, struct ARegion *region)
Definition: BKE_screen.h:169
void(* cursor)(struct wmWindow *win, struct ScrArea *area, struct ARegion *region)
Definition: BKE_screen.h:197
int keymapflag
Definition: BKE_screen.h:226
short event_cursor
Definition: BKE_screen.h:233
void(* init)(struct wmWindowManager *wm, struct ARegion *region)
Definition: BKE_screen.h:165
ListBase handlers
short alignment
short regiontype
Definition: DNA_ID.h:273
char name[66]
Definition: DNA_ID.h:283
struct rcti scroll_region_handle
ListBase regionbase
SpaceText_Runtime runtime
short margin_column
struct Text * text
struct SpaceLink *(* duplicate)(struct SpaceLink *sl)
Definition: BKE_screen.h:104
ListBase regiontypes
Definition: BKE_screen.h:130
void(* keymap)(struct wmKeyConfig *keyconf)
Definition: BKE_screen.h:109
void(* operatortypes)(void)
Definition: BKE_screen.h:107
void(* free)(struct SpaceLink *sl)
Definition: BKE_screen.h:88
struct SpaceLink *(* create)(const struct ScrArea *area, const struct Scene *scene)
Definition: BKE_screen.h:86
void(* listener)(const wmSpaceTypeListenerParams *params)
Definition: BKE_screen.h:95
void(* init)(struct wmWindowManager *wm, struct ScrArea *area)
Definition: BKE_screen.h:91
int spaceid
Definition: BKE_screen.h:81
bContextDataCallback context
Definition: BKE_screen.h:117
void(* id_remap)(struct ScrArea *area, struct SpaceLink *sl, struct ID *old_id, struct ID *new_id)
Definition: BKE_screen.h:120
char name[BKE_ST_MAXNAME]
Definition: BKE_screen.h:80
void(* dropboxes)(void)
Definition: BKE_screen.h:111
short scroll
int ymin
Definition: DNA_vec_types.h:80
int xmin
Definition: DNA_vec_types.h:79
char path[1024]
Definition: WM_types.h:909
int icon
Definition: WM_types.h:905
int type
Definition: WM_types.h:907
struct PointerRNA * ptr
Definition: WM_types.h:953
int x
Definition: WM_types.h:581
unsigned int data
Definition: WM_types.h:260
unsigned int action
Definition: WM_types.h:260
unsigned int category
Definition: WM_types.h:260
void * reference
Definition: WM_types.h:262
struct wmKeyConfig * defaultconf
struct wmEvent * eventstate
void TEXT_OT_autocomplete(wmOperatorType *ot)
void ED_text_format_register_lua(void)
void ED_text_format_register_osl(void)
void ED_text_format_register_py(void)
void ED_text_format_register_pov_ini(void)
void ED_text_format_register_pov(void)
void TEXT_OT_start_find(wmOperatorType *ot)
Definition: text_header.c:100
void TEXT_OT_delete(struct wmOperatorType *ot)
Definition: text_ops.c:2447
void TEXT_OT_indent_or_autocomplete(struct wmOperatorType *ot)
Definition: text_ops.c:1103
void TEXT_OT_selection_set(struct wmOperatorType *ot)
Definition: text_ops.c:3294
void TEXT_OT_save(struct wmOperatorType *ot)
Definition: text_ops.c:658
void text_free_caches(struct SpaceText *st)
void TEXT_OT_replace(struct wmOperatorType *ot)
Definition: text_ops.c:3687
void TEXT_OT_select_line(struct wmOperatorType *ot)
Definition: text_ops.c:1530
void TEXT_OT_paste(struct wmOperatorType *ot)
Definition: text_ops.c:936
void TEXT_OT_find_set_selected(struct wmOperatorType *ot)
Definition: text_ops.c:3730
void TEXT_OT_new(struct wmOperatorType *ot)
Definition: text_ops.c:292
void TEXT_OT_line_break(struct wmOperatorType *ot)
Definition: text_ops.c:1245
void TEXT_OT_cut(struct wmOperatorType *ot)
Definition: text_ops.c:1068
void TEXT_OT_overwrite_toggle(struct wmOperatorType *ot)
Definition: text_ops.c:2489
void TEXT_OT_move_select(struct wmOperatorType *ot)
Definition: text_ops.c:2282
void TEXT_OT_select_word(struct wmOperatorType *ot)
Definition: text_ops.c:1563
void TEXT_OT_scroll_bar(struct wmOperatorType *ot)
Definition: text_ops.c:2887
void TEXT_OT_line_number(struct wmOperatorType *ot)
Definition: text_ops.c:3409
void TEXT_OT_unlink(struct wmOperatorType *ot)
Definition: text_ops.c:522
void TEXT_OT_move_lines(struct wmOperatorType *ot)
Definition: text_ops.c:1601
void TEXT_OT_copy(struct wmOperatorType *ot)
Definition: text_ops.c:1028
void TEXT_OT_make_internal(struct wmOperatorType *ot)
Definition: text_ops.c:558
void TEXT_OT_run_script(struct wmOperatorType *ot)
Definition: text_ops.c:810
void TEXT_OT_jump(struct wmOperatorType *ot)
Definition: text_ops.c:2335
void TEXT_OT_insert(struct wmOperatorType *ot)
Definition: text_ops.c:3509
void TEXT_OT_unindent(struct wmOperatorType *ot)
Definition: text_ops.c:1188
void TEXT_OT_resolve_conflict(struct wmOperatorType *ot)
Definition: text_ops.c:3883
void TEXT_OT_convert_whitespace(struct wmOperatorType *ot)
Definition: text_ops.c:1459
void TEXT_OT_indent(struct wmOperatorType *ot)
Definition: text_ops.c:1148
void TEXT_OT_save_as(struct wmOperatorType *ot)
Definition: text_ops.c:729
void TEXT_OT_refresh_pyconstraints(struct wmOperatorType *ot)
Definition: text_ops.c:878
void TEXT_OT_cursor_set(struct wmOperatorType *ot)
Definition: text_ops.c:3343
void TEXT_OT_replace_set_selected(struct wmOperatorType *ot)
Definition: text_ops.c:3761
void draw_text_main(struct SpaceText *st, struct ARegion *region)
void TEXT_OT_select_all(struct wmOperatorType *ot)
Definition: text_ops.c:1500
void TEXT_OT_open(struct wmOperatorType *ot)
Definition: text_ops.c:392
void TEXT_OT_find(struct wmOperatorType *ot)
Definition: text_ops.c:3618
void TEXT_OT_scroll(struct wmOperatorType *ot)
Definition: text_ops.c:2780
void TEXT_OT_comment_toggle(struct wmOperatorType *ot)
Definition: text_ops.c:1301
void TEXT_OT_move(struct wmOperatorType *ot)
Definition: text_ops.c:2254
void text_drawcache_tag_update(struct SpaceText *st, int full)
void TEXT_OT_reload(struct wmOperatorType *ot)
Definition: text_ops.c:471
void TEXT_OT_duplicate_line(struct wmOperatorType *ot)
Definition: text_ops.c:982
void TEXT_OT_to_3d_object(struct wmOperatorType *ot)
Definition: text_ops.c:3920
void WM_cursor_set(wmWindow *win, int curs)
Definition: wm_cursors.c:142
@ WM_CURSOR_DEFAULT
Definition: wm_cursors.h:34
@ WM_CURSOR_TEXT_EDIT
Definition: wm_cursors.h:35
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *, wmDrag *, const wmEvent *, const char **), void(*copy)(wmDrag *, wmDropBox *), void(*cancel)(struct Main *, wmDrag *, wmDropBox *))
Definition: wm_dragdrop.c:96
ID * WM_drag_get_local_ID(const wmDrag *drag, short idcode)
Definition: wm_dragdrop.c:335
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
Definition: wm_dragdrop.c:77
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))