Blender  V3.3
space_text.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #include <string.h>
9 
10 #include "DNA_text_types.h"
11 
12 #include "MEM_guardedalloc.h"
13 
14 #include "BLI_blenlib.h"
15 
16 #include "BKE_context.h"
17 #include "BKE_global.h"
18 #include "BKE_lib_id.h"
19 #include "BKE_lib_remap.h"
20 #include "BKE_screen.h"
21 
22 #include "ED_screen.h"
23 #include "ED_space_api.h"
24 
25 #include "WM_api.h"
26 #include "WM_types.h"
27 
28 #include "UI_interface.h"
29 #include "UI_resources.h"
30 #include "UI_view2d.h"
31 
32 #include "RNA_access.h"
33 #include "RNA_path.h"
34 
35 #include "text_format.h"
36 #include "text_intern.h" /* own include */
37 
38 /* ******************** default callbacks for text space ***************** */
39 
41 {
42  ARegion *region;
43  SpaceText *stext;
44 
45  stext = MEM_callocN(sizeof(SpaceText), "inittext");
46  stext->spacetype = SPACE_TEXT;
47 
48  stext->lheight = 12;
49  stext->tabnumber = 4;
50  stext->margin_column = 80;
51  stext->showsyntax = true;
52  stext->showlinenrs = true;
53 
54  /* header */
55  region = MEM_callocN(sizeof(ARegion), "header for text");
56 
57  BLI_addtail(&stext->regionbase, region);
58  region->regiontype = RGN_TYPE_HEADER;
60 
61  /* footer */
62  region = MEM_callocN(sizeof(ARegion), "footer for text");
63  BLI_addtail(&stext->regionbase, region);
64  region->regiontype = RGN_TYPE_FOOTER;
66 
67  /* properties region */
68  region = MEM_callocN(sizeof(ARegion), "properties region for text");
69 
70  BLI_addtail(&stext->regionbase, region);
71  region->regiontype = RGN_TYPE_UI;
72  region->alignment = RGN_ALIGN_RIGHT;
73  region->flag = RGN_FLAG_HIDDEN;
74 
75  /* main region */
76  region = MEM_callocN(sizeof(ARegion), "main region for text");
77 
78  BLI_addtail(&stext->regionbase, region);
79  region->regiontype = RGN_TYPE_WINDOW;
80 
81  return (SpaceLink *)stext;
82 }
83 
84 /* not spacelink itself */
85 static void text_free(SpaceLink *sl)
86 {
87  SpaceText *stext = (SpaceText *)sl;
88 
89  stext->text = NULL;
90  text_free_caches(stext);
91 }
92 
93 /* spacetype; init callback */
94 static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
95 {
96 }
97 
99 {
100  SpaceText *stextn = MEM_dupallocN(sl);
101 
102  /* clear or remove stuff from old */
103 
104  stextn->runtime.drawcache = NULL; /* space need its own cache */
105 
106  return (SpaceLink *)stextn;
107 }
108 
110 {
111  ScrArea *area = params->area;
112  wmNotifier *wmn = params->notifier;
113  SpaceText *st = area->spacedata.first;
114 
115  /* context changes */
116  switch (wmn->category) {
117  case NC_TEXT:
118  /* check if active text was changed, no need to redraw if text isn't active
119  * (reference == NULL) means text was unlinked, should update anyway for this
120  * case -- no way to know was text active before unlinking or not */
121  if (wmn->reference && wmn->reference != st->text) {
122  break;
123  }
124 
125  switch (wmn->data) {
126  case ND_DISPLAY:
127  case ND_CURSOR:
129  break;
130  }
131 
132  switch (wmn->action) {
133  case NA_EDITED:
134  if (st->text) {
136  text_update_edited(st->text);
137  }
138 
140  ATTR_FALLTHROUGH; /* fall down to tag redraw */
141  case NA_ADDED:
142  case NA_REMOVED:
143  case NA_SELECTED:
145  break;
146  }
147 
148  break;
149  case NC_SPACE:
150  if (wmn->data == ND_SPACE_TEXT) {
152  }
153  break;
154  }
155 }
156 
157 static void text_operatortypes(void)
158 {
168 
173 
179 
183 
185 
191 
197 
200 
205 
207 
209 
211 
213 }
214 
215 static void text_keymap(struct wmKeyConfig *keyconf)
216 {
217  WM_keymap_ensure(keyconf, "Text Generic", SPACE_TEXT, 0);
218  WM_keymap_ensure(keyconf, "Text", SPACE_TEXT, 0);
219 }
220 
221 const char *text_context_dir[] = {"edit_text", NULL};
222 
223 static int /*eContextResult*/ text_context(const bContext *C,
224  const char *member,
226 {
228 
229  if (CTX_data_dir(member)) {
231  return CTX_RESULT_OK;
232  }
233  if (CTX_data_equals(member, "edit_text")) {
234  if (st->text != NULL) {
235  CTX_data_id_pointer_set(result, &st->text->id);
236  }
237  return CTX_RESULT_OK;
238  }
239 
241 }
242 
243 /********************* main region ********************/
244 
245 /* add handlers, stuff you only do once or on area/region changes */
247 {
248  wmKeyMap *keymap;
249  ListBase *lb;
250 
251  UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
252 
253  /* own keymap */
254  keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, 0);
256  keymap = WM_keymap_ensure(wm->defaultconf, "Text", SPACE_TEXT, 0);
258 
259  /* add drop boxes */
261 
263 }
264 
265 static void text_main_region_draw(const bContext *C, ARegion *region)
266 {
267  /* draw entirely, view changes should be handled here */
269  // View2D *v2d = &region->v2d;
270 
271  /* clear and setup matrix */
273 
274  // UI_view2d_view_ortho(v2d);
275 
276  /* data... */
277  draw_text_main(st, region);
278 
279  /* reset view matrix */
280  // UI_view2d_view_restore(C);
281 
282  /* scrollers? */
283 }
284 
285 static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
286 {
287  SpaceText *st = area->spacedata.first;
288  int wmcursor = WM_CURSOR_TEXT_EDIT;
289 
290  if (st->text && BLI_rcti_isect_pt(&st->runtime.scroll_region_handle,
291  win->eventstate->xy[0] - region->winrct.xmin,
292  st->runtime.scroll_region_handle.ymin)) {
293  wmcursor = WM_CURSOR_DEFAULT;
294  }
295 
296  WM_cursor_set(win, wmcursor);
297 }
298 
299 /* ************* dropboxes ************* */
300 
301 static bool text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
302 {
303  if (drag->type == WM_DRAG_PATH) {
304  /* rule might not work? */
305  if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_TEXT, ICON_FILE_BLANK)) {
306  return true;
307  }
308  }
309  return false;
310 }
311 
312 static void text_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
313 {
314  /* copy drag path to properties */
315  RNA_string_set(drop->ptr, "filepath", drag->path);
316 }
317 
318 static bool text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
319 {
320  return (drag->type == WM_DRAG_ID);
321 }
322 
323 static void text_drop_paste(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
324 {
325  char *text;
326  ID *id = WM_drag_get_local_ID(drag, 0);
327 
328  /* copy drag path to properties */
329  text = RNA_path_full_ID_py(G_MAIN, id);
330  RNA_string_set(drop->ptr, "text", text);
331  MEM_freeN(text);
332 }
333 
334 /* this region dropbox definition */
335 static void text_dropboxes(void)
336 {
338 
339  WM_dropbox_add(lb, "TEXT_OT_open", text_drop_poll, text_drop_copy, NULL, NULL);
340  WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_paste_poll, text_drop_paste, NULL, NULL);
341 }
342 
343 /* ************* end drop *********** */
344 
345 /****************** header region ******************/
346 
347 /* add handlers, stuff you only do once or on area/region changes */
349 {
350  ED_region_header_init(region);
351 }
352 
353 static void text_header_region_draw(const bContext *C, ARegion *region)
354 {
355  ED_region_header(C, region);
356 }
357 
358 /****************** properties region ******************/
359 
360 /* add handlers, stuff you only do once or on area/region changes */
362 {
363  wmKeyMap *keymap;
364 
366  ED_region_panels_init(wm, region);
367 
368  /* own keymaps */
369  keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, 0);
371 }
372 
373 static void text_properties_region_draw(const bContext *C, ARegion *region)
374 {
376 
377  ED_region_panels(C, region);
378 
379  /* this flag trick is make sure buttons have been added already */
380  if (st->flags & ST_FIND_ACTIVATE) {
381  if (UI_textbutton_activate_rna(C, region, st, "find_text")) {
382  /* if the panel was already open we need to do another redraw */
385  }
386  st->flags &= ~ST_FIND_ACTIVATE;
387  }
388 }
389 
391  SpaceLink *slink,
392  const struct IDRemapper *mappings)
393 {
394  SpaceText *stext = (SpaceText *)slink;
396 }
397 
398 /********************* registration ********************/
399 
401 {
402  SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype text");
403  ARegionType *art;
404 
405  st->spaceid = SPACE_TEXT;
406  strncpy(st->name, "Text", BKE_ST_MAXNAME);
407 
408  st->create = text_create;
409  st->free = text_free;
410  st->init = text_init;
411  st->duplicate = text_duplicate;
412  st->operatortypes = text_operatortypes;
413  st->keymap = text_keymap;
414  st->listener = text_listener;
415  st->context = text_context;
416  st->dropboxes = text_dropboxes;
417  st->id_remap = text_id_remap;
418 
419  /* regions: main window */
420  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
421  art->regionid = RGN_TYPE_WINDOW;
424  art->cursor = text_cursor;
425  art->event_cursor = true;
426 
427  BLI_addhead(&st->regiontypes, art);
428 
429  /* regions: properties */
430  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
431  art->regionid = RGN_TYPE_UI;
433  art->keymapflag = ED_KEYMAP_UI;
434 
437  BLI_addhead(&st->regiontypes, art);
438 
439  /* regions: header */
440  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
441  art->regionid = RGN_TYPE_HEADER;
442  art->prefsizey = HEADERY;
444 
447  BLI_addhead(&st->regiontypes, art);
448 
449  /* regions: footer */
450  art = MEM_callocN(sizeof(ARegionType), "spacetype text region");
451  art->regionid = RGN_TYPE_FOOTER;
452  art->prefsizey = HEADERY;
456  BLI_addhead(&st->regiontypes, art);
457 
459 
460  /* register formatters */
466 }
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:738
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
Definition: context.c:696
bool CTX_data_equals(const char *member, const char *str)
Definition: context.c:634
void CTX_data_id_pointer_set(bContextDataResult *result, struct ID *id)
Definition: context.c:644
bool CTX_data_dir(const char *member)
Definition: context.c:639
@ CTX_RESULT_MEMBER_NOT_FOUND
Definition: BKE_context.h:75
@ CTX_RESULT_OK
Definition: BKE_context.h:72
struct SpaceText * CTX_wm_space_text(const bContext *C)
Definition: context.c:806
#define G_MAIN
Definition: BKE_global.h:267
@ ID_REMAP_APPLY_ENSURE_REAL
IDRemapperApplyResult BKE_id_remapper_apply(const struct IDRemapper *id_remapper, struct ID **r_id_ptr, IDRemapperApplyOptions options)
#define BKE_ST_MAXNAME
Definition: BKE_screen.h:53
void BKE_spacetype_register(struct SpaceType *st)
Definition: screen.c:391
#define ATTR_FALLTHROUGH
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:60
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:80
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
#define UNUSED(x)
#define ELEM(...)
#define HEADERY
@ RGN_FLAG_HIDDEN
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_FOOTER
@ RGN_TYPE_HEADER
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
@ 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:729
@ ED_KEYMAP_UI
Definition: ED_screen.h:691
@ ED_KEYMAP_HEADER
Definition: ED_screen.h:697
@ ED_KEYMAP_VIEW2D
Definition: ED_screen.h:694
@ ED_KEYMAP_FOOTER
Definition: ED_screen.h:698
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:3153
void ED_region_header_init(struct ARegion *region)
Definition: area.c:3417
Read Guarded memory(de)allocation.
#define C
Definition: RandGen.cpp:25
#define UI_COMPACT_PANEL_WIDTH
Definition: UI_interface.h:241
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:39
void UI_ThemeClearColor(int colorid)
Definition: resources.c:1448
void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy)
Definition: view2d.cc:217
@ V2D_COMMONVIEW_STANDARD
Definition: UI_view2d.h:36
#define WM_DRAG_PATH
Definition: WM_types.h:1050
#define ND_CURSOR
Definition: WM_types.h:438
#define ND_DISPLAY
Definition: WM_types.h:439
#define NA_ADDED
Definition: WM_types.h:525
#define NA_EDITED
Definition: WM_types.h:523
#define NC_TEXT
Definition: WM_types.h:336
#define NA_REMOVED
Definition: WM_types.h:526
#define ND_SPACE_TEXT
Definition: WM_types.h:473
#define WM_DRAG_ID
Definition: WM_types.h:1043
#define NC_SPACE
Definition: WM_types.h:342
#define NA_SELECTED
Definition: WM_types.h:528
unsigned int U
Definition: btGjkEpa3.h:78
Scene scene
static void text_update_edited(bContext *C, Object *obedit, int mode)
Definition: editfont.c:390
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
void *(* MEM_dupallocN)(const void *vmemh)
Definition: mallocn.c:28
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:5155
char * RNA_path_full_ID_py(Main *bmain, ID *id)
Definition: rna_path.cc:1182
const char * text_context_dir[]
Definition: space_text.c:221
static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
Definition: space_text.c:285
static SpaceLink * text_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
Definition: space_text.c:40
static bool text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
Definition: space_text.c:318
static void text_header_region_draw(const bContext *C, ARegion *region)
Definition: space_text.c:353
static void text_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
Definition: space_text.c:348
static void text_free(SpaceLink *sl)
Definition: space_text.c:85
static void text_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
Definition: space_text.c:312
static void text_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, const struct IDRemapper *mappings)
Definition: space_text.c:390
static void text_properties_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_text.c:361
static void text_dropboxes(void)
Definition: space_text.c:335
static void text_drop_paste(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
Definition: space_text.c:323
static void text_main_region_init(wmWindowManager *wm, ARegion *region)
Definition: space_text.c:246
static void text_keymap(struct wmKeyConfig *keyconf)
Definition: space_text.c:215
static void text_operatortypes(void)
Definition: space_text.c:157
static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
Definition: space_text.c:94
static void text_properties_region_draw(const bContext *C, ARegion *region)
Definition: space_text.c:373
static void text_main_region_draw(const bContext *C, ARegion *region)
Definition: space_text.c:265
static void text_listener(const wmSpaceTypeListenerParams *params)
Definition: space_text.c:109
void ED_spacetype_text(void)
Definition: space_text.c:400
static int text_context(const bContext *C, const char *member, bContextDataResult *result)
Definition: space_text.c:223
static SpaceLink * text_duplicate(SpaceLink *sl)
Definition: space_text.c:98
static bool text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
Definition: space_text.c:301
void(* draw)(const struct bContext *C, struct ARegion *region)
Definition: BKE_screen.h:151
void(* cursor)(struct wmWindow *win, struct ScrArea *area, struct ARegion *region)
Definition: BKE_screen.h:179
int keymapflag
Definition: BKE_screen.h:208
short event_cursor
Definition: BKE_screen.h:215
void(* init)(struct wmWindowManager *wm, struct ARegion *region)
Definition: BKE_screen.h:147
ListBase handlers
short alignment
short regiontype
Definition: DNA_ID.h:368
ListBase regionbase
SpaceText_Runtime runtime
short margin_column
struct Text * text
short scroll
int xmin
Definition: DNA_vec_types.h:63
char path[1024]
Definition: WM_types.h:1150
int icon
Definition: WM_types.h:1146
int type
Definition: WM_types.h:1148
struct PointerRNA * ptr
Definition: WM_types.h:1237
int xy[2]
Definition: WM_types.h:682
unsigned int data
Definition: WM_types.h:308
unsigned int action
Definition: WM_types.h:308
unsigned int category
Definition: WM_types.h:308
void * reference
Definition: WM_types.h:310
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:84
void TEXT_OT_delete(struct wmOperatorType *ot)
Definition: text_ops.c:2463
void TEXT_OT_indent_or_autocomplete(struct wmOperatorType *ot)
Definition: text_ops.c:1109
void TEXT_OT_selection_set(struct wmOperatorType *ot)
Definition: text_ops.c:3305
void TEXT_OT_save(struct wmOperatorType *ot)
Definition: text_ops.c:666
void text_free_caches(struct SpaceText *st)
void TEXT_OT_replace(struct wmOperatorType *ot)
Definition: text_ops.c:3706
void TEXT_OT_select_line(struct wmOperatorType *ot)
Definition: text_ops.c:1536
void TEXT_OT_paste(struct wmOperatorType *ot)
Definition: text_ops.c:942
void TEXT_OT_find_set_selected(struct wmOperatorType *ot)
Definition: text_ops.c:3749
void TEXT_OT_new(struct wmOperatorType *ot)
Definition: text_ops.c:300
void TEXT_OT_line_break(struct wmOperatorType *ot)
Definition: text_ops.c:1251
void TEXT_OT_cut(struct wmOperatorType *ot)
Definition: text_ops.c:1074
void TEXT_OT_overwrite_toggle(struct wmOperatorType *ot)
Definition: text_ops.c:2505
void TEXT_OT_move_select(struct wmOperatorType *ot)
Definition: text_ops.c:2288
void TEXT_OT_select_word(struct wmOperatorType *ot)
Definition: text_ops.c:1569
void TEXT_OT_scroll_bar(struct wmOperatorType *ot)
Definition: text_ops.c:2899
void TEXT_OT_line_number(struct wmOperatorType *ot)
Definition: text_ops.c:3421
void TEXT_OT_unlink(struct wmOperatorType *ot)
Definition: text_ops.c:530
void TEXT_OT_move_lines(struct wmOperatorType *ot)
Definition: text_ops.c:1607
void TEXT_OT_copy(struct wmOperatorType *ot)
Definition: text_ops.c:1034
void TEXT_OT_make_internal(struct wmOperatorType *ot)
Definition: text_ops.c:566
void TEXT_OT_run_script(struct wmOperatorType *ot)
Definition: text_ops.c:816
void TEXT_OT_jump(struct wmOperatorType *ot)
Definition: text_ops.c:2341
void TEXT_OT_insert(struct wmOperatorType *ot)
Definition: text_ops.c:3528
void TEXT_OT_unindent(struct wmOperatorType *ot)
Definition: text_ops.c:1194
void TEXT_OT_resolve_conflict(struct wmOperatorType *ot)
Definition: text_ops.c:3902
void TEXT_OT_convert_whitespace(struct wmOperatorType *ot)
Definition: text_ops.c:1465
void TEXT_OT_indent(struct wmOperatorType *ot)
Definition: text_ops.c:1154
void TEXT_OT_save_as(struct wmOperatorType *ot)
Definition: text_ops.c:737
void TEXT_OT_refresh_pyconstraints(struct wmOperatorType *ot)
Definition: text_ops.c:884
void TEXT_OT_cursor_set(struct wmOperatorType *ot)
Definition: text_ops.c:3354
void TEXT_OT_replace_set_selected(struct wmOperatorType *ot)
Definition: text_ops.c:3780
void draw_text_main(struct SpaceText *st, struct ARegion *region)
void TEXT_OT_select_all(struct wmOperatorType *ot)
Definition: text_ops.c:1506
void TEXT_OT_open(struct wmOperatorType *ot)
Definition: text_ops.c:400
void TEXT_OT_find(struct wmOperatorType *ot)
Definition: text_ops.c:3637
void TEXT_OT_scroll(struct wmOperatorType *ot)
Definition: text_ops.c:2793
void TEXT_OT_comment_toggle(struct wmOperatorType *ot)
Definition: text_ops.c:1307
void TEXT_OT_move(struct wmOperatorType *ot)
Definition: text_ops.c:2260
void text_drawcache_tag_update(struct SpaceText *st, int full)
void TEXT_OT_reload(struct wmOperatorType *ot)
Definition: text_ops.c:479
void TEXT_OT_duplicate_line(struct wmOperatorType *ot)
Definition: text_ops.c:988
void TEXT_OT_to_3d_object(struct wmOperatorType *ot)
Definition: text_ops.c:3939
void WM_cursor_set(wmWindow *win, int curs)
Definition: wm_cursors.c:126
@ WM_CURSOR_DEFAULT
Definition: wm_cursors.h:18
@ WM_CURSOR_TEXT_EDIT
Definition: wm_cursors.h:19
ID * WM_drag_get_local_ID(const wmDrag *drag, short idcode)
Definition: wm_dragdrop.cc:531
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
Definition: wm_dragdrop.cc:76
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *, wmDrag *, const wmEvent *), void(*copy)(bContext *, wmDrag *, wmDropBox *), void(*cancel)(Main *, wmDrag *, wmDropBox *), WMDropboxTooltipFunc tooltip)
Definition: wm_dragdrop.cc:95
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 *))