49 sconsole = MEM_new<SpaceConsole>(
"initconsole");
54 sconsole->
runtime = MEM_new<SpaceConsole_Runtime>(__func__);
80 return reinterpret_cast<SpaceLink *
>(sconsole);
110 sconsolen->
history.clear_no_delete();
113 sconsolen->
runtime = MEM_new<SpaceConsole_Runtime>(__func__);
115 return reinterpret_cast<SpaceLink *
>(sconsolen);
122 ListBaseT<wmDropBox> *lb;
124 const float prev_y_min = region->
v2d.
cur.
ymin;
132 region->
v2d.
cur.
ymax = prev_y_min + cur_y_range;
224static std::optional<ARegionIMECursorState> console_main_region_cursor_ime(
225 wmWindow * ,
const ScrArea *area,
const ARegion *region, ARegionIMECursor *r_cursor)
234 if (line_height == 0) {
242 sc, region, cl->cursor);
247 const int2 xy = {xy_region->x, xy_region->y - int(region->v2d.cur.ymin)};
255 .ymax = xy.
y + line_height,
258 r_cursor->font_size = int(0.8f *
float(line_height));
370 sconsole->
runtime = MEM_new<SpaceConsole_Runtime>(__func__);
379 if (
BLO_read_array(reader, &cl.line,
size_t(cl.len) + 1) && cl.line) {
381 cl.len_alloc = cl.len + 1;
400 struct_writer.shallow_data.runtime =
nullptr;
406 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
434 art->
cursor_ime = console_main_region_cursor_ime;
#define SNPRINTF(dst, format,...)
#define STRNCPY_UTF8(dst, src)
#define BLO_read_struct_list(reader, struct_name, list)
Read Blender memory allocation and freeing.
void frame_buffer_clear(int colorid)
void view2d_view_ortho(const View2D *v2d)
void view2d_view_restore(const bContext *C)
char char view2d_mouse_in_scrollers(const ARegion *region, const View2D *v2d, const int xy[2]) ATTR_NONNULL(1
void view2d_scrollers_draw(View2D *v2d, const rcti *mask_custom)
void CONSOLE_OT_history_cycle(wmOperatorType *ot)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
const char * WM_drag_get_single_path(const wmDrag *drag)
wmDropBox * WM_dropbox_add(ListBaseT< wmDropBox > *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)
static void console_header_region_draw(const bContext *C, ARegion *region)
void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
SpaceConsole * CTX_wm_space_console(const bContext *C)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static void console_header_region_init(wmWindowManager *, ARegion *region)
void CONSOLE_OT_paste(wmOperatorType *ot)
static void console_drop_id_copy(bContext *, wmDrag *drag, wmDropBox *drop)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void CONSOLE_OT_select_set(wmOperatorType *ot)
static void console_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void console_drop_string_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static bool console_drop_string_poll(bContext *, wmDrag *drag, const wmEvent *)
void CONSOLE_OT_select_all(wmOperatorType *ot)
ConsoleLine * console_history_verify(const bContext *C)
static bool console_drop_path_poll(bContext *, wmDrag *drag, const wmEvent *)
void ED_spacetype_console()
static SpaceLink * console_create(const ScrArea *, const Scene *)
void ED_region_tag_redraw(ARegion *region)
void CONSOLE_OT_select_word(wmOperatorType *ot)
static void console_keymap(wmKeyConfig *keyconf)
void CONSOLE_OT_copy(wmOperatorType *ot)
static void console_cursor(wmWindow *win, ScrArea *, ARegion *region)
void CONSOLE_OT_unindent(wmOperatorType *ot)
void CONSOLE_OT_clear_line(wmOperatorType *ot)
static void console_init(wmWindowManager *, ScrArea *)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBaseT< wmEventHandler > *handlers, ListBaseT< wmDropBox > *dropboxes)
VecBase< int32_t, 2 > int2
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
std::optional< blender::int2 > console_cursor_region_xy_get(const SpaceConsole *sc, const ARegion *region, const int offset)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap)
std::string RNA_path_full_ID_py(ID *id)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
static void console_free(SpaceLink *sl)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void CONSOLE_OT_history_append(wmOperatorType *ot)
void console_history_free(SpaceConsole *sc, ConsoleLine *cl)
void CONSOLE_OT_indent(wmOperatorType *ot)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void console_textview_update_rect(SpaceConsole *sc, ARegion *region)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap)
static void console_main_region_listener(const wmRegionListenerParams *params)
ARegion * BKE_area_region_new()
static SpaceLink * console_duplicate(SpaceLink *sl)
bool BLO_read_array(BlendDataReader *reader, T **ptr_p, const SizeT array_size, const int elems=1)
static bool console_drop_id_poll(bContext *, wmDrag *drag, const wmEvent *)
void CONSOLE_OT_clear(wmOperatorType *ot)
void CONSOLE_OT_indent_or_autocomplete(wmOperatorType *ot)
@ V2D_SCROLL_VERTICAL_HIDE
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
void CONSOLE_OT_move(wmOperatorType *ot)
void ED_region_header_init(ARegion *region)
void CONSOLE_OT_insert(wmOperatorType *ot)
static void console_drop_path_copy(bContext *, wmDrag *drag, wmDropBox *drop)
static void console_blend_read_data(BlendDataReader *reader, SpaceLink *sl)
void console_textview_main(SpaceConsole *sc, const ARegion *region)
void WM_cursor_set(wmWindow *win, int curs)
static void console_dropboxes()
std::string WM_drag_get_string_firstline(const wmDrag *drag)
ID * WM_drag_get_local_ID(const wmDrag *drag, short idcode)
ListBaseT< wmDropBox > * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl)
void ED_region_header(const bContext *C, ARegion *region)
static void console_main_region_init(wmWindowManager *wm, ARegion *region)
static void console_main_region_draw(const bContext *C, ARegion *region)
static void console_operatortypes()
void CONSOLE_OT_delete(wmOperatorType *ot)
void(*) cursor(wmWindow *win, ScrArea *area, ARegion *region)
void(*) draw(const bContext *C, ARegion *region)
void(*) listener(const wmRegionListenerParams *params)
std::optional< ARegionIMECursorState >(*) cursor_ime(wmWindow *win, const ScrArea *area, const ARegion *region, ARegionIMECursor *r_cursor)
void(*) init(wmWindowManager *wm, ARegion *region)
bke::ARegionRuntime * runtime
eRegion_Alignment alignment
void write_char_array(int64_t num, const char *data)
void write_struct_cast(const void *data, BlendStructWriterTypedFn< T > fn=nullptr)
void write_struct(const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
ListBaseT< SpaceLink > spacedata
ListBaseT< ARegion > regionbase
ListBaseT< ConsoleLine > scrollback
SpaceConsole_Runtime * runtime
ListBaseT< ConsoleLine > history
eView2D_KeepZoom keepzoom
ListBaseT< wmEventHandler > handlers
const wmNotifier * notifier
bke::WindowRuntime * runtime