From be3841b1bf5f10acd1163189b689de1f1dd6d86c Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 13 Oct 2020 13:23:57 -0500 Subject: Cleanup: Use doxygen sections in space_buttons.c --- .../blender/editors/space_buttons/space_buttons.c | 54 +++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index e7f057683ab..14817a8ce23 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -54,7 +54,9 @@ #include "buttons_intern.h" /* own include */ -/* ******************** default callbacks for buttons space ***************** */ +/* -------------------------------------------------------------------- */ +/** \name Default Callbacks for Properties Space + * \{ */ static SpaceLink *buttons_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { @@ -158,6 +160,12 @@ static void buttons_main_region_init(wmWindowManager *wm, ARegion *region) WM_event_add_keymap_handler(®ion->handlers, keymap); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Property Editor Layout + * \{ */ + /** * Fills an array with the tab context values for the properties editor. -1 signals a separator. * @@ -305,6 +313,12 @@ static void buttons_main_region_layout_properties(const bContext *C, ED_region_panels_layout_ex(C, region, ®ion->type->paneltypes, contexts, NULL); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Property Search Access API + * \{ */ + const char *ED_buttons_search_string_get(SpaceProperties *sbuts) { return sbuts->runtime->search_string; @@ -325,6 +339,12 @@ bool ED_buttons_tab_has_search_result(SpaceProperties *sbuts, const int index) return BLI_BITMAP_TEST(sbuts->runtime->tab_search_results, index); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name "Off Screen" Layout Generation for Property Search + * \{ */ + static bool property_search_for_context(const bContext *C, ARegion *region, SpaceProperties *sbuts) { const char *contexts[2] = {buttons_main_region_context_string(sbuts->mainb), NULL}; @@ -462,6 +482,12 @@ static void buttons_main_region_property_search(const bContext *C, } } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Main Region Layout and Listener + * \{ */ + static void buttons_main_region_layout(const bContext *C, ARegion *region) { /* draw entirely, view changes should be handled here */ @@ -512,6 +538,12 @@ static void buttons_keymap(struct wmKeyConfig *keyconf) WM_keymap_ensure(keyconf, "Property Editor", SPACE_PROPERTIES, 0); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Header Region Callbacks + * \{ */ + /* add handlers, stuff you only do once or on area/region changes */ static void buttons_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region) { @@ -556,6 +588,12 @@ static void buttons_header_region_message_subscribe(const bContext *UNUSED(C), } } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Navigation Region Callbacks + * \{ */ + static void buttons_navigation_bar_region_init(wmWindowManager *wm, ARegion *region) { region->flag |= RGN_FLAG_PREFSIZE_OR_HIDDEN; @@ -605,6 +643,12 @@ static void buttons_area_redraw(ScrArea *area, short buttons) } } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Area-Level Code + * \{ */ + /* reused! */ static void buttons_area_listener(wmWindow *UNUSED(win), ScrArea *area, @@ -860,6 +904,12 @@ static void buttons_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id } } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Space Type Initialization + * \{ */ + /* only called once, from space/spacetypes.c */ void ED_spacetype_buttons(void) { @@ -938,3 +988,5 @@ void ED_spacetype_buttons(void) BKE_spacetype_register(st); } + +/** \} */ -- cgit v1.2.3