Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include "DNA_text_types.h"
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
#include "text_intern.h"
Go to the source code of this file.
Functions | |
static SpaceLink * | text_new (const bContext *UNUSED(C)) |
static void | text_free (SpaceLink *sl) |
static void | text_init (struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) |
static SpaceLink * | text_duplicate (SpaceLink *sl) |
static void | text_listener (ScrArea *sa, wmNotifier *wmn) |
static void | text_operatortypes (void) |
static void | text_keymap (struct wmKeyConfig *keyconf) |
static int | text_context (const bContext *C, const char *member, bContextDataResult *result) |
static void | text_main_area_init (wmWindowManager *wm, ARegion *ar) |
static void | text_main_area_draw (const bContext *C, ARegion *ar) |
static void | text_cursor (wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar)) |
static int | text_drop_poll (bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) |
static void | text_drop_copy (wmDrag *drag, wmDropBox *drop) |
static void | text_dropboxes (void) |
static void | text_header_area_init (wmWindowManager *UNUSED(wm), ARegion *ar) |
static void | text_header_area_draw (const bContext *C, ARegion *ar) |
static void | text_properties_area_init (wmWindowManager *wm, ARegion *ar) |
static void | text_properties_area_draw (const bContext *C, ARegion *ar) |
void | ED_spacetype_text (void) |
Variables | |
const char * | text_context_dir [] = {"edit_text", NULL} |
Definition in file space_text.c.
void ED_spacetype_text | ( | void | ) |
Definition at line 508 of file space_text.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), SpaceType::context, ARegionType::cursor, ARegionType::draw, SpaceType::dropboxes, SpaceType::duplicate, ED_KEYMAP_HEADER, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, SpaceType::free, HEADERY, ARegionType::init, SpaceType::init, SpaceType::keymap, ARegionType::keymapflag, SpaceType::listener, MEM_callocN(), SpaceType::name, SpaceType::new, SpaceType::operatortypes, ARegionType::prefsizex, ARegionType::prefsizey, ARegionType::regionid, SpaceType::regiontypes, RGN_TYPE_HEADER, RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_TEXT, SpaceType::spaceid, text_context(), text_cursor(), text_dropboxes(), text_duplicate(), text_free(), text_header_area_draw(), text_header_area_init(), text_init(), text_keymap(), text_listener(), text_main_area_draw(), text_main_area_init(), text_new(), text_operatortypes(), text_properties_area_draw(), text_properties_area_init(), and UI_COMPACT_PANEL_WIDTH.
Referenced by ED_spacetypes_init().
static int text_context | ( | const bContext * | C, |
const char * | member, | ||
bContextDataResult * | result | ||
) | [static] |
Definition at line 387 of file space_text.c.
References CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_pointer_set(), CTX_wm_space_text(), Text::id, and SpaceText::text.
Referenced by ED_spacetype_text().
Definition at line 444 of file space_text.c.
References BC_TEXTEDITCURSOR, and WM_cursor_set().
Referenced by ED_spacetype_text().
Definition at line 461 of file space_text.c.
References wmDrag::path, wmDropBox::ptr, and RNA_string_set().
Referenced by text_dropboxes().
Definition at line 453 of file space_text.c.
References ELEM, wmDrag::icon, wmDrag::type, and WM_DRAG_PATH.
Referenced by text_dropboxes().
static void text_dropboxes | ( | void | ) | [static] |
Definition at line 468 of file space_text.c.
References RGN_TYPE_WINDOW, SPACE_TEXT, text_drop_copy(), text_drop_poll(), WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_text().
Definition at line 111 of file space_text.c.
References SpaceText::drawcache, MEM_dupallocN(), and NULL.
Referenced by ED_spacetype_text().
static void text_free | ( | SpaceLink * | sl | ) | [static] |
Definition at line 96 of file space_text.c.
References NULL, SpaceText::text, and text_free_caches().
Referenced by ED_spacetype_text().
Definition at line 487 of file space_text.c.
References ED_region_header().
Referenced by ED_spacetype_text().
static void text_header_area_init | ( | wmWindowManager * | UNUSEDwm, |
ARegion * | ar | ||
) | [static] |
Definition at line 482 of file space_text.c.
References ED_region_header_init().
Referenced by ED_spacetype_text().
static void text_init | ( | struct wmWindowManager * | UNUSEDwm, |
ScrArea * | UNUSEDsa | ||
) | [static] |
Definition at line 106 of file space_text.c.
Referenced by ED_spacetype_text().
static void text_keymap | ( | struct wmKeyConfig * | keyconf | ) | [static] |
Definition at line 233 of file space_text.c.
References AKEY, BACKSPACEKEY, CKEY, DEL_NEXT_CHAR, DEL_NEXT_WORD, DEL_PREV_CHAR, DEL_PREV_WORD, DELKEY, DKEY, DOWNARROWKEY, EKEY, ENDKEY, EVT_TWEAK_L, FALSE, FILE_BOTTOM, FILE_TOP, FKEY, GKEY, HKEY, HOMEKEY, INSERTKEY, JKEY, KM_ALT, KM_ANY, KM_CTRL, KM_DBL_CLICK, KM_OSKEY, KM_PRESS, KM_SHIFT, KM_TEXTINPUT, LEFTARROWKEY, LEFTMOUSE, LINE_BEGIN, LINE_END, MIDDLEMOUSE, MKEY, MOUSEPAN, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, NKEY, OKEY, PADENTER, PADMINUS, PADPLUSKEY, PAGEDOWNKEY, PAGEUPKEY, PKEY, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, wmKeyMapItem::ptr, RETKEY, RIGHTARROWKEY, RIGHTMOUSE, RKEY, RNA_boolean_set(), RNA_enum_set(), RNA_int_set(), RNA_string_set(), SKEY, SPACE_TEXT, TABKEY, TRUE, U, UserDef::uiflag, UPARROWKEY, USER_MMB_PASTE, VKEY, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_keymap_add_item(), WM_keymap_add_menu(), WM_keymap_find(), and XKEY.
Referenced by ED_spacetype_text().
static void text_listener | ( | ScrArea * | sa, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 122 of file space_text.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_area_tag_redraw(), ListBase::first, NA_ADDED, NA_EDITED, NA_REMOVED, NA_SELECTED, NC_SPACE, NC_TEXT, ND_CURSOR, ND_DISPLAY, ND_SPACE_TEXT, wmNotifier::reference, ScrArea::spacedata, SpaceText::text, text_drawcache_tag_update(), text_scroll_to_cursor(), and text_update_edited().
Referenced by ED_spacetype_text().
Definition at line 423 of file space_text.c.
References CTX_wm_space_text(), draw_text_main(), TH_BACK, and UI_ThemeClearColor().
Referenced by ED_spacetype_text().
static void text_main_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 406 of file space_text.c.
References wmWindowManager::defaultconf, ARegion::handlers, View2D::mask, RGN_TYPE_WINDOW, SPACE_TEXT, UI_view2d_region_reinit(), ARegion::v2d, V2D_COMMONVIEW_STANDARD, ARegion::winrct, ARegion::winx, ARegion::winy, WM_dropboxmap_find(), WM_event_add_dropbox_handler(), WM_event_add_keymap_handler_bb(), and WM_keymap_find().
Referenced by ED_spacetype_text().
Definition at line 67 of file space_text.c.
References ARegion::alignment, BLI_addtail(), SpaceText::lheight, SpaceText::margin_column, MEM_callocN(), SpaceText::regionbase, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_TYPE_HEADER, RGN_TYPE_WINDOW, SPACE_TEXT, SpaceText::spacetype, and SpaceText::tabnumber.
Referenced by ED_spacetype_text().
static void text_operatortypes | ( | void | ) | [static] |
Definition at line 175 of file space_text.c.
References TEXT_OT_comment(), TEXT_OT_convert_whitespace(), TEXT_OT_copy(), TEXT_OT_cursor_set(), TEXT_OT_cut(), TEXT_OT_delete(), TEXT_OT_find(), TEXT_OT_find_set_selected(), TEXT_OT_indent(), TEXT_OT_insert(), TEXT_OT_jump(), TEXT_OT_line_break(), TEXT_OT_line_number(), TEXT_OT_make_internal(), TEXT_OT_mark_all(), TEXT_OT_markers_clear(), TEXT_OT_move(), TEXT_OT_move_select(), TEXT_OT_new(), TEXT_OT_next_marker(), TEXT_OT_open(), TEXT_OT_overwrite_toggle(), TEXT_OT_paste(), TEXT_OT_previous_marker(), TEXT_OT_properties(), TEXT_OT_refresh_pyconstraints(), TEXT_OT_reload(), TEXT_OT_replace(), TEXT_OT_replace_set_selected(), TEXT_OT_resolve_conflict(), TEXT_OT_run_script(), TEXT_OT_save(), TEXT_OT_save_as(), TEXT_OT_scroll(), TEXT_OT_scroll_bar(), TEXT_OT_select_all(), TEXT_OT_select_line(), TEXT_OT_select_word(), TEXT_OT_selection_set(), TEXT_OT_to_3d_object(), TEXT_OT_uncomment(), TEXT_OT_unindent(), TEXT_OT_unlink(), and WM_operatortype_append().
Referenced by ED_spacetype_text().
Definition at line 500 of file space_text.c.
References ED_region_panels(), and NULL.
Referenced by ED_spacetype_text().
static void text_properties_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 495 of file space_text.c.
References ED_region_panels_init().
Referenced by ED_spacetype_text().
const char* text_context_dir[] = {"edit_text", NULL} |
Definition at line 385 of file space_text.c.