44 stopbar =
MEM_callocN(
sizeof(*stopbar),
"init topbar");
192 mbus, &workspace->
id, workspace,
WorkSpace, tools, &msg_sub_value_region_tag_redraw);
201 for (recent =
G.recent_files.first; (recent); recent = recent->
next) {
220 strcpy(mt->
idname,
"TOPBAR_MT_file_open_recent");
221 strcpy(mt->
label,
N_(
"Open Recent"));
234 int undo_step_count = 0;
235 int undo_step_count_all = 0;
237 undo_step_count_all += 1;
241 undo_step_count += 1;
247 const int col_size = 20 + (undo_step_count / 12);
252 int i = undo_step_count_all - 1;
257 if (!(undo_step_count % col_size)) {
265 is_active ? ICON_LAYER_ACTIVE : ICON_NONE,
266 "ED_OT_undo_history",
269 undo_step_count += 1;
278 strcpy(mt->
idname,
"TOPBAR_MT_undo_history");
279 strcpy(mt->
label,
N_(
"Undo History"));
struct wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_spacetype_register(struct SpaceType *st)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
const char * BLI_path_basename(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
external readfile function prototypes.
bool BLO_has_bfile_extension(const char *str)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define RGN_ALIGN_ENUM_FROM_MASK(align)
void ED_region_do_msg_notify_tag_redraw(struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val)
void ED_region_header_layout(const struct bContext *C, struct ARegion *region)
void ED_region_tag_redraw(struct ARegion *region)
void ED_region_header_init(struct ARegion *region)
void ED_region_header_draw(const struct bContext *C, struct ARegion *region)
Read Guarded memory(de)allocation.
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void uiItemL(uiLayout *layout, const char *name, int icon)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, struct IDProperty *properties, wmOperatorCallContext context, int flag, struct PointerRNA *r_opptr)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
static void topbar_free(SpaceLink *UNUSED(sl))
static void topbar_keymap(struct wmKeyConfig *UNUSED(keyconf))
static void recent_files_menu_register(void)
void ED_spacetype_topbar(void)
static void topbar_operatortypes(void)
static void topbar_header_listener(const wmRegionListenerParams *params)
static SpaceLink * topbar_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
static void undo_history_draw_menu(const bContext *C, Menu *menu)
static void topbar_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
static void undo_history_menu_register(void)
static void topbar_main_region_init(wmWindowManager *wm, ARegion *region)
static void topbar_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static SpaceLink * topbar_duplicate(SpaceLink *sl)
static void topbar_main_region_listener(const wmRegionListenerParams *params)
void(* draw)(const struct bContext *C, struct ARegion *region)
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
void(* listener)(const wmRegionListenerParams *params)
void(* layout)(const struct bContext *C, struct ARegion *region)
void(* init)(struct wmWindowManager *wm, struct ARegion *region)
struct UndoStep * step_active
struct wmKeyConfig * defaultconf
struct UndoStack * undo_stack
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)