Blender V4.3
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
9#include <cstring>
10
11#include "DNA_text_types.h"
12
13#include "MEM_guardedalloc.h"
14
15#include "BLI_blenlib.h"
16
17#include "BKE_context.hh"
18#include "BKE_lib_query.hh"
19#include "BKE_lib_remap.hh"
20#include "BKE_screen.hh"
21
22#include "ED_screen.hh"
23#include "ED_space_api.hh"
24
25#include "WM_api.hh"
26#include "WM_types.hh"
27
28#include "UI_interface.hh"
29#include "UI_resources.hh"
30#include "UI_view2d.hh"
31
32#include "BLO_read_write.hh"
33
34#include "RNA_access.hh"
35#include "RNA_path.hh"
36
37#include "text_format.hh"
38#include "text_intern.hh" /* own include */
39
40/* ******************** default callbacks for text space ***************** */
41
42static SpaceLink *text_create(const ScrArea * /*area*/, const Scene * /*scene*/)
43{
44 ARegion *region;
45 SpaceText *stext;
46
47 stext = static_cast<SpaceText *>(MEM_callocN(sizeof(SpaceText), "inittext"));
48 stext->spacetype = SPACE_TEXT;
49
50 stext->lheight = 12;
51 stext->tabnumber = 4;
52 stext->margin_column = 80;
53 stext->showsyntax = true;
54 stext->showlinenrs = true;
55 stext->flags |= ST_FIND_WRAP;
56
57 stext->runtime = MEM_new<SpaceText_Runtime>(__func__);
58
59 /* header */
60 region = static_cast<ARegion *>(MEM_callocN(sizeof(ARegion), "header for text"));
61
62 BLI_addtail(&stext->regionbase, region);
63 region->regiontype = RGN_TYPE_HEADER;
64 region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP;
65
66 /* footer */
67 region = static_cast<ARegion *>(MEM_callocN(sizeof(ARegion), "footer for text"));
68 BLI_addtail(&stext->regionbase, region);
69 region->regiontype = RGN_TYPE_FOOTER;
70 region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM;
71
72 /* properties region */
73 region = static_cast<ARegion *>(MEM_callocN(sizeof(ARegion), "properties region for text"));
74
75 BLI_addtail(&stext->regionbase, region);
76 region->regiontype = RGN_TYPE_UI;
77 region->alignment = RGN_ALIGN_RIGHT;
78 region->flag = RGN_FLAG_HIDDEN;
79
80 /* main region */
81 region = static_cast<ARegion *>(MEM_callocN(sizeof(ARegion), "main region for text"));
82
83 BLI_addtail(&stext->regionbase, region);
84 region->regiontype = RGN_TYPE_WINDOW;
85
86 return (SpaceLink *)stext;
87}
88
89/* Doesn't free the space-link itself. */
90static void text_free(SpaceLink *sl)
91{
92 SpaceText *stext = (SpaceText *)sl;
94 MEM_delete(stext->runtime);
95 stext->text = nullptr;
96}
97
98/* spacetype; init callback */
99static void text_init(wmWindowManager * /*wm*/, ScrArea * /*area*/) {}
100
102{
103 SpaceText *stextn = static_cast<SpaceText *>(MEM_dupallocN(sl));
104
105 /* Add its own runtime data. */
106 stextn->runtime = MEM_new<SpaceText_Runtime>(__func__);
107
108 return (SpaceLink *)stextn;
109}
110
112{
113 ScrArea *area = params->area;
114 const wmNotifier *wmn = params->notifier;
115 SpaceText *st = static_cast<SpaceText *>(area->spacedata.first);
116
117 /* context changes */
118 switch (wmn->category) {
119 case NC_TEXT:
120 /* check if active text was changed, no need to redraw if text isn't active
121 * (reference == nullptr) means text was unlinked, should update anyway for this
122 * case -- no way to know was text active before unlinking or not */
123 if (wmn->reference && wmn->reference != st->text) {
124 break;
125 }
126
127 switch (wmn->data) {
128 case ND_DISPLAY:
129 case ND_CURSOR:
130 ED_area_tag_redraw(area);
131 break;
132 }
133
134 switch (wmn->action) {
135 case NA_EDITED:
136 if (st->text) {
139 }
140
141 ED_area_tag_redraw(area);
142 ATTR_FALLTHROUGH; /* fall down to tag redraw */
143 case NA_ADDED:
144 case NA_REMOVED:
145 case NA_SELECTED:
146 ED_area_tag_redraw(area);
147 break;
148 }
149
150 break;
151 case NC_SPACE:
152 if (wmn->data == ND_SPACE_TEXT) {
153 ED_area_tag_redraw(area);
154 }
155 break;
156 }
157}
158
160{
170
175
181
185
187
193
199
202
207
210
212
214
216}
217
218static void text_keymap(wmKeyConfig *keyconf)
219{
220 WM_keymap_ensure(keyconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
222}
223
224const char *text_context_dir[] = {"edit_text", nullptr};
225
226static int /*eContextResult*/ text_context(const bContext *C,
227 const char *member,
228 bContextDataResult *result)
229{
231
232 if (CTX_data_dir(member)) {
234 return CTX_RESULT_OK;
235 }
236 if (CTX_data_equals(member, "edit_text")) {
237 if (st->text != nullptr) {
238 CTX_data_id_pointer_set(result, &st->text->id);
239 }
240 return CTX_RESULT_OK;
241 }
242
244}
245
246/********************* main region ********************/
247
248/* add handlers, stuff you only do once or on area/region changes */
250{
251 wmKeyMap *keymap;
252 ListBase *lb;
253
254 UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
255
256 /* own keymap */
257 keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
258 WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
260 WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
261
262 /* add drop boxes */
264
265 WM_event_add_dropbox_handler(&region->handlers, lb);
266}
267
268static void text_main_region_draw(const bContext *C, ARegion *region)
269{
270 /* draw entirely, view changes should be handled here */
272 // View2D *v2d = &region->v2d;
273
274 /* clear and setup matrix */
276
277 // UI_view2d_view_ortho(v2d);
278
279 /* data... */
280 draw_text_main(st, region);
281
282 /* reset view matrix */
283 // UI_view2d_view_restore(C);
284
285 /* scrollers? */
286}
287
288static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region)
289{
290 SpaceText *st = static_cast<SpaceText *>(area->spacedata.first);
291 int wmcursor = WM_CURSOR_TEXT_EDIT;
292
293 if (st->text && BLI_rcti_isect_pt(&st->runtime->scroll_region_handle,
294 win->eventstate->xy[0] - region->winrct.xmin,
295 st->runtime->scroll_region_handle.ymin))
296 {
297 wmcursor = WM_CURSOR_DEFAULT;
298 }
299
300 WM_cursor_set(win, wmcursor);
301}
302
303/* ************* dropboxes ************* */
304
305static bool text_drop_path_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
306{
307 if (drag->type == WM_DRAG_PATH) {
309 if (ELEM(file_type, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT)) {
310 return true;
311 }
312 }
313 return false;
314}
315
316static void text_drop_path_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
317{
318 /* copy drag path to properties */
319 RNA_string_set(drop->ptr, "filepath", WM_drag_get_single_path(drag));
320}
321
322static bool text_drop_id_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
323{
324 return (drag->type == WM_DRAG_ID);
325}
326
327static void text_drop_id_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
328{
329 ID *id = WM_drag_get_local_ID(drag, 0);
330
331 /* copy drag path to properties */
332 std::string text = RNA_path_full_ID_py(id);
333 RNA_string_set(drop->ptr, "text", text.c_str());
334}
335
336static bool text_drop_string_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
337{
338 return (drag->type == WM_DRAG_STRING);
339}
340
341static void text_drop_string_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
342{
343 const std::string &str = WM_drag_get_string(drag);
344 RNA_string_set(drop->ptr, "text", str.c_str());
345}
346
347/* this region dropbox definition */
348static void text_dropboxes()
349{
351
352 WM_dropbox_add(lb, "TEXT_OT_open", text_drop_path_poll, text_drop_path_copy, nullptr, nullptr);
353 WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_id_poll, text_drop_id_copy, nullptr, nullptr);
355 lb, "TEXT_OT_insert", text_drop_string_poll, text_drop_string_copy, nullptr, nullptr);
356}
357
358/* ************* end drop *********** */
359
360/****************** header region ******************/
361
362/* add handlers, stuff you only do once or on area/region changes */
363static void text_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
364{
365 ED_region_header_init(region);
366}
367
368static void text_header_region_draw(const bContext *C, ARegion *region)
369{
370 ED_region_header(C, region);
371}
372
373/****************** properties region ******************/
374
375/* add handlers, stuff you only do once or on area/region changes */
377{
378 wmKeyMap *keymap;
379
380 region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;
381 ED_region_panels_init(wm, region);
382
383 /* own keymaps */
384 keymap = WM_keymap_ensure(wm->defaultconf, "Text Generic", SPACE_TEXT, RGN_TYPE_WINDOW);
385 WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
386}
387
388static void text_properties_region_draw(const bContext *C, ARegion *region)
389{
390 ED_region_panels(C, region);
391}
392
393static void text_id_remap(ScrArea * /*area*/,
394 SpaceLink *slink,
395 const blender::bke::id::IDRemapper &mappings)
396{
397 SpaceText *stext = (SpaceText *)slink;
398 mappings.apply(reinterpret_cast<ID **>(&stext->text), ID_REMAP_APPLY_ENSURE_REAL);
399}
400
401static void text_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
402{
403 SpaceText *st = reinterpret_cast<SpaceText *>(space_link);
406}
407
409{
410 SpaceText *st = (SpaceText *)sl;
411 st->runtime = MEM_new<SpaceText_Runtime>(__func__);
412}
413
415{
416 BLO_write_struct(writer, SpaceText, sl);
417}
418
419/********************* registration ********************/
420
422{
423 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
424 ARegionType *art;
425
426 st->spaceid = SPACE_TEXT;
427 STRNCPY(st->name, "Text");
428
429 st->create = text_create;
430 st->free = text_free;
431 st->init = text_init;
432 st->duplicate = text_duplicate;
433 st->operatortypes = text_operatortypes;
434 st->keymap = text_keymap;
435 st->listener = text_listener;
436 st->context = text_context;
437 st->dropboxes = text_dropboxes;
438 st->id_remap = text_id_remap;
439 st->foreach_id = text_foreach_id;
440 st->blend_read_data = text_space_blend_read_data;
441 st->blend_read_after_liblink = nullptr;
442 st->blend_write = text_space_blend_write;
443
444 /* regions: main window */
445 art = static_cast<ARegionType *>(MEM_callocN(sizeof(ARegionType), "spacetype text region"));
449 art->cursor = text_cursor;
450 art->event_cursor = true;
451
452 BLI_addhead(&st->regiontypes, art);
453
454 /* regions: properties */
455 art = static_cast<ARegionType *>(MEM_callocN(sizeof(ARegionType), "spacetype text region"));
456 art->regionid = RGN_TYPE_UI;
459
462 BLI_addhead(&st->regiontypes, art);
463
464 /* regions: header */
465 art = static_cast<ARegionType *>(MEM_callocN(sizeof(ARegionType), "spacetype text region"));
467 art->prefsizey = HEADERY;
469
472 BLI_addhead(&st->regiontypes, art);
473
474 /* regions: footer */
475 art = static_cast<ARegionType *>(MEM_callocN(sizeof(ARegionType), "spacetype text region"));
477 art->prefsizey = HEADERY;
481 BLI_addhead(&st->regiontypes, art);
482
483 BKE_spacetype_register(std::move(st));
484
485 /* Register formatters.
486 * The first registered formatter is default when there is no extension in the ID-name. */
487 ED_text_format_register_py(); /* Keep first (default formatter). */
492}
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:268
#define ATTR_FALLTHROUGH
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:90
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:110
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
#define STRNCPY(dst, src)
Definition BLI_string.h:593
#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:708
void ED_region_panels(const bContext *C, ARegion *region)
Definition area.cc:3336
void ED_region_header(const bContext *C, ARegion *region)
Definition area.cc:3646
void ED_region_header_init(ARegion *region)
Definition area.cc:3661
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
Definition area.cc:3343
@ ED_KEYMAP_UI
Definition ED_screen.hh:725
@ ED_KEYMAP_HEADER
Definition ED_screen.hh:731
@ ED_KEYMAP_VIEW2D
Definition ED_screen.hh:728
@ ED_KEYMAP_FOOTER
Definition ED_screen.hh:732
Read Guarded memory(de)allocation.
#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:212
@ V2D_COMMONVIEW_STANDARD
Definition UI_view2d.hh:33
#define ND_CURSOR
Definition WM_types.hh:457
#define ND_DISPLAY
Definition WM_types.hh:458
#define NA_ADDED
Definition WM_types.hh:552
#define NA_EDITED
Definition WM_types.hh:550
#define NC_TEXT
Definition WM_types.hh:353
#define NA_REMOVED
Definition WM_types.hh:553
@ WM_DRAG_PATH
Definition WM_types.hh:1160
@ WM_DRAG_STRING
Definition WM_types.hh:1169
@ WM_DRAG_ID
Definition WM_types.hh:1153
#define ND_SPACE_TEXT
Definition WM_types.hh:496
#define NC_SPACE
Definition WM_types.hh:359
#define NA_SELECTED
Definition WM_types.hh:555
unsigned int U
Definition btGjkEpa3.h:78
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:400
#define str(s)
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void *(* MEM_callocN)(size_t len, const char *str)
Definition mallocn.cc:42
void *(* MEM_dupallocN)(const void *vmemh)
Definition mallocn.cc:39
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:1225
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:42
static void text_free(SpaceLink *sl)
Definition space_text.cc:90
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 *)
Definition space_text.cc:99
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
void(* init)(wmWindowManager *wm, ARegion *region)
Definition DNA_ID.h:413
ListBase regionbase
SpaceText_Runtime * runtime
struct Text * text
eWM_DragDataType type
Definition WM_types.hh:1282
PointerRNA * ptr
Definition WM_types.hh:1368
int xy[2]
Definition WM_types.hh:726
unsigned int data
Definition WM_types.hh:325
unsigned int action
Definition WM_types.hh:325
unsigned int category
Definition WM_types.hh:325
void * reference
Definition WM_types.hh:327
struct wmKeyConfig * defaultconf
struct wmEvent * eventstate
void TEXT_OT_autocomplete(wmOperatorType *ot)
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:4000
void space_text_drawcache_tag_update(SpaceText *st, bool full)
void TEXT_OT_unlink(wmOperatorType *ot)
Definition text_ops.cc:616
void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
Definition text_ops.cc:2648
void TEXT_OT_reload(wmOperatorType *ot)
Definition text_ops.cc:554
void TEXT_OT_open(wmOperatorType *ot)
Definition text_ops.cc:464
void TEXT_OT_replace(wmOperatorType *ot)
Definition text_ops.cc:3926
void TEXT_OT_run_script(wmOperatorType *ot)
Definition text_ops.cc:907
void space_text_free_caches(SpaceText *st)
void TEXT_OT_copy(wmOperatorType *ot)
Definition text_ops.cc:1131
void TEXT_OT_select_line(wmOperatorType *ot)
Definition text_ops.cc:1659
void draw_text_main(SpaceText *st, ARegion *region)
void TEXT_OT_new(wmOperatorType *ot)
Definition text_ops.cc:364
void TEXT_OT_indent_or_autocomplete(wmOperatorType *ot)
Definition text_ops.cc:1207
void TEXT_OT_scroll(wmOperatorType *ot)
Definition text_ops.cc:2937
void TEXT_OT_line_break(wmOperatorType *ot)
Definition text_ops.cc:1351
void TEXT_OT_save_as(wmOperatorType *ot)
Definition text_ops.cc:827
void TEXT_OT_paste(wmOperatorType *ot)
Definition text_ops.cc:1037
void TEXT_OT_make_internal(wmOperatorType *ot)
Definition text_ops.cc:652
void TEXT_OT_to_3d_object(wmOperatorType *ot)
Definition text_ops.cc:4321
void TEXT_OT_indent(wmOperatorType *ot)
Definition text_ops.cc:1253
void TEXT_OT_select_all(wmOperatorType *ot)
Definition text_ops.cc:1627
void TEXT_OT_select_word(wmOperatorType *ot)
Definition text_ops.cc:1692
void TEXT_OT_save(wmOperatorType *ot)
Definition text_ops.cc:756
void TEXT_OT_move_lines(wmOperatorType *ot)
Definition text_ops.cc:1730
void TEXT_OT_cursor_set(wmOperatorType *ot)
Definition text_ops.cc:3494
void TEXT_OT_scroll_bar(wmOperatorType *ot)
Definition text_ops.cc:3047
void TEXT_OT_find(wmOperatorType *ot)
Definition text_ops.cc:3857
void TEXT_OT_duplicate_line(wmOperatorType *ot)
Definition text_ops.cc:1085
void TEXT_OT_move_select(wmOperatorType *ot)
Definition text_ops.cc:2429
void TEXT_OT_jump(wmOperatorType *ot)
Definition text_ops.cc:2484
void TEXT_OT_delete(wmOperatorType *ot)
Definition text_ops.cc:2606
void TEXT_OT_selection_set(wmOperatorType *ot)
Definition text_ops.cc:3445
void TEXT_OT_find_set_selected(wmOperatorType *ot)
Definition text_ops.cc:3969
void TEXT_OT_unindent(wmOperatorType *ot)
Definition text_ops.cc:1294
void TEXT_OT_insert(wmOperatorType *ot)
Definition text_ops.cc:3746
void TEXT_OT_comment_toggle(wmOperatorType *ot)
Definition text_ops.cc:1409
void TEXT_OT_jump_to_file_at_point(wmOperatorType *ot)
Definition text_ops.cc:4148
void TEXT_OT_resolve_conflict(wmOperatorType *ot)
Definition text_ops.cc:4284
void TEXT_OT_move(wmOperatorType *ot)
Definition text_ops.cc:2401
void TEXT_OT_line_number(wmOperatorType *ot)
Definition text_ops.cc:3562
void TEXT_OT_convert_whitespace(wmOperatorType *ot)
Definition text_ops.cc:1584
void TEXT_OT_cut(wmOperatorType *ot)
Definition text_ops.cc:1172
void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
Definition text_ops.cc:975
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:897
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))