Blender V5.0
space_text.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstring>
10
11#include "DNA_text_types.h"
12
13#include "MEM_guardedalloc.h"
14
15#include "BLI_listbase.h"
16#include "BLI_string_utf8.h"
17
18#include "BKE_context.hh"
19#include "BKE_lib_query.hh"
20#include "BKE_lib_remap.hh"
21#include "BKE_screen.hh"
22
23#include "ED_screen.hh"
24#include "ED_space_api.hh"
25
26#include "WM_api.hh"
27#include "WM_types.hh"
28
29#include "UI_interface.hh"
30#include "UI_resources.hh"
31#include "UI_view2d.hh"
32
33#include "BLO_read_write.hh"
34
35#include "RNA_access.hh"
36#include "RNA_path.hh"
37
38#include "text_format.hh"
39#include "text_intern.hh" /* Own include. */
40
41/* ******************** default callbacks for text space ***************** */
42
43static SpaceLink *text_create(const ScrArea * /*area*/, const Scene * /*scene*/)
44{
45 ARegion *region;
46 SpaceText *stext;
47
48 stext = MEM_callocN<SpaceText>("inittext");
49 stext->spacetype = SPACE_TEXT;
50
51 stext->lheight = 12;
52 stext->tabnumber = 4;
53 stext->margin_column = 80;
54 stext->showsyntax = true;
55 stext->showlinenrs = true;
56 stext->flags |= ST_FIND_WRAP;
57
58 stext->runtime = MEM_new<SpaceText_Runtime>(__func__);
59
60 /* Header. */
61 region = BKE_area_region_new();
62
63 BLI_addtail(&stext->regionbase, region);
66
67 /* Footer. */
68 region = BKE_area_region_new();
69 BLI_addtail(&stext->regionbase, region);
72
73 /* Properties region. */
74 region = BKE_area_region_new();
75
76 BLI_addtail(&stext->regionbase, region);
77 region->regiontype = RGN_TYPE_UI;
78 region->alignment = RGN_ALIGN_RIGHT;
79 region->flag = RGN_FLAG_HIDDEN;
80
81 /* Main region. */
82 region = BKE_area_region_new();
83
84 BLI_addtail(&stext->regionbase, region);
86
87 return (SpaceLink *)stext;
88}
89
90/* Doesn't free the space-link itself. */
91static void text_free(SpaceLink *sl)
92{
93 SpaceText *stext = (SpaceText *)sl;
95 MEM_delete(stext->runtime);
96 stext->text = nullptr;
97}
98
99/* Spacetype; init callback. */
100static void text_init(wmWindowManager * /*wm*/, ScrArea * /*area*/) {}
101
103{
104 SpaceText *stextn = static_cast<SpaceText *>(MEM_dupallocN(sl));
105
106 /* Add its own runtime data. */
107 stextn->runtime = MEM_new<SpaceText_Runtime>(__func__);
108
109 return (SpaceLink *)stextn;
110}
111
113{
114 ScrArea *area = params->area;
115 const wmNotifier *wmn = params->notifier;
116 SpaceText *st = static_cast<SpaceText *>(area->spacedata.first);
117
118 /* context changes. */
119 switch (wmn->category) {
120 case NC_TEXT:
121 /* Check if active text was changed, no need to redraw if text isn't active
122 * `reference == nullptr` means text was unlinked, should update anyway for this
123 * case -- no way to know was text active before unlinking or not. */
124 if (wmn->reference && wmn->reference != st->text) {
125 break;
126 }
127
128 switch (wmn->data) {
129 case ND_DISPLAY:
130 case ND_CURSOR:
131 ED_area_tag_redraw(area);
132 break;
133 }
134
135 switch (wmn->action) {
136 case NA_EDITED:
137 if (st->text) {
140 }
141
142 ED_area_tag_redraw(area);
143 ATTR_FALLTHROUGH; /* Fall down to tag redraw. */
144 case NA_ADDED:
145 case NA_REMOVED:
146 case NA_SELECTED:
147 ED_area_tag_redraw(area);
148 break;
149 }
150
151 break;
152 case NC_SPACE:
153 if (wmn->data == ND_SPACE_TEXT) {
154 ED_area_tag_redraw(area);
155 }
156 break;
157 }
158}
159
161{
170
175
181
185
187
193
199
202
207
210
212
214
216
218}
219
220static void text_keymap(wmKeyConfig *keyconf)
221{
222 WM_keymap_ensure(keyconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
224}
225
226const char *text_context_dir[] = {"edit_text", nullptr};
227
228static int /*eContextResult*/ text_context(const bContext *C,
229 const char *member,
231{
233
234 if (CTX_data_dir(member)) {
236 return CTX_RESULT_OK;
237 }
238 if (CTX_data_equals(member, "edit_text")) {
239 if (st->text != nullptr) {
241 }
242 return CTX_RESULT_OK;
243 }
244
246}
247
248/********************* main region ********************/
249
250/* Add handlers, stuff you only do once or on area/region changes. */
252{
253 wmKeyMap *keymap;
254 ListBase *lb;
255
256 UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
257
258 /* Own keymap. */
259 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
260 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
261 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "Text", SPACE_TEXT, RGN_TYPE_WINDOW);
262 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
263
264 /* Add drop boxes. */
266
267 WM_event_add_dropbox_handler(&region->runtime->handlers, lb);
268}
269
270static void text_main_region_draw(const bContext *C, ARegion *region)
271{
272 /* Draw entirely, view changes should be handled here. */
274 // View2D *v2d = &region->v2d;
275
276 /* Clear and setup matrix. */
278
279 // UI_view2d_view_ortho(v2d);
280
281 /* Data. */
282 draw_text_main(st, region);
283
284 /* Reset view matrix. */
285 // UI_view2d_view_restore(C);
286
287 /* Scroll-bars? */
288}
289
290static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
291{
292 SpaceText *st = static_cast<SpaceText *>(area->spacedata.first);
293 int wmcursor = WM_CURSOR_TEXT_EDIT;
294
295 if (st->text && BLI_rcti_isect_pt(&st->runtime->scroll_region_handle,
296 win->eventstate->xy[0] - region->winrct.xmin,
297 st->runtime->scroll_region_handle.ymin))
298 {
299 wmcursor = WM_CURSOR_DEFAULT;
300 }
301
302 WM_cursor_set(win, wmcursor);
303}
304
305/* ************* dropboxes ************* */
306
307static bool text_drop_path_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
308{
309 if (drag->type == WM_DRAG_PATH) {
311 if (ELEM(file_type, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT)) {
312 return true;
313 }
314 }
315 return false;
316}
317
318static void text_drop_path_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
319{
320 /* Copy drag path to properties. */
321 RNA_string_set(drop->ptr, "filepath", WM_drag_get_single_path(drag));
322}
323
324static bool text_drop_id_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
325{
326 return (drag->type == WM_DRAG_ID);
327}
328
329static void text_drop_id_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
330{
331 ID *id = WM_drag_get_local_ID(drag, 0);
332
333 /* Copy drag path to properties. */
334 std::string text = RNA_path_full_ID_py(id);
335 RNA_string_set(drop->ptr, "text", text.c_str());
336}
337
338static bool text_drop_string_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
339{
340 return (drag->type == WM_DRAG_STRING);
341}
342
343static void text_drop_string_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
344{
345 const std::string &str = WM_drag_get_string(drag);
346 RNA_string_set(drop->ptr, "text", str.c_str());
347}
348
349/* This region dropbox definition. */
350static void text_dropboxes()
351{
353
354 WM_dropbox_add(lb, "TEXT_OT_open", text_drop_path_poll, text_drop_path_copy, nullptr, nullptr);
355 WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_id_poll, text_drop_id_copy, nullptr, nullptr);
357 lb, "TEXT_OT_insert", text_drop_string_poll, text_drop_string_copy, nullptr, nullptr);
358}
359
360/* ************* end drop *********** */
361
362/****************** header region ******************/
363
364/* Add handlers, stuff you only do once or on area/region changes. */
365static void text_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
366{
367 ED_region_header_init(region);
368}
369
370static void text_header_region_draw(const bContext *C, ARegion *region)
371{
372 ED_region_header(C, region);
373}
374
375/****************** properties region ******************/
376
377/* Add handlers, stuff you only do once or on area/region changes. */
379{
380 wmKeyMap *keymap;
381
383 ED_region_panels_init(wm, region);
384
385 /* Own keymaps. */
386 keymap = WM_keymap_ensure(wm->runtime->defaultconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
387 WM_event_add_keymap_handler_v2d_mask(&region->runtime->handlers, keymap);
388}
389
390static void text_properties_region_draw(const bContext *C, ARegion *region)
391{
392 ED_region_panels(C, region);
393}
394
395static void text_id_remap(ScrArea * /*area*/,
396 SpaceLink *slink,
397 const blender::bke::id::IDRemapper &mappings)
398{
399 SpaceText *stext = (SpaceText *)slink;
400 mappings.apply(reinterpret_cast<ID **>(&stext->text), ID_REMAP_APPLY_ENSURE_REAL);
401}
402
404{
405 SpaceText *st = reinterpret_cast<SpaceText *>(space_link);
408}
409
411{
412 SpaceText *st = (SpaceText *)sl;
413 st->runtime = MEM_new<SpaceText_Runtime>(__func__);
414}
415
417{
418 BLO_write_struct(writer, SpaceText, sl);
419}
420
421/********************* registration ********************/
422
424{
425 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
426 ARegionType *art;
427
428 st->spaceid = SPACE_TEXT;
429 STRNCPY_UTF8(st->name, "Text");
430
431 st->create = text_create;
432 st->free = text_free;
433 st->init = text_init;
434 st->duplicate = text_duplicate;
435 st->operatortypes = text_operatortypes;
436 st->keymap = text_keymap;
437 st->listener = text_listener;
438 st->context = text_context;
439 st->dropboxes = text_dropboxes;
440 st->id_remap = text_id_remap;
441 st->foreach_id = text_foreach_id;
442 st->blend_read_data = text_space_blend_read_data;
443 st->blend_read_after_liblink = nullptr;
444 st->blend_write = text_space_blend_write;
445
446 /* Regions: main window. */
447 art = MEM_callocN<ARegionType>("spacetype text region");
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<ARegionType>("spacetype text region");
458 art->regionid = RGN_TYPE_UI;
461
465 BLI_addhead(&st->regiontypes, art);
466
467 /* Regions: header. */
468 art = MEM_callocN<ARegionType>("spacetype text region");
470 art->prefsizey = HEADERY;
472
475 BLI_addhead(&st->regiontypes, art);
476
477 /* Regions: footer. */
478 art = MEM_callocN<ARegionType>("spacetype text region");
480 art->prefsizey = HEADERY;
484 BLI_addhead(&st->regiontypes, art);
485
486 BKE_spacetype_register(std::move(st));
487
488 /* Register formatters.
489 * The first registered formatter is default when there is no extension in the ID-name. */
490 ED_text_format_register_py(); /* Keep first (default formatter). */
495}
SpaceText * CTX_wm_space_text(const bContext *C)
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
bool CTX_data_equals(const char *member, const char *str)
bool CTX_data_dir(const char *member)
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
@ CTX_RESULT_MEMBER_NOT_FOUND
@ CTX_RESULT_OK
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_USER_ONE
@ IDWALK_CB_DIRECT_WEAK_LINK
@ ID_REMAP_APPLY_ENSURE_REAL
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
Definition screen.cc:282
ARegion * BKE_area_region_new()
Definition screen.cc:387
#define ATTR_FALLTHROUGH
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:91
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
#define STRNCPY_UTF8(dst, src)
#define ELEM(...)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define HEADERY
@ RGN_ALIGN_BOTTOM
@ RGN_ALIGN_TOP
@ RGN_ALIGN_RIGHT
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_FOOTER
@ RGN_TYPE_HEADER
@ RGN_FLAG_HIDDEN
eFileSel_File_Types
@ FILE_TYPE_TEXT
@ FILE_TYPE_PYSCRIPT
@ SPACE_TEXT
@ ST_FIND_WRAP
@ USER_HEADER_BOTTOM
@ V2D_SCROLL_VERTICAL_HIDE
@ V2D_SCROLL_RIGHT
void ED_area_tag_redraw(ScrArea *area)
Definition area.cc:693
void ED_region_panels(const bContext *C, ARegion *region)
Definition area.cc:3609
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:3935
void ED_region_header_init(ARegion *region)
Definition area.cc:3950
int ED_region_generic_panel_region_snap_size(const ARegion *region, int size, int axis)
Definition area_utils.cc:71
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:3616
@ ED_KEYMAP_UI
Definition ED_screen.hh:758
@ ED_KEYMAP_HEADER
Definition ED_screen.hh:764
@ ED_KEYMAP_VIEW2D
Definition ED_screen.hh:761
@ ED_KEYMAP_FOOTER
Definition ED_screen.hh:765
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
#define UI_COMPACT_PANEL_WIDTH
@ TH_BACK
void UI_ThemeClearColor(int colorid)
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
Definition view2d.cc:221
@ V2D_COMMONVIEW_STANDARD
Definition UI_view2d.hh:33
#define ND_CURSOR
Definition WM_types.hh:490
@ WM_DRAG_PATH
Definition WM_types.hh:1208
@ WM_DRAG_STRING
Definition WM_types.hh:1217
@ WM_DRAG_ID
Definition WM_types.hh:1201
#define ND_DISPLAY
Definition WM_types.hh:491
#define NA_ADDED
Definition WM_types.hh:586
#define NA_EDITED
Definition WM_types.hh:584
#define NC_TEXT
Definition WM_types.hh:386
#define NA_REMOVED
Definition WM_types.hh:587
#define ND_SPACE_TEXT
Definition WM_types.hh:530
#define NC_SPACE
Definition WM_types.hh:392
#define NA_SELECTED
Definition WM_types.hh:589
#define U
BMesh const char void * data
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
static void text_update_edited(bContext *C, Object *obedit, const eEditFontMode mode)
Definition editfont.cc:406
#define str(s)
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
void * MEM_dupallocN(const void *vmemh)
Definition mallocn.cc:143
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
std::string RNA_path_full_ID_py(ID *id)
Definition rna_path.cc:1232
const char * text_context_dir[]
static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
static void text_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void text_header_region_draw(const bContext *C, ARegion *region)
static void text_header_region_init(wmWindowManager *, ARegion *region)
static SpaceLink * text_create(const ScrArea *, const Scene *)
Definition space_text.cc:43
static void text_free(SpaceLink *sl)
Definition space_text.cc:91
static void text_drop_id_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void text_keymap(wmKeyConfig *keyconf)
static void text_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
static void text_properties_region_init(wmWindowManager *wm, ARegion *region)
static void text_operatortypes()
static void text_main_region_init(wmWindowManager *wm, ARegion *region)
static bool text_drop_string_poll(bContext *, wmDrag *drag, const wmEvent *)
void ED_spacetype_text()
static void text_dropboxes()
static SpaceLink * text_duplicate(SpaceLink *sl)
static void text_properties_region_draw(const bContext *C, ARegion *region)
static void text_drop_path_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void text_main_region_draw(const bContext *C, ARegion *region)
static bool text_drop_id_poll(bContext *, wmDrag *drag, const wmEvent *)
static void text_listener(const wmSpaceTypeListenerParams *params)
static void text_drop_string_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void text_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
static void text_init(wmWindowManager *, ScrArea *)
static void text_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static int text_context(const bContext *C, const char *member, bContextDataResult *result)
static bool text_drop_path_poll(bContext *, wmDrag *drag, const wmEvent *)
void(* cursor)(wmWindow *win, ScrArea *area, ARegion *region)
void(* draw)(const bContext *C, ARegion *region)
short event_cursor
int(* snap_size)(const ARegion *region, int size, int axis)
void(* init)(wmWindowManager *wm, ARegion *region)
ARegionRuntimeHandle * runtime
Definition DNA_ID.h:414
void * first
ListBase spacedata
ListBase regionbase
SpaceText_Runtime * runtime
short margin_column
struct Text * text
int xmin
eWM_DragDataType type
Definition WM_types.hh:1331
PointerRNA * ptr
Definition WM_types.hh:1420
int xy[2]
Definition WM_types.hh:761
unsigned int data
Definition WM_types.hh:358
unsigned int action
Definition WM_types.hh:358
unsigned int category
Definition WM_types.hh:358
void * reference
Definition WM_types.hh:360
WindowManagerRuntimeHandle * runtime
struct wmEvent * eventstate
void TEXT_OT_autocomplete(wmOperatorType *ot)
void space_text_drawcache_tag_update(SpaceText *st, const bool full)
Definition text_draw.cc:734
void space_text_free_caches(SpaceText *st)
Definition text_draw.cc:783
void draw_text_main(SpaceText *st, ARegion *region)
void ED_text_format_register_pov()
void ED_text_format_register_pov_ini()
void ED_text_format_register_glsl()
void ED_text_format_register_osl()
void ED_text_format_register_py()
void TEXT_OT_start_find(wmOperatorType *ot)
void TEXT_OT_replace_set_selected(wmOperatorType *ot)
Definition text_ops.cc:3979
void TEXT_OT_unlink(wmOperatorType *ot)
Definition text_ops.cc:643
void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
Definition text_ops.cc:2618
void TEXT_OT_reload(wmOperatorType *ot)
Definition text_ops.cc:581
void TEXT_OT_open(wmOperatorType *ot)
Definition text_ops.cc:491
void TEXT_OT_update_shader(wmOperatorType *ot)
Definition text_ops.cc:4422
void TEXT_OT_replace(wmOperatorType *ot)
Definition text_ops.cc:3905
void TEXT_OT_run_script(wmOperatorType *ot)
Definition text_ops.cc:944
void TEXT_OT_copy(wmOperatorType *ot)
Definition text_ops.cc:1103
void TEXT_OT_select_line(wmOperatorType *ot)
Definition text_ops.cc:1631
void TEXT_OT_new(wmOperatorType *ot)
Definition text_ops.cc:379
void TEXT_OT_indent_or_autocomplete(wmOperatorType *ot)
Definition text_ops.cc:1181
void TEXT_OT_scroll(wmOperatorType *ot)
Definition text_ops.cc:2911
void TEXT_OT_line_break(wmOperatorType *ot)
Definition text_ops.cc:1325
void TEXT_OT_save_as(wmOperatorType *ot)
Definition text_ops.cc:864
void TEXT_OT_paste(wmOperatorType *ot)
Definition text_ops.cc:1009
void TEXT_OT_make_internal(wmOperatorType *ot)
Definition text_ops.cc:679
void TEXT_OT_to_3d_object(wmOperatorType *ot)
Definition text_ops.cc:4307
void TEXT_OT_indent(wmOperatorType *ot)
Definition text_ops.cc:1227
void TEXT_OT_select_all(wmOperatorType *ot)
Definition text_ops.cc:1599
void TEXT_OT_select_word(wmOperatorType *ot)
Definition text_ops.cc:1664
void TEXT_OT_save(wmOperatorType *ot)
Definition text_ops.cc:784
void TEXT_OT_move_lines(wmOperatorType *ot)
Definition text_ops.cc:1702
void TEXT_OT_cursor_set(wmOperatorType *ot)
Definition text_ops.cc:3471
void TEXT_OT_scroll_bar(wmOperatorType *ot)
Definition text_ops.cc:3021
void TEXT_OT_find(wmOperatorType *ot)
Definition text_ops.cc:3836
void TEXT_OT_duplicate_line(wmOperatorType *ot)
Definition text_ops.cc:1057
void TEXT_OT_move_select(wmOperatorType *ot)
Definition text_ops.cc:2399
void TEXT_OT_jump(wmOperatorType *ot)
Definition text_ops.cc:2454
void TEXT_OT_delete(wmOperatorType *ot)
Definition text_ops.cc:2576
void TEXT_OT_selection_set(wmOperatorType *ot)
Definition text_ops.cc:3422
void TEXT_OT_find_set_selected(wmOperatorType *ot)
Definition text_ops.cc:3948
void TEXT_OT_unindent(wmOperatorType *ot)
Definition text_ops.cc:1268
void TEXT_OT_insert(wmOperatorType *ot)
Definition text_ops.cc:3725
void TEXT_OT_comment_toggle(wmOperatorType *ot)
Definition text_ops.cc:1383
void TEXT_OT_jump_to_file_at_point(wmOperatorType *ot)
Definition text_ops.cc:4149
void TEXT_OT_resolve_conflict(wmOperatorType *ot)
Definition text_ops.cc:4270
void TEXT_OT_move(wmOperatorType *ot)
Definition text_ops.cc:2371
void TEXT_OT_line_number(wmOperatorType *ot)
Definition text_ops.cc:3541
void TEXT_OT_convert_whitespace(wmOperatorType *ot)
Definition text_ops.cc:1556
void TEXT_OT_cut(wmOperatorType *ot)
Definition text_ops.cc:1144
void WM_cursor_set(wmWindow *win, int curs)
@ WM_CURSOR_DEFAULT
Definition wm_cursors.hh:15
@ WM_CURSOR_TEXT_EDIT
Definition wm_cursors.hh:16
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *C, wmDrag *drag, const wmEvent *event), void(*copy)(bContext *C, wmDrag *drag, wmDropBox *drop), void(*cancel)(Main *bmain, wmDrag *drag, wmDropBox *drop), WMDropboxTooltipFunc tooltip)
const std::string & WM_drag_get_string(const wmDrag *drag)
int WM_drag_get_path_file_type(const wmDrag *drag)
const char * WM_drag_get_single_path(const wmDrag *drag)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
ID * WM_drag_get_local_ID(const wmDrag *drag, short idcode)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:895
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))