xref: /haiku/docs/user/interface/MenuField.dox (revision 44b874666af6b25da6311e5a1c506ee3761f4268)
10096a29eSJohn Scipione/*
2819863d8SJohn Scipione * Copyright 2013 Haiku, Inc. All rights reserved.
30096a29eSJohn Scipione * Distributed under the terms of the MIT License.
40096a29eSJohn Scipione *
50096a29eSJohn Scipione * Authors:
60096a29eSJohn Scipione *		John Scipione, jscipione@gmail.com
70096a29eSJohn Scipione *
80096a29eSJohn Scipione * Corresponds to:
90096a29eSJohn Scipione *		headers/os/interface/MenuField.h	 hrev46323
100096a29eSJohn Scipione *		src/kits/interface/MenuField.cpp	 hrev46323
110096a29eSJohn Scipione */
120096a29eSJohn Scipione
130096a29eSJohn Scipione
140096a29eSJohn Scipione/*!
150096a29eSJohn Scipione	\file MenuField.h
160096a29eSJohn Scipione	\ingroup interface
170096a29eSJohn Scipione	\ingroup libbe
180096a29eSJohn Scipione	\brief BMenuField class definition and support structures.
190096a29eSJohn Scipione*/
200096a29eSJohn Scipione
210096a29eSJohn Scipione
220096a29eSJohn Scipione/*!
230096a29eSJohn Scipione	\class BMenuField
240096a29eSJohn Scipione	\ingroup interface
250096a29eSJohn Scipione	\ingroup libbe
260096a29eSJohn Scipione	\brief A labeled pop-up menu.
270096a29eSJohn Scipione
280096a29eSJohn Scipione	A menu field consists of a label and a menu bar. The label, if used, is
290096a29eSJohn Scipione	located to the left of the menu bar. The frame rectangle is divided
300096a29eSJohn Scipione	in half by default. You can call SetDivider() to change the ratio used by
310096a29eSJohn Scipione	the label and menu bar.
320096a29eSJohn Scipione
330096a29eSJohn Scipione	\image html BMenuField_example.png
340096a29eSJohn Scipione
350096a29eSJohn Scipione	A fixed-size menu field's menu bar width and height are limited
360096a29eSJohn Scipione	by the bounds set by the divider position and \a frame rectangle.
370096a29eSJohn Scipione
380096a29eSJohn Scipione	A variable-size menu field's menu bar is only as wide as it needs to
39*44b87466SJohn Scipione	be in order to fit the currently selected menu item, and its height
400096a29eSJohn Scipione	depends on the user's menu font size preference. The height of the
410096a29eSJohn Scipione	frame rectangle is ignored.
420096a29eSJohn Scipione
430096a29eSJohn Scipione	If a menu field's frame rectangle is less than 20 pixels wide, the width
440096a29eSJohn Scipione	is unbounded, the menu bar grows as wide as it needs to in order to fit
450096a29eSJohn Scipione	the currently selected item. If the frame rectangle is wider than 20
460096a29eSJohn Scipione	pixels then the divider position and the width of the frame rectangle set
470096a29eSJohn Scipione	the maximum menu bar width.
480096a29eSJohn Scipione
490096a29eSJohn Scipione	\remark Layout-enabled menu field's are always fixed-size, however, you can
500096a29eSJohn Scipione	        make them act like variable-size menu fields by adding them to a
510096a29eSJohn Scipione	        horizontal group followed by glue.
520096a29eSJohn Scipione
530096a29eSJohn Scipione	If you're using the menu field as part of a BLayout you can get better
540096a29eSJohn Scipione	control over the placement of the label and menu bar by splitting the
550096a29eSJohn Scipione	label and menu field into separate BLayoutItem objects using the
560096a29eSJohn Scipione	CreateLabelLayoutItem() and CreateMenuBarLayoutItem() methods.
570096a29eSJohn Scipione
580096a29eSJohn Scipione	You must pass a menu object into the constructor containing the choices
590096a29eSJohn Scipione	the user can select from. The menu is owned by the menu field and its
600096a29eSJohn Scipione	memory will be freed when the menu field is deleted. A BPopUpMenu is
610096a29eSJohn Scipione	typically used instead of a regular BMenu because it opens directly
620096a29eSJohn Scipione	underneath the mouse pointer and is set to radio mode and
630096a29eSJohn Scipione	label-from-marked mode by default, but, this is entirely up to you.
6447852bffSJohn Scipione
6547852bffSJohn Scipione	\since BeOS R3
660096a29eSJohn Scipione*/
670096a29eSJohn Scipione
680096a29eSJohn Scipione
690096a29eSJohn Scipione/*!
700096a29eSJohn Scipione	\fn BMenuField::BMenuField(BRect frame, const char* name, const char* label,
710096a29eSJohn Scipione		BMenu* menu, uint32 resizingMode, uint32 flags)
720096a29eSJohn Scipione	\brief Creates a new variable-size BMenuField object.
730096a29eSJohn Scipione
740096a29eSJohn Scipione	\param frame The \a frame rectangle of the menu field including the label.
750096a29eSJohn Scipione	\param name The \a name of the menu field, internal only, can be \c NULL.
760096a29eSJohn Scipione	\param label The \a label shown to the user, can be blank.
770096a29eSJohn Scipione	\param menu The \a menu of choices shown to the user, typically a BPopUpMenu.
780096a29eSJohn Scipione	\param resizingMode Defines the menu field's behavior when its parent is
790096a29eSJohn Scipione	       resized, see BView for details.
800096a29eSJohn Scipione	\param flags The view flags, see BView for details.
8147852bffSJohn Scipione
8247852bffSJohn Scipione	\since BeOS R3
830096a29eSJohn Scipione*/
840096a29eSJohn Scipione
850096a29eSJohn Scipione
860096a29eSJohn Scipione/*!
870096a29eSJohn Scipione	\fn BMenuField::BMenuField(BRect frame, const char* name, const char* label,
880096a29eSJohn Scipione		BMenu* menu, bool fixedSize, uint32 resizingMode, uint32 flags)
890096a29eSJohn Scipione	\brief Creates a new BMenuField object. This constructor allows a you to
900096a29eSJohn Scipione	       create either a fixed-size or variable-size menu field.
910096a29eSJohn Scipione
920096a29eSJohn Scipione	\param frame The \a frame rectangle of the menu field including the label.
930096a29eSJohn Scipione	\param name The \a name of the menu field, internal only, can be \c NULL.
940096a29eSJohn Scipione	\param label The \a label shown to the user, can be blank.
950096a29eSJohn Scipione	\param menu The \a menu of choices shown to the user, typically a BPopUpMenu.
960096a29eSJohn Scipione	\param fixedSize \c true for fixed-size, \c false for variable-size.
970096a29eSJohn Scipione	\param resizingMode Defines the menu field's behavior when its parent is
980096a29eSJohn Scipione	       resized, see BView for details.
990096a29eSJohn Scipione	\param flags The view flags, see BView for details.
10047852bffSJohn Scipione
10147852bffSJohn Scipione	\since BeOS R3
1020096a29eSJohn Scipione*/
1030096a29eSJohn Scipione
1040096a29eSJohn Scipione
1050096a29eSJohn Scipione/*!
1060096a29eSJohn Scipione	\fn BMenuField::BMenuField(const char* name, const char* label, BMenu* menu,
1070096a29eSJohn Scipione		uint32 flags)
1080096a29eSJohn Scipione	\brief Creates a new BMenuField object suitable as part of a BLayout.
1090096a29eSJohn Scipione
1100096a29eSJohn Scipione	\param name The \a name of the menu field, internal only, can be \c NULL.
1110096a29eSJohn Scipione	\param label The \a label shown to the user, can be blank.
1120096a29eSJohn Scipione	\param menu The \a menu of choices shown to the user, typically a BPopUpMenu.
1130096a29eSJohn Scipione	\param flags The view flags, see BView for details.
11447852bffSJohn Scipione
11547852bffSJohn Scipione	\since Haiku R1
1160096a29eSJohn Scipione*/
1170096a29eSJohn Scipione
1180096a29eSJohn Scipione
1190096a29eSJohn Scipione/*!
1200096a29eSJohn Scipione	\fn BMenuField::BMenuField(const char* label, BMenu* menu, uint32 flags)
1210096a29eSJohn Scipione	\brief Creates a new BMenuField object suitable as part of a BLayout.
1220096a29eSJohn Scipione	       This constructor omits the internal name parameter.
1230096a29eSJohn Scipione
1240096a29eSJohn Scipione	\param label The \a label shown to the user, can be blank.
1250096a29eSJohn Scipione	\param menu The \a menu of choices shown to the user, typically a BPopUpMenu.
1260096a29eSJohn Scipione	\param flags The view flags, see BView for details.
12747852bffSJohn Scipione
12847852bffSJohn Scipione	\since Haiku R1
1290096a29eSJohn Scipione*/
1300096a29eSJohn Scipione
1310096a29eSJohn Scipione
1320096a29eSJohn Scipione/*!
1330096a29eSJohn Scipione	\fn BMenuField::BMenuField(BMessage* data)
1340096a29eSJohn Scipione	\brief Archive constructor.
1350096a29eSJohn Scipione
1360096a29eSJohn Scipione	\param data The message \a data to construct the menu field from.
13747852bffSJohn Scipione
13847852bffSJohn Scipione	\since BeOS R3
1390096a29eSJohn Scipione*/
1400096a29eSJohn Scipione
1410096a29eSJohn Scipione
1420096a29eSJohn Scipione/*!
1430096a29eSJohn Scipione	\fn BMenuField::~BMenuField()
1440096a29eSJohn Scipione	\brief Destructor.
1450096a29eSJohn Scipione
1460096a29eSJohn Scipione	Also frees the memory used by the label and menu.
14747852bffSJohn Scipione
14847852bffSJohn Scipione	\since BeOS R3
1490096a29eSJohn Scipione*/
1500096a29eSJohn Scipione
1510096a29eSJohn Scipione
1520096a29eSJohn Scipione/*!
15347852bffSJohn Scipione	\name Archiving
15447852bffSJohn Scipione*/
15547852bffSJohn Scipione
15647852bffSJohn Scipione
15747852bffSJohn Scipione//! @{
15847852bffSJohn Scipione
15947852bffSJohn Scipione
16047852bffSJohn Scipione/*!
1610096a29eSJohn Scipione	\fn BArchivable* BMenuField::Instantiate(BMessage* data)
1620096a29eSJohn Scipione	\brief Creates a new BMenuField object from an \a data message.
1630096a29eSJohn Scipione
1640096a29eSJohn Scipione	\returns A newly created BMenuField object or \c NULL if the message
1650096a29eSJohn Scipione	         doesn't contain an archived BMenuField.
16647852bffSJohn Scipione
16747852bffSJohn Scipione	\since BeOS R3
1680096a29eSJohn Scipione*/
1690096a29eSJohn Scipione
1700096a29eSJohn Scipione
1710096a29eSJohn Scipione/*!
1720096a29eSJohn Scipione	\fn status_t BMenuField::Archive(BMessage* data, bool deep) const
1730096a29eSJohn Scipione	\brief Archives the the BMenuField object into the \a data message.
1740096a29eSJohn Scipione
1750096a29eSJohn Scipione	Adds the label, divider, and current state of the BMenuField to the archive.
1760096a29eSJohn Scipione
1770096a29eSJohn Scipione	\param data A pointer to the BMessage to archive the object into.
1780096a29eSJohn Scipione	\param deep Whether or not to archive attached menu and menu items as well.
1790096a29eSJohn Scipione
1800096a29eSJohn Scipione	\return A status code, \c B_OK if everything went well or an error code
1810096a29eSJohn Scipione	        otherwise.
1820096a29eSJohn Scipione	\retval B_OK The object was archived successfully.
1830096a29eSJohn Scipione	\retval B_NO_MEMORY Ran out of memory while archiving the object.
18447852bffSJohn Scipione
18547852bffSJohn Scipione	\since BeOS R3
1860096a29eSJohn Scipione*/
1870096a29eSJohn Scipione
1880096a29eSJohn Scipione
18947852bffSJohn Scipione//! @}
19047852bffSJohn Scipione
19147852bffSJohn Scipione
19247852bffSJohn Scipione/*!
19347852bffSJohn Scipione	\name Hook Methods
19447852bffSJohn Scipione*/
19547852bffSJohn Scipione
19647852bffSJohn Scipione
19747852bffSJohn Scipione//! @{
19847852bffSJohn Scipione
19947852bffSJohn Scipione
2000096a29eSJohn Scipione/*!
2010096a29eSJohn Scipione	\fn status_t BMenuField::AllArchived(BMessage* into) const
2020096a29eSJohn Scipione	\brief Hook method called when all views have been archived.
2030096a29eSJohn Scipione
2040096a29eSJohn Scipione	Also archives the label and menu bar.
2050096a29eSJohn Scipione
2060096a29eSJohn Scipione	\param into Archived data message.
20747852bffSJohn Scipione
20847852bffSJohn Scipione	\since BeOS R3
2090096a29eSJohn Scipione*/
2100096a29eSJohn Scipione
2110096a29eSJohn Scipione
2120096a29eSJohn Scipione/*!
2130096a29eSJohn Scipione	\fn status_t BMenuField::AllUnarchived(const BMessage* from)
2140096a29eSJohn Scipione	\brief Hook method called when all views have been unarchived.
2150096a29eSJohn Scipione
2160096a29eSJohn Scipione	Also unarchives the label and menu bar.
2170096a29eSJohn Scipione
2180096a29eSJohn Scipione	\param from Unarchived data message.
21947852bffSJohn Scipione
22047852bffSJohn Scipione	\since BeOS R3
2210096a29eSJohn Scipione*/
2220096a29eSJohn Scipione
2230096a29eSJohn Scipione
2240096a29eSJohn Scipione/*!
2250096a29eSJohn Scipione	\fn void BMenuField::AttachedToWindow()
2260096a29eSJohn Scipione	\brief Hook method called when the menu field is attached to a window.
2270096a29eSJohn Scipione
2280096a29eSJohn Scipione	Adjusts the background color to match the background color of the parent
2290096a29eSJohn Scipione	view and adjusts the height to be the attached menu bar which depends on
2300096a29eSJohn Scipione	the user's current menu font setting.
23147852bffSJohn Scipione
23247852bffSJohn Scipione	\since BeOS R3
2330096a29eSJohn Scipione*/
2340096a29eSJohn Scipione
2350096a29eSJohn Scipione
2360096a29eSJohn Scipione/*!
2370096a29eSJohn Scipione	\fn void BMenuField::AllAttached()
2380096a29eSJohn Scipione	\brief Similar to AttachedToWindow() but this method is triggered after
2390096a29eSJohn Scipione	       all child views have already been attached to a window.
2400096a29eSJohn Scipione
2410096a29eSJohn Scipione	If the attached menu bar is too narrow it is resized it to fit the menu
2420096a29eSJohn Scipione	items.
24347852bffSJohn Scipione
24447852bffSJohn Scipione	\since BeOS R3
2450096a29eSJohn Scipione*/
2460096a29eSJohn Scipione
2470096a29eSJohn Scipione
2480096a29eSJohn Scipione/*!
2490096a29eSJohn Scipione	\fn void BMenuField::Draw(BRect updateRect)
2500096a29eSJohn Scipione	\brief Draws the area of the menu field that intersects \a updateRect.
2510096a29eSJohn Scipione
2520096a29eSJohn Scipione	The menu field is drawn differently based on whether or not it is the
2530096a29eSJohn Scipione	current focus view and whether or not it is enabled.
2540096a29eSJohn Scipione
2550096a29eSJohn Scipione	\param updateRect The rectangular area to be drawn.
25647852bffSJohn Scipione
25747852bffSJohn Scipione	\since BeOS R3
2580096a29eSJohn Scipione*/
2590096a29eSJohn Scipione
2600096a29eSJohn Scipione
2610096a29eSJohn Scipione/*!
2620096a29eSJohn Scipione	\fn void BMenuField::FrameResized(float newWidth, float newHeight)
2630096a29eSJohn Scipione	\brief Hook method called when the menu bar is resized.
2640096a29eSJohn Scipione
2650096a29eSJohn Scipione	Adjusts the menu bar size and location.
2660096a29eSJohn Scipione
26747852bffSJohn Scipione	\copydetails BView::FrameResized()
2680096a29eSJohn Scipione*/
2690096a29eSJohn Scipione
2700096a29eSJohn Scipione
2710096a29eSJohn Scipione/*!
2720096a29eSJohn Scipione	\fn void BMenuField::KeyDown(const char* bytes, int32 numBytes)
2730096a29eSJohn Scipione	\brief Hook method called when a keyboard key is pressed.
2740096a29eSJohn Scipione
2750096a29eSJohn Scipione	Provides for keyboard navigation allowing users to open the menu by pressing
2760096a29eSJohn Scipione	the space bar, right arrow, or down arrow.
2770096a29eSJohn Scipione
27847852bffSJohn Scipione	\copydetails BView::KeyDown()
2790096a29eSJohn Scipione*/
2800096a29eSJohn Scipione
2810096a29eSJohn Scipione
2820096a29eSJohn Scipione/*!
2830096a29eSJohn Scipione	\fn void BMenuField::MouseDown(BPoint where)
2840096a29eSJohn Scipione	\brief Hook method called when a mouse button is pressed.
2850096a29eSJohn Scipione
2860096a29eSJohn Scipione	Provides the ability to open the menu field menu using the mouse, even if
2870096a29eSJohn Scipione	the user clicks on the menu field label.
2880096a29eSJohn Scipione
28947852bffSJohn Scipione	\copydetails BView::MouseDown()
2900096a29eSJohn Scipione*/
2910096a29eSJohn Scipione
2920096a29eSJohn Scipione
2930096a29eSJohn Scipione/*!
29447852bffSJohn Scipione	\fn void BMenuField::WindowActivated(bool active)
2950096a29eSJohn Scipione	\brief Hook method called when the attached window is activated or
2960096a29eSJohn Scipione	       deactivated.
2970096a29eSJohn Scipione
2980096a29eSJohn Scipione	Redraws the focus ring around the menu field when the window is activated
2990096a29eSJohn Scipione	and deactivated if it is the window's current focus view.
3000096a29eSJohn Scipione
30147852bffSJohn Scipione	\copydetails BView::WindowActivated()
3020096a29eSJohn Scipione*/
3030096a29eSJohn Scipione
3040096a29eSJohn Scipione
30547852bffSJohn Scipione//! @}
30647852bffSJohn Scipione
30747852bffSJohn Scipione
3080096a29eSJohn Scipione/*!
3090096a29eSJohn Scipione	\fn void BMenuField::MakeFocus(bool focused)
3100096a29eSJohn Scipione	\brief Makes the view the current focus view of the window or gives up
3110096a29eSJohn Scipione	       being the focus view of the window.
3120096a29eSJohn Scipione
3130096a29eSJohn Scipione	Enables or disables keyboard navigation and invalidates the menu field.
3140096a29eSJohn Scipione
3150096a29eSJohn Scipione	\param focused \a true to set focus, \a false to remove it.
31647852bffSJohn Scipione
31747852bffSJohn Scipione	\since BeOS R3
3180096a29eSJohn Scipione*/
3190096a29eSJohn Scipione
3200096a29eSJohn Scipione
3210096a29eSJohn Scipione/*!
3220096a29eSJohn Scipione	\fn BMenu* BMenuField::Menu() const
3230096a29eSJohn Scipione	\brief Returns a pointer to the menu attached to the menu bar that opens
3240096a29eSJohn Scipione	       when the user clicks on the menu field.
32547852bffSJohn Scipione
32647852bffSJohn Scipione	\since BeOS R3
3270096a29eSJohn Scipione*/
3280096a29eSJohn Scipione
3290096a29eSJohn Scipione
3300096a29eSJohn Scipione/*!
3310096a29eSJohn Scipione	\fn BMenuBar* BMenuField::MenuBar() const
3320096a29eSJohn Scipione	\brief Returns a pointer to the attached menu bar that contains the pop-up
3330096a29eSJohn Scipione	       menu.
33447852bffSJohn Scipione
33547852bffSJohn Scipione	\since BeOS R3
3360096a29eSJohn Scipione*/
3370096a29eSJohn Scipione
3380096a29eSJohn Scipione
3390096a29eSJohn Scipione/*!
3400096a29eSJohn Scipione	\fn BMenuItem* BMenuField::MenuItem() const
3410096a29eSJohn Scipione	\brief Returns the first menu item attached to the menu bar containing
3420096a29eSJohn Scipione	       the pop-up menu.
34347852bffSJohn Scipione
34447852bffSJohn Scipione	\since BeOS R3
3450096a29eSJohn Scipione*/
3460096a29eSJohn Scipione
3470096a29eSJohn Scipione
3480096a29eSJohn Scipione/*!
3490096a29eSJohn Scipione	\fn void BMenuField::SetLabel(const char* label)
3500096a29eSJohn Scipione	\brief Sets the menu field label to \a label.
3510096a29eSJohn Scipione
3520096a29eSJohn Scipione	\param label The \a label to set to the menu field.
35347852bffSJohn Scipione
35447852bffSJohn Scipione	\since BeOS R3
3550096a29eSJohn Scipione*/
3560096a29eSJohn Scipione
3570096a29eSJohn Scipione
3580096a29eSJohn Scipione/*!
3590096a29eSJohn Scipione	\fn const char* BMenuField::Label() const
3600096a29eSJohn Scipione	\brief Returns the menu field label.
3610096a29eSJohn Scipione
3620096a29eSJohn Scipione	\return The menu field label or \c NULL if not assigned.
36347852bffSJohn Scipione
36447852bffSJohn Scipione	\since BeOS R3
3650096a29eSJohn Scipione*/
3660096a29eSJohn Scipione
3670096a29eSJohn Scipione
3680096a29eSJohn Scipione/*!
3690096a29eSJohn Scipione	\fn void BMenuField::SetEnabled(bool on)
3700096a29eSJohn Scipione	\brief Enables or disables the menu field.
3710096a29eSJohn Scipione
3720096a29eSJohn Scipione	\param on \c true to enable the menu field, \c false to disable it.
37347852bffSJohn Scipione
37447852bffSJohn Scipione	\since BeOS R3
3750096a29eSJohn Scipione*/
3760096a29eSJohn Scipione
3770096a29eSJohn Scipione
3780096a29eSJohn Scipione/*!
3790096a29eSJohn Scipione	\fn bool BMenuField::IsEnabled() const
3800096a29eSJohn Scipione	\brief Returns whether or not the menu is enabled.
3810096a29eSJohn Scipione
3820096a29eSJohn Scipione	\return \c true if the menu is enabled, \c false if disabled.
38347852bffSJohn Scipione
38447852bffSJohn Scipione	\since BeOS R3
3850096a29eSJohn Scipione*/
3860096a29eSJohn Scipione
3870096a29eSJohn Scipione
3880096a29eSJohn Scipione/*!
3890096a29eSJohn Scipione	\fn void BMenuField::SetAlignment(alignment label)
3900096a29eSJohn Scipione	\brief Set the alignment of the menu field label. The default alignment
3910096a29eSJohn Scipione	       is \c B_ALIGN_LEFT.
3920096a29eSJohn Scipione
3930096a29eSJohn Scipione	\remark For menu fields that are part of a BLayout consider
3940096a29eSJohn Scipione	        using BLayoutItem::SetExplicitAlignment() instead.
3950096a29eSJohn Scipione
3960096a29eSJohn Scipione	\param label The alignment to set, choices include:
3970096a29eSJohn Scipione		- \c B_ALIGN_LEFT
3980096a29eSJohn Scipione		- \c B_ALIGN_CENTER
3990096a29eSJohn Scipione		- \c B_ALIGN_RIGHT
40047852bffSJohn Scipione
40147852bffSJohn Scipione	\since BeOS R3
4020096a29eSJohn Scipione*/
4030096a29eSJohn Scipione
4040096a29eSJohn Scipione
4050096a29eSJohn Scipione/*!
4060096a29eSJohn Scipione	\fn alignment BMenuField::Alignment() const
4070096a29eSJohn Scipione	\brief Returns the label's current alignment.
4080096a29eSJohn Scipione
4090096a29eSJohn Scipione	\return The label's current alignment constant.
4100096a29eSJohn Scipione
4110096a29eSJohn Scipione	\see SetAlignment() for more details.
41247852bffSJohn Scipione
41347852bffSJohn Scipione	\since BeOS R3
4140096a29eSJohn Scipione*/
4150096a29eSJohn Scipione
4160096a29eSJohn Scipione
4170096a29eSJohn Scipione/*!
4180096a29eSJohn Scipione	\fn void BMenuField::SetDivider(float position)
4190096a29eSJohn Scipione	\brief Sets the horizontal \a position of the divider that separates the
4200096a29eSJohn Scipione	       label from the menu bar.
4210096a29eSJohn Scipione
4220096a29eSJohn Scipione	\remark It is not recommended to use this method for menu fields that are
4230096a29eSJohn Scipione	        part of a BLayout. Instead split the label and menu bar into
4240096a29eSJohn Scipione	        separate layout items using CreateLabelLayoutItem() and
4250096a29eSJohn Scipione	        CreateMenuBarLayoutItem(). This allows you to have better control
4260096a29eSJohn Scipione	        over the position of the label and menu bar portions of your
4270096a29eSJohn Scipione	        menu fields.
4280096a29eSJohn Scipione
4290096a29eSJohn Scipione	\param position The divider \a position to set, should be an integral value.
43047852bffSJohn Scipione
43147852bffSJohn Scipione	\since BeOS R3
4320096a29eSJohn Scipione*/
4330096a29eSJohn Scipione
4340096a29eSJohn Scipione
4350096a29eSJohn Scipione/*!
4360096a29eSJohn Scipione	\fn float BMenuField::Divider() const
4370096a29eSJohn Scipione	\brief Returns the current divider position.
4380096a29eSJohn Scipione
4390096a29eSJohn Scipione	\return The current divider position as a float.
4400096a29eSJohn Scipione
4410096a29eSJohn Scipione	\see SetDivider() for more details.
44247852bffSJohn Scipione
44347852bffSJohn Scipione	\since BeOS R3
4440096a29eSJohn Scipione*/
4450096a29eSJohn Scipione
4460096a29eSJohn Scipione
4470096a29eSJohn Scipione/*!
4480096a29eSJohn Scipione	\fn void BMenuField::ShowPopUpMarker()
4490096a29eSJohn Scipione	\brief Shows the pop-up marker located on the right edge of the menu bar.
4500096a29eSJohn Scipione
4510096a29eSJohn Scipione	\sa HidePopUpMarker()
45247852bffSJohn Scipione
45347852bffSJohn Scipione	\since Haiku R1
4540096a29eSJohn Scipione*/
4550096a29eSJohn Scipione
4560096a29eSJohn Scipione
4570096a29eSJohn Scipione/*!
4580096a29eSJohn Scipione	\fn void BMenuField::HidePopUpMarker()
4590096a29eSJohn Scipione	\brief Hides to pop-up marker.
4600096a29eSJohn Scipione
4610096a29eSJohn Scipione	\sa ShowPopUpMarker()
46247852bffSJohn Scipione
46347852bffSJohn Scipione	\since Haiku R1
4640096a29eSJohn Scipione*/
4650096a29eSJohn Scipione
4660096a29eSJohn Scipione
4670096a29eSJohn Scipione/*!
4680096a29eSJohn Scipione	\fn BLayoutItem* BMenuField::CreateLabelLayoutItem()
4690096a29eSJohn Scipione	\brief Returns a pointer to the label layout item.
4700096a29eSJohn Scipione	       (Layout constructor only)
4710096a29eSJohn Scipione
4720096a29eSJohn Scipione	\sa CreateMenuBarLayoutItem()
47347852bffSJohn Scipione
47447852bffSJohn Scipione	\since Haiku R1
4750096a29eSJohn Scipione*/
4760096a29eSJohn Scipione
4770096a29eSJohn Scipione
4780096a29eSJohn Scipione/*!
4790096a29eSJohn Scipione	\fn BLayoutItem* BMenuField::CreateMenuBarLayoutItem()
4800096a29eSJohn Scipione	\brief Returns a pointer to the menu bar layout item.
4810096a29eSJohn Scipione	       (Layout constructor only)
4820096a29eSJohn Scipione
4830096a29eSJohn Scipione	\sa CreateLabelLayoutItem()
48447852bffSJohn Scipione
48547852bffSJohn Scipione	\since Haiku R1
4860096a29eSJohn Scipione*/
487