Blender V4.3
space_text.cc File Reference
#include <cstring>
#include "DNA_text_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.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()

static int text_context ( const bContext * C,
const char * member,
bContextDataResult * result )
static

◆ text_create()

◆ text_cursor()

static void text_cursor ( wmWindow * win,
ScrArea * area,
ARegion * region )
static

◆ text_drop_id_copy()

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

Definition at line 327 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()

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

Definition at line 322 of file space_text.cc.

References wmDrag::type, and WM_DRAG_ID.

Referenced by text_dropboxes().

◆ text_drop_path_copy()

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

Definition at line 316 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()

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

◆ text_drop_string_copy()

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

Definition at line 341 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()

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

Definition at line 336 of file space_text.cc.

References wmDrag::type, and WM_DRAG_STRING.

Referenced by text_dropboxes().

◆ text_dropboxes()

◆ text_duplicate()

static SpaceLink * text_duplicate ( SpaceLink * sl)
static

Definition at line 101 of file space_text.cc.

References MEM_dupallocN, and SpaceText::runtime.

Referenced by ED_spacetype_text().

◆ text_foreach_id()

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

◆ text_free()

◆ text_header_region_draw()

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

Definition at line 368 of file space_text.cc.

References ED_region_header().

Referenced by ED_spacetype_text().

◆ text_header_region_init()

static void text_header_region_init ( wmWindowManager * ,
ARegion * region )
static

Definition at line 363 of file space_text.cc.

References ED_region_header_init().

Referenced by ED_spacetype_text().

◆ text_id_remap()

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

◆ text_init()

static void text_init ( wmWindowManager * ,
ScrArea *  )
static

Definition at line 99 of file space_text.cc.

Referenced by ED_spacetype_text().

◆ text_keymap()

static void text_keymap ( wmKeyConfig * keyconf)
static

Definition at line 218 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()

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

Definition at line 268 of file space_text.cc.

References 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()

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

Definition at line 388 of file space_text.cc.

References ED_region_panels().

Referenced by ED_spacetype_text().

◆ text_properties_region_init()

◆ text_space_blend_read_data()

static void text_space_blend_read_data ( BlendDataReader * ,
SpaceLink * sl )
static

Definition at line 408 of file space_text.cc.

References SpaceText::runtime.

Referenced by ED_spacetype_text().

◆ text_space_blend_write()

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

Definition at line 414 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 224 of file space_text.cc.

Referenced by text_context().