From c9afad22682e9f15753db4e9ca8684e2d4a643a9 Mon Sep 17 00:00:00 2001 From: Zardshard <0azrune6@zard.anonaddy.com> Date: Mon, 25 Sep 2023 19:27:11 -0400 Subject: [PATCH] HaikuBook: Improve documentation of AddDynamicItem Change-Id: Id682c64f13eb103074bdbee34d531d3e2a91de0f Reviewed-on: https://review.haiku-os.org/c/haiku/+/6955 Reviewed-by: waddlesplash --- docs/user/interface/Menu.dox | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/user/interface/Menu.dox b/docs/user/interface/Menu.dox index 942e704ffa..5e599c2c03 100644 --- a/docs/user/interface/Menu.dox +++ b/docs/user/interface/Menu.dox @@ -958,14 +958,20 @@ /*! \fn bool BMenu::AddDynamicItem(add_state state) - \brief Implemented by subclasses to Add a dynamic item to the menu. + \brief Implemented by subclasses to add their own items to the menu. + + This function is called when the menu is shown and will be continuously + called until it returns \c false. On the first call, \a state is + \c B_INITIAL_ADD. On subsequent calls \a state is \c B_PROCESSING. If the + function should stop adding items, such as if the user clicks off of it, + the function will be called with \a state set to \c B_ABORT. \param state Possibilities include: - \c B_INITIAL_ADD, - \c B_PROCESSING, - \c B_ABORT - \return \c true if the dynamic item was added, \c false otherwise. + \return \c true if there is more to do, \c false otherwise. \since Haiku R1 */