Blender V5.0
space_text.cc File Reference
#include <cstring>
#include "DNA_text_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_string_utf8.h"
#include "BKE_context.hh"
#include "BKE_lib_query.hh"
#include "BKE_lib_remap.hh"
#include "BKE_screen.hh"
#include "ED_screen.hh"
#include "ED_space_api.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "BLO_read_write.hh"
#include "RNA_access.hh"
#include "RNA_path.hh"
#include "text_format.hh"
#include "text_intern.hh"

Go to the source code of this file.

Functions

static SpaceLinktext_create (const ScrArea *, const Scene *)
static void text_free (SpaceLink *sl)
static void text_init (wmWindowManager *, ScrArea *)
static SpaceLinktext_duplicate (SpaceLink *sl)
static void text_listener (const wmSpaceTypeListenerParams *params)
static void text_operatortypes ()
static void text_keymap (wmKeyConfig *keyconf)
static int text_context (const bContext *C, const char *member, bContextDataResult *result)
static void text_main_region_init (wmWindowManager *wm, ARegion *region)
static void text_main_region_draw (const bContext *C, ARegion *region)
static void text_cursor (wmWindow *win, ScrArea *area, ARegion *region)
static bool text_drop_path_poll (bContext *, wmDrag *drag, const wmEvent *)
static void text_drop_path_copy (bContext *, wmDrag *drag, wmDropBox *drop)
static bool text_drop_id_poll (bContext *, wmDrag *drag, const wmEvent *)
static void text_drop_id_copy (bContext *, wmDrag *drag, wmDropBox *drop)
static bool text_drop_string_poll (bContext *, wmDrag *drag, const wmEvent *)
static void text_drop_string_copy (bContext *, wmDrag *drag, wmDropBox *drop)
static void text_dropboxes ()
static void text_header_region_init (wmWindowManager *, ARegion *region)
static void text_header_region_draw (const bContext *C, ARegion *region)
static void text_properties_region_init (wmWindowManager *wm, ARegion *region)
static void text_properties_region_draw (const bContext *C, ARegion *region)
static void text_id_remap (ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static void text_foreach_id (SpaceLink *space_link, LibraryForeachIDData *data)
static void text_space_blend_read_data (BlendDataReader *, SpaceLink *sl)
static void text_space_blend_write (BlendWriter *writer, SpaceLink *sl)
void ED_spacetype_text ()

Variables

const char * text_context_dir [] = {"edit_text", nullptr}

Function Documentation

◆ ED_spacetype_text()

◆ text_context()

◆ text_create()

◆ text_cursor()

◆ text_drop_id_copy()

void text_drop_id_copy ( bContext * ,
wmDrag * drag,
wmDropBox * drop )
static

Definition at line 329 of file space_text.cc.

References wmDropBox::ptr, RNA_path_full_ID_py(), RNA_string_set(), and WM_drag_get_local_ID().

Referenced by text_dropboxes().

◆ text_drop_id_poll()

bool text_drop_id_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

Definition at line 324 of file space_text.cc.

References wmDrag::type, and WM_DRAG_ID.

Referenced by text_dropboxes().

◆ text_drop_path_copy()

void text_drop_path_copy ( bContext * ,
wmDrag * drag,
wmDropBox * drop )
static

Definition at line 318 of file space_text.cc.

References wmDropBox::ptr, RNA_string_set(), and WM_drag_get_single_path().

Referenced by text_dropboxes().

◆ text_drop_path_poll()

bool text_drop_path_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

◆ text_drop_string_copy()

void text_drop_string_copy ( bContext * ,
wmDrag * drag,
wmDropBox * drop )
static

Definition at line 343 of file space_text.cc.

References wmDropBox::ptr, RNA_string_set(), str, and WM_drag_get_string().

Referenced by text_dropboxes().

◆ text_drop_string_poll()

bool text_drop_string_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

Definition at line 338 of file space_text.cc.

References wmDrag::type, and WM_DRAG_STRING.

Referenced by text_dropboxes().

◆ text_dropboxes()

◆ text_duplicate()

SpaceLink * text_duplicate ( SpaceLink * sl)
static

Definition at line 102 of file space_text.cc.

References MEM_dupallocN(), and SpaceText::runtime.

Referenced by ED_spacetype_text().

◆ text_foreach_id()

void text_foreach_id ( SpaceLink * space_link,
LibraryForeachIDData * data )
static

◆ text_free()

◆ text_header_region_draw()

void text_header_region_draw ( const bContext * C,
ARegion * region )
static

Definition at line 370 of file space_text.cc.

References C, and ED_region_header().

Referenced by ED_spacetype_text().

◆ text_header_region_init()

void text_header_region_init ( wmWindowManager * ,
ARegion * region )
static

Definition at line 365 of file space_text.cc.

References ED_region_header_init().

Referenced by ED_spacetype_text().

◆ text_id_remap()

void text_id_remap ( ScrArea * ,
SpaceLink * slink,
const blender::bke::id::IDRemapper & mappings )
static

◆ text_init()

void text_init ( wmWindowManager * ,
ScrArea *  )
static

Definition at line 100 of file space_text.cc.

Referenced by ED_spacetype_text().

◆ text_keymap()

void text_keymap ( wmKeyConfig * keyconf)
static

Definition at line 220 of file space_text.cc.

References RGN_TYPE_WINDOW, SPACE_TEXT, and WM_keymap_ensure().

Referenced by ED_spacetype_text().

◆ text_listener()

◆ text_main_region_draw()

void text_main_region_draw ( const bContext * C,
ARegion * region )
static

Definition at line 270 of file space_text.cc.

References C, CTX_wm_space_text(), draw_text_main(), TH_BACK, and UI_ThemeClearColor().

Referenced by ED_spacetype_text().

◆ text_main_region_init()

◆ text_operatortypes()

◆ text_properties_region_draw()

void text_properties_region_draw ( const bContext * C,
ARegion * region )
static

Definition at line 390 of file space_text.cc.

References C, and ED_region_panels().

Referenced by ED_spacetype_text().

◆ text_properties_region_init()

◆ text_space_blend_read_data()

void text_space_blend_read_data ( BlendDataReader * ,
SpaceLink * sl )
static

Definition at line 410 of file space_text.cc.

References SpaceText::runtime.

Referenced by ED_spacetype_text().

◆ text_space_blend_write()

void text_space_blend_write ( BlendWriter * writer,
SpaceLink * sl )
static

Definition at line 416 of file space_text.cc.

References BLO_write_struct.

Referenced by ED_spacetype_text().

Variable Documentation

◆ text_context_dir

const char* text_context_dir[] = {"edit_text", nullptr}

Definition at line 226 of file space_text.cc.

Referenced by bpy_context_members(), and text_context().