181 msg_sub_value_region_tag_redraw.
owner = region;
182 msg_sub_value_region_tag_redraw.
user_data = region;
186 mbus, &workspace->
id, workspace,
WorkSpace, tools, &msg_sub_value_region_tag_redraw);
193 const bool is_menu_search =
CTX_data_int_get(
C,
"is_menu_search").value_or(
false);
194 if (is_menu_search) {
198 const int limit = std::min<int>(
U.recent_files, 20);
202 "WM_OT_search_single_menu",
IFACE_(
"More..."), ICON_VIEWZOOM);
203 RNA_string_set(&search_props,
"menu_idname",
"TOPBAR_MT_file_open_recent");
204 layout->
op(
"WM_OT_clear_recent_files",
IFACE_(
"Clear Recent Files List..."), ICON_TRASH);
207 layout->
label(
IFACE_(
"No Recent Files"), ICON_NONE);
227 if (wm->
runtime->undo_stack ==
nullptr) {
231 int undo_step_count = 0;
232 int undo_step_count_all = 0;
234 undo_step_count_all += 1;
238 undo_step_count += 1;
244 const int col_size = 20 + (undo_step_count / 12);
249 int i = undo_step_count_all - 1;
256 if (!(undo_step_count % col_size)) {
257 column = &
split->column(
false);
259 const bool is_active = (us == wm->
runtime->undo_stack->step_active);
264 is_active ? ICON_LAYER_ACTIVE : ICON_NONE);
266 undo_step_count += 1;
289 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
std::optional< int64_t > CTX_data_int_get(const bContext *C, const char *member)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
ARegion * BKE_area_region_new()
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define STRNCPY_UTF8(dst, src)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define RGN_ALIGN_ENUM_FROM_MASK(align)
void ED_region_header_init(ARegion *region)
void ED_region_header_draw(const bContext *C, ARegion *region)
void ED_region_tag_redraw(ARegion *region)
void ED_region_do_msg_notify_tag_redraw(bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
void ED_region_header_layout(const bContext *C, ARegion *region)
static void split(const char *text, const char *seps, char ***str, int *count)
Read Guarded memory(de)allocation.
int uiTemplateRecentFiles(uiLayout *layout, int rows)
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void ED_spacetype_topbar()
static void topbar_init(wmWindowManager *, ScrArea *)
static void recent_files_menu_draw(const bContext *C, Menu *menu)
static void recent_files_menu_register()
static SpaceLink * topbar_create(const ScrArea *, const Scene *)
static void topbar_free(SpaceLink *)
static void topbar_keymap(wmKeyConfig *)
static SpaceLink * topbar_duplicate(SpaceLink *sl)
static void topbar_header_listener(const wmRegionListenerParams *params)
static void topbar_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void undo_history_menu_register()
static void topbar_header_region_init(wmWindowManager *, ARegion *region)
static void undo_history_draw_menu(const bContext *C, Menu *menu)
static void topbar_main_region_init(wmWindowManager *wm, ARegion *region)
static void topbar_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static void topbar_operatortypes()
static void topbar_main_region_listener(const wmRegionListenerParams *params)
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
void(* listener)(const wmRegionListenerParams *params)
void(* draw)(const bContext *C, ARegion *region)
void(* layout)(const bContext *C, ARegion *region)
void(* init)(wmWindowManager *wm, ARegion *region)
ARegionRuntimeHandle * runtime
void operator_context_set(blender::wm::OpCallContext opcontext)
void label(blender::StringRef name, int icon)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void enabled_set(bool enabled)
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
WindowManagerRuntimeHandle * runtime
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
#define WM_msg_subscribe_rna_prop(mbus, id_, data_, type_, prop_, value)