xref: /haiku/docs/user/interface/ListView.dox (revision 44b874666af6b25da6311e5a1c506ee3761f4268)
14cbcabffSJohn Scipione/*
247852bffSJohn Scipione * Copyright 2014 Haiku, Inc. All rights reserved.
34cbcabffSJohn Scipione * Distributed under the terms of the MIT License.
44cbcabffSJohn Scipione *
54cbcabffSJohn Scipione * Authors:
64cbcabffSJohn Scipione *		John Scipione, jscipione@gmail.com
74cbcabffSJohn Scipione *
84cbcabffSJohn Scipione * Corresponds to:
94cbcabffSJohn Scipione *		headers/os/interface/ListView.h	 hrev45555
104cbcabffSJohn Scipione *		src/kits/interface/ListView.cpp	 hrev45555
114cbcabffSJohn Scipione */
124cbcabffSJohn Scipione
134cbcabffSJohn Scipione
144cbcabffSJohn Scipione/*!
154cbcabffSJohn Scipione	\file ListView.h
164cbcabffSJohn Scipione	\ingroup interface
174cbcabffSJohn Scipione	\ingroup libbe
184cbcabffSJohn Scipione	\brief ListView class definition.
194cbcabffSJohn Scipione*/
204cbcabffSJohn Scipione
214cbcabffSJohn Scipione
224cbcabffSJohn Scipione/*!
234cbcabffSJohn Scipione	\class BListView
244cbcabffSJohn Scipione	\ingroup interface
254cbcabffSJohn Scipione	\ingroup libbe
264cbcabffSJohn Scipione	\brief Displays a list of items that the user can select and invoke.
274cbcabffSJohn Scipione
28853f7246SJohn Scipione	BListView's can be one of two types set by the type parameter of the
29853f7246SJohn Scipione	constructor:
30853f7246SJohn Scipione	- \c B_SINGLE_SELECTION_LIST Can select only one item in the list at a
31853f7246SJohn Scipione	     time. This is the default.
32853f7246SJohn Scipione	- \c B_MULTIPLE_SELECTION_LIST	Can select any number of items by
33853f7246SJohn Scipione	     holding down Option for a discontinuous selection, or Shift for
34853f7246SJohn Scipione	     a contiguous selection.
354cbcabffSJohn Scipione
364cbcabffSJohn Scipione	An example of a BListView looks like this:
374cbcabffSJohn Scipione	\image html BListView_example.png
384cbcabffSJohn Scipione
394cbcabffSJohn Scipione	Click on an item to select it and double-click an item to invoke it. The
404cbcabffSJohn Scipione	BListView doesn't define what it means to "invoke" an item. See
41853f7246SJohn Scipione	BListView::SetSelectionMessage() and BListView::SetInvocationMessage()
42853f7246SJohn Scipione	to set a message to be set when these actions occur. You can also select
43853f7246SJohn Scipione	and invoke items with keyboard keys such as the up and down arrow keys,
44853f7246SJohn Scipione	Page Up and Page Down and the Enter key or Space key to invoke the item.
454cbcabffSJohn Scipione
46853f7246SJohn Scipione	This class is based on the BList class from the Support Kit and many of
47853f7246SJohn Scipione	the methods it uses behave similarly.
484cbcabffSJohn Scipione
49853f7246SJohn Scipione	Although a BListView is scrollable, it doesn't provide scroll bars by
50853f7246SJohn Scipione	itself. You should add the BListView as a child of a BScrollView to make
51853f7246SJohn Scipione	it scrollable.
524cbcabffSJohn Scipione
534cbcabffSJohn Scipione	The code to add a BListView to a BScrollView looks something like this:
544cbcabffSJohn Scipione
554cbcabffSJohn Scipione\code
564cbcabffSJohn Scipione	BListView* list = new BListView(frame, "List", B_SINGLE_SELECTION_LIST);
574cbcabffSJohn Scipione	list->AddItem(new BStringItem("Item 1"));
584cbcabffSJohn Scipione	list->AddItem(new BStringItem("Item 2"));
594cbcabffSJohn Scipione	...
604cbcabffSJohn Scipione	view->AddChild(new BScrollView("scroll_view", list,
614cbcabffSJohn Scipione		B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true));
624cbcabffSJohn Scipione\endcode
634cbcabffSJohn Scipione
644cbcabffSJohn Scipione	\see BScrollView for more information on scrolling views.
654cbcabffSJohn Scipione	\see BList in the Support Kit.
664cbcabffSJohn Scipione	\see BOutlineListView
674cbcabffSJohn Scipione	\see BListItem
6847852bffSJohn Scipione
6947852bffSJohn Scipione	\since BeOS R3
704cbcabffSJohn Scipione*/
714cbcabffSJohn Scipione
724cbcabffSJohn Scipione
734cbcabffSJohn Scipione/*!
744cbcabffSJohn Scipione	\fn BListView::BListView(BRect frame, const char* name, list_view_type type,
754cbcabffSJohn Scipione		uint32 resizingMode, uint32 flags)
764cbcabffSJohn Scipione	\brief Creates a new list view. This is the non-layout constructor.
774cbcabffSJohn Scipione
784cbcabffSJohn Scipione	\param frame The frame rectangle of the view.
794cbcabffSJohn Scipione	\param name The name of the view.
804cbcabffSJohn Scipione	\param type Whether the list view supports a single selection or multiple
814cbcabffSJohn Scipione	       selections.
82853f7246SJohn Scipione	\param resizingMode The resizing mode flags. See BView for details.
83853f7246SJohn Scipione	\param flags The view flags. See BView for details.
8447852bffSJohn Scipione
8547852bffSJohn Scipione	\since BeOS R3
864cbcabffSJohn Scipione*/
874cbcabffSJohn Scipione
884cbcabffSJohn Scipione
894cbcabffSJohn Scipione/*!
90853f7246SJohn Scipione	\fn BListView::BListView(const char* name, list_view_type type,
91853f7246SJohn Scipione		uint32 flags)
92853f7246SJohn Scipione	\brief Creates a new list view suitable as part of a layout with the
93853f7246SJohn Scipione	       specified \a name, \a type, and \a flags.
944cbcabffSJohn Scipione
954cbcabffSJohn Scipione	\param name The name of the view.
964cbcabffSJohn Scipione	\param type Whether the list view supports a single selection or multiple
974cbcabffSJohn Scipione	       selections.
98853f7246SJohn Scipione	\param flags The view flags. See BView for details.
9947852bffSJohn Scipione
10047852bffSJohn Scipione	\since Haiku R1
1014cbcabffSJohn Scipione*/
1024cbcabffSJohn Scipione
1034cbcabffSJohn Scipione
1044cbcabffSJohn Scipione/*!
1054cbcabffSJohn Scipione	\fn BListView::BListView(list_view_type type)
1064cbcabffSJohn Scipione	\brief Creates a new list view suitable as part of a layout.
1074cbcabffSJohn Scipione
1084cbcabffSJohn Scipione	\param type Whether the list view supports a single selection or multiple
1094cbcabffSJohn Scipione	       selections.
11047852bffSJohn Scipione
11147852bffSJohn Scipione	\since Haiku R1
1124cbcabffSJohn Scipione*/
1134cbcabffSJohn Scipione
1144cbcabffSJohn Scipione
1154cbcabffSJohn Scipione/*!
1164cbcabffSJohn Scipione	\fn BListView::BListView(BMessage* archive)
117853f7246SJohn Scipione	\brief Creates a BListView object from the \a archive message.
1184cbcabffSJohn Scipione
119853f7246SJohn Scipione	\param archive The message to create the object from.
12047852bffSJohn Scipione
12147852bffSJohn Scipione	\since BeOS R3
1224cbcabffSJohn Scipione*/
1234cbcabffSJohn Scipione
1244cbcabffSJohn Scipione
1254cbcabffSJohn Scipione/*!
1264cbcabffSJohn Scipione	\fn BListView::~BListView()
127853f7246SJohn Scipione	\brief Delete the BListView object and free the memory used by it.
1284cbcabffSJohn Scipione
129853f7246SJohn Scipione	This method does not free the attached list items.
13047852bffSJohn Scipione
13147852bffSJohn Scipione	\since BeOS R3
1324cbcabffSJohn Scipione*/
1334cbcabffSJohn Scipione
1344cbcabffSJohn Scipione
1354cbcabffSJohn Scipione/*!
1364cbcabffSJohn Scipione	\name Archiving
1374cbcabffSJohn Scipione*/
1384cbcabffSJohn Scipione
1394cbcabffSJohn Scipione
1404cbcabffSJohn Scipione//! @{
1414cbcabffSJohn Scipione
1424cbcabffSJohn Scipione
1434cbcabffSJohn Scipione/*!
1444cbcabffSJohn Scipione	\fn BArchivable* BListView::Instantiate(BMessage* archive)
145853f7246SJohn Scipione	\brief Create a new BListView object from the message \a archive.
1464cbcabffSJohn Scipione
14747852bffSJohn Scipione	\copydetails BView::Instantiate()
1484cbcabffSJohn Scipione*/
1494cbcabffSJohn Scipione
1504cbcabffSJohn Scipione
1514cbcabffSJohn Scipione/*!
15247852bffSJohn Scipione	\fn status_t BListView::Archive(BMessage* data, bool deep) const
153853f7246SJohn Scipione	\brief Archive the BListView object to a message.
1544cbcabffSJohn Scipione
15547852bffSJohn Scipione	\copydetails BView::Archive()
1564cbcabffSJohn Scipione*/
1574cbcabffSJohn Scipione
1584cbcabffSJohn Scipione
1594cbcabffSJohn Scipione//! @}
1604cbcabffSJohn Scipione
1614cbcabffSJohn Scipione
1624cbcabffSJohn Scipione/*!
16347852bffSJohn Scipione	\name Hook Methods
1644cbcabffSJohn Scipione*/
1654cbcabffSJohn Scipione
1664cbcabffSJohn Scipione
1674cbcabffSJohn Scipione//! @{
1684cbcabffSJohn Scipione
1694cbcabffSJohn Scipione
1704cbcabffSJohn Scipione/*!
1714cbcabffSJohn Scipione	\fn void BListView::Draw(BRect updateRect)
1724cbcabffSJohn Scipione	\brief Hook method called to draw the contents of the text view.
1734cbcabffSJohn Scipione
1744cbcabffSJohn Scipione	You should not have to call this method directly, use Invalidate() instead.
1754cbcabffSJohn Scipione
1764cbcabffSJohn Scipione	\param updateRect The rectangular area to draw.
1774cbcabffSJohn Scipione
1784cbcabffSJohn Scipione	\see BView::Draw()
17947852bffSJohn Scipione
18047852bffSJohn Scipione	\since BeOS R3
1814cbcabffSJohn Scipione*/
1824cbcabffSJohn Scipione
1834cbcabffSJohn Scipione
1844cbcabffSJohn Scipione/*!
1854cbcabffSJohn Scipione	\fn void BListView::AttachedToWindow()
1864cbcabffSJohn Scipione	\brief Hook method called when the list view is added to the view hierarchy.
1874cbcabffSJohn Scipione
18847852bffSJohn Scipione	\copydetails BView::AttachedToWindow()
1894cbcabffSJohn Scipione*/
1904cbcabffSJohn Scipione
1914cbcabffSJohn Scipione
1924cbcabffSJohn Scipione/*!
1934cbcabffSJohn Scipione	\fn void BListView::DetachedFromWindow()
1944cbcabffSJohn Scipione	\brief Hook method that is called when the list view is removed from the
1954cbcabffSJohn Scipione	       view hierarchy.
1964cbcabffSJohn Scipione
19747852bffSJohn Scipione	\copydetails BView::DetachedFromWindow()
1984cbcabffSJohn Scipione*/
1994cbcabffSJohn Scipione
2004cbcabffSJohn Scipione
2014cbcabffSJohn Scipione/*!
2024cbcabffSJohn Scipione	\fn void BListView::AllAttached()
2034cbcabffSJohn Scipione	\brief Hook method called once all views are attached to the view.
2044cbcabffSJohn Scipione
20547852bffSJohn Scipione	\copydetails BView::AllAttached()
2064cbcabffSJohn Scipione*/
2074cbcabffSJohn Scipione
2084cbcabffSJohn Scipione
2094cbcabffSJohn Scipione/*!
2104cbcabffSJohn Scipione	\fn void BListView::AllDetached()
2114cbcabffSJohn Scipione	\brief Hook method called once all views are detached from the view.
2124cbcabffSJohn Scipione
21347852bffSJohn Scipione	\copydetails BView::AllDetached()
2144cbcabffSJohn Scipione*/
2154cbcabffSJohn Scipione
2164cbcabffSJohn Scipione
2174cbcabffSJohn Scipione/*!
21847852bffSJohn Scipione	\fn void BListView::FrameResized(float newWidth, float newHeight)
2194cbcabffSJohn Scipione	\brief Hook method called when the list view is resized.
2204cbcabffSJohn Scipione
22147852bffSJohn Scipione	\copydetails BView::FrameResized()
2224cbcabffSJohn Scipione*/
2234cbcabffSJohn Scipione
2244cbcabffSJohn Scipione
2254cbcabffSJohn Scipione/*!
22647852bffSJohn Scipione	\fn void BListView::FrameMoved(BPoint newPosition)
2274cbcabffSJohn Scipione	\brief Hook method called when the list view is moved.
2284cbcabffSJohn Scipione
22947852bffSJohn Scipione	\copydetails BView::FrameMoved()
2304cbcabffSJohn Scipione*/
2314cbcabffSJohn Scipione
2324cbcabffSJohn Scipione
2334cbcabffSJohn Scipione/*!
2344cbcabffSJohn Scipione	\fn void BListView::TargetedByScrollView(BScrollView* view)
2354cbcabffSJohn Scipione	\brief Hook method called when the list view is attached to a BScrollView.
2364cbcabffSJohn Scipione
2374cbcabffSJohn Scipione	\param view The BScrollView the list view is attached to.
23847852bffSJohn Scipione
23947852bffSJohn Scipione	\since BeOS R3
2404cbcabffSJohn Scipione*/
2414cbcabffSJohn Scipione
2424cbcabffSJohn Scipione
2434cbcabffSJohn Scipione/*!
24447852bffSJohn Scipione	\fn void BListView::WindowActivated(bool active)
2454cbcabffSJohn Scipione	\brief Hook method that is called when the window becomes the active window
2464cbcabffSJohn Scipione	       or gives up that status.
2474cbcabffSJohn Scipione
24847852bffSJohn Scipione	\copydetails BView::WindowActivated()
2494cbcabffSJohn Scipione*/
2504cbcabffSJohn Scipione
2514cbcabffSJohn Scipione
2524cbcabffSJohn Scipione/*!
2534cbcabffSJohn Scipione	\fn void BListView::MessageReceived(BMessage* message)
254853f7246SJohn Scipione	\brief Hook method called when a message is received by the list view.
2554cbcabffSJohn Scipione
25647852bffSJohn Scipione	\copydetails BView::MessageReceived()
2574cbcabffSJohn Scipione*/
2584cbcabffSJohn Scipione
2594cbcabffSJohn Scipione
2604cbcabffSJohn Scipione/*!
2614cbcabffSJohn Scipione	\fn void BListView::KeyDown(const char* bytes, int32 numBytes)
2624cbcabffSJohn Scipione	\brief Hook method that is called when a key is pressed while the view is
2634cbcabffSJohn Scipione	       the focus view of the active window.
2644cbcabffSJohn Scipione
2654cbcabffSJohn Scipione	The following keys are used by the list view by default:
2664cbcabffSJohn Scipione	- Up Arrow				Selects the previous item.
2674cbcabffSJohn Scipione	- Down Arrow			Selects the next item.
268853f7246SJohn Scipione	- Page Up				Selects the item one view height above the
269853f7246SJohn Scipione	                        current item.
270853f7246SJohn Scipione	- Page Down				Selects the item one view height below the
271853f7246SJohn Scipione	                        current item.
2724cbcabffSJohn Scipione	- Home					Selects the first item in the list.
2734cbcabffSJohn Scipione	- End					Select the last item in the list.
2744cbcabffSJohn Scipione	- Enter and Spacebar	Invokes the currently selected item.
2754cbcabffSJohn Scipione
2764cbcabffSJohn Scipione	\param bytes The \a bytes representing the keys pushed down.
2774cbcabffSJohn Scipione	\param numBytes The size of \a bytes.
2784cbcabffSJohn Scipione
2794cbcabffSJohn Scipione	\see BView::KeyDown()
28047852bffSJohn Scipione
28147852bffSJohn Scipione	\since BeOS R3
2824cbcabffSJohn Scipione*/
2834cbcabffSJohn Scipione
2844cbcabffSJohn Scipione
2854cbcabffSJohn Scipione/*!
2864cbcabffSJohn Scipione	\fn void BListView::MouseDown(BPoint point)
2874cbcabffSJohn Scipione	\brief Hook method that is called when a mouse button is pushed down while
2884cbcabffSJohn Scipione	       the cursor is contained in the view.
2894cbcabffSJohn Scipione
2904cbcabffSJohn Scipione	By default this method selects items on a single click, and invokes them on a
2914cbcabffSJohn Scipione	double click. This method calls InitiateDrag() to allow derived classes the
2924cbcabffSJohn Scipione	opportunity to drag and drop items from the list.
2934cbcabffSJohn Scipione
2944cbcabffSJohn Scipione	\param point The \a point where the mouse button was pushed down.
2954cbcabffSJohn Scipione
2964cbcabffSJohn Scipione	\see BView::MouseDown()
29747852bffSJohn Scipione
29847852bffSJohn Scipione	\since BeOS R3
2994cbcabffSJohn Scipione*/
3004cbcabffSJohn Scipione
3014cbcabffSJohn Scipione
3024cbcabffSJohn Scipione/*!
3034cbcabffSJohn Scipione	\fn void BListView::MouseUp(BPoint where)
3044cbcabffSJohn Scipione	\brief Hook method that is called when a mouse button is released while
3054cbcabffSJohn Scipione	       the cursor is contained in the view.
3064cbcabffSJohn Scipione
3074cbcabffSJohn Scipione	\param where The location that the mouse button was released.
3084cbcabffSJohn Scipione
3094cbcabffSJohn Scipione	\see BView::MouseUp()
31047852bffSJohn Scipione
31147852bffSJohn Scipione	\since BeOS R3
3124cbcabffSJohn Scipione*/
3134cbcabffSJohn Scipione
3144cbcabffSJohn Scipione
3154cbcabffSJohn Scipione/*!
3164cbcabffSJohn Scipione	\fn void BListView::MouseMoved(BPoint where, uint32 code,
3174cbcabffSJohn Scipione		const BMessage* dragMessage)
3184cbcabffSJohn Scipione	\brief Hook method that is called whenever the mouse cursor enters, exits
3194cbcabffSJohn Scipione	       or moves inside the list view.
3204cbcabffSJohn Scipione
3214cbcabffSJohn Scipione	\param where The point where the mouse cursor has moved to.
3224cbcabffSJohn Scipione	\param code A code which indicating if the mouse entered or exited the view.
3234cbcabffSJohn Scipione	\param dragMessage A message containing drag and drop information.
3244cbcabffSJohn Scipione
3254cbcabffSJohn Scipione	\see BView::MouseMoved()
32647852bffSJohn Scipione
32747852bffSJohn Scipione	\since BeOS R3
3284cbcabffSJohn Scipione*/
3294cbcabffSJohn Scipione
3304cbcabffSJohn Scipione
3314cbcabffSJohn Scipione/*!
3324cbcabffSJohn Scipione	\fn bool BListView::InitiateDrag(BPoint point, int32 index, bool wasSelected)
3334cbcabffSJohn Scipione	\brief Hook method called when a drag and drop operation is initiated.
3344cbcabffSJohn Scipione
335853f7246SJohn Scipione	This method is used by derived classes to implement drag and drop.
336853f7246SJohn Scipione	This method is called by the MouseDown() method. If the derived
337853f7246SJohn Scipione	class initiates the drag & drop operation you should return
338853f7246SJohn Scipione	\c true, otherwise return \c false. By default this method returns
339853f7246SJohn Scipione	\c false.
3404cbcabffSJohn Scipione
3414cbcabffSJohn Scipione	\param point Where the drag & drop operation started.
3424cbcabffSJohn Scipione	\param index
3434cbcabffSJohn Scipione	\param wasSelected Indicates whether or not the item was selected.
3444cbcabffSJohn Scipione
345853f7246SJohn Scipione	\returns \c true if a drag & drop operation was initiated, \c false
346853f7246SJohn Scipione	         otherwise.
34747852bffSJohn Scipione
34847852bffSJohn Scipione	\since BeOS R3
3494cbcabffSJohn Scipione*/
3504cbcabffSJohn Scipione
3514cbcabffSJohn Scipione
3524cbcabffSJohn Scipione/*!
3534cbcabffSJohn Scipione	\fn void BListView::SelectionChanged()
3544cbcabffSJohn Scipione	\brief Hook method that is called when the selection changes.
3554cbcabffSJohn Scipione
3564cbcabffSJohn Scipione	This method should be implemented by derived classes, the default
3574cbcabffSJohn Scipione	implementation does nothing.
35847852bffSJohn Scipione
35947852bffSJohn Scipione	\since BeOS R3
3604cbcabffSJohn Scipione*/
3614cbcabffSJohn Scipione
3624cbcabffSJohn Scipione
3634cbcabffSJohn Scipione//! @}
3644cbcabffSJohn Scipione
3654cbcabffSJohn Scipione
3664cbcabffSJohn Scipione/*!
36747852bffSJohn Scipione	\name Resizing
3684cbcabffSJohn Scipione*/
3694cbcabffSJohn Scipione
3704cbcabffSJohn Scipione
3714cbcabffSJohn Scipione//! @{
3724cbcabffSJohn Scipione
3734cbcabffSJohn Scipione
3744cbcabffSJohn Scipione/*!
3754cbcabffSJohn Scipione	\fn void BListView::ResizeToPreferred()
376*44b87466SJohn Scipione	\brief Resize the view to its preferred size.
3774cbcabffSJohn Scipione
3784cbcabffSJohn Scipione	\see BView::ResizeToPreferred()
37947852bffSJohn Scipione
38047852bffSJohn Scipione	\since BeOS R3
3814cbcabffSJohn Scipione*/
3824cbcabffSJohn Scipione
3834cbcabffSJohn Scipione
3844cbcabffSJohn Scipione/*!
3854cbcabffSJohn Scipione	\fn void BListView::GetPreferredSize(float *_width, float *_height)
3864cbcabffSJohn Scipione	\brief Fill out the \a _width and \a _height parameters with the preferred
3874cbcabffSJohn Scipione	       width and height of the list view.
3884cbcabffSJohn Scipione
3894cbcabffSJohn Scipione	\param _width The list view's preferred width is written to \a _width.
3904cbcabffSJohn Scipione	\param _height The list view's preferred height is written to \a _height.
3914cbcabffSJohn Scipione
3924cbcabffSJohn Scipione	\see BView::GetPreferredSize()
39347852bffSJohn Scipione
39447852bffSJohn Scipione	\since BeOS R3
3954cbcabffSJohn Scipione*/
3964cbcabffSJohn Scipione
3974cbcabffSJohn Scipione
3984cbcabffSJohn Scipione/*!
3994cbcabffSJohn Scipione	\fn BSize BListView::MinSize()
4004cbcabffSJohn Scipione	\brief Returns the minimum size of the list view.
4014cbcabffSJohn Scipione
4024cbcabffSJohn Scipione	\return The minimum size of the list view as a BSize.
4034cbcabffSJohn Scipione
4044cbcabffSJohn Scipione	\see BView::MinSize()
40547852bffSJohn Scipione
40647852bffSJohn Scipione	\since Haiku R1
4074cbcabffSJohn Scipione*/
4084cbcabffSJohn Scipione
4094cbcabffSJohn Scipione
4104cbcabffSJohn Scipione/*!
4114cbcabffSJohn Scipione	\fn BSize BListView::MaxSize()
4124cbcabffSJohn Scipione	\brief Returns the maximum size of the list view.
4134cbcabffSJohn Scipione
4144cbcabffSJohn Scipione	\return The maximum size of the list view as a BSize.
4154cbcabffSJohn Scipione
4164cbcabffSJohn Scipione	\see BView::MaxSize()
41747852bffSJohn Scipione
41847852bffSJohn Scipione	\since Haiku R1
4194cbcabffSJohn Scipione*/
4204cbcabffSJohn Scipione
4214cbcabffSJohn Scipione
4224cbcabffSJohn Scipione/*!
4234cbcabffSJohn Scipione	\fn BSize BListView::PreferredSize()
4244cbcabffSJohn Scipione	\brief Returns the preferred size of the list view.
4254cbcabffSJohn Scipione
4264cbcabffSJohn Scipione	\return The preferred size of the list view as a BSize.
4274cbcabffSJohn Scipione
4284cbcabffSJohn Scipione	\see BView::PreferredSize()
42947852bffSJohn Scipione
43047852bffSJohn Scipione	\since Haiku R1
4314cbcabffSJohn Scipione*/
4324cbcabffSJohn Scipione
4334cbcabffSJohn Scipione
4344cbcabffSJohn Scipione//! @}
4354cbcabffSJohn Scipione
4364cbcabffSJohn Scipione
4374cbcabffSJohn Scipione/*!
4384cbcabffSJohn Scipione	\fn void BListView::MakeFocus(bool focused)
4394cbcabffSJohn Scipione	\brief Highlight or unhighlight the selection when the list view acquires
4404cbcabffSJohn Scipione	       or loses its focus state.
4414cbcabffSJohn Scipione
4424cbcabffSJohn Scipione	\param focused \c true to receive focus or \c false to lose it.
4434cbcabffSJohn Scipione
4444cbcabffSJohn Scipione	\see BView::MakeFocus()
44547852bffSJohn Scipione
44647852bffSJohn Scipione	\since BeOS R3
4474cbcabffSJohn Scipione*/
4484cbcabffSJohn Scipione
4494cbcabffSJohn Scipione
4504cbcabffSJohn Scipione/*!
4514cbcabffSJohn Scipione	\fn void BListView::SetFont(const BFont* font, uint32 mask)
452853f7246SJohn Scipione	\brief Sets the font of the list view to \a font with the font
453853f7246SJohn Scipione	       parameters set by \a mask.
4544cbcabffSJohn Scipione
4554cbcabffSJohn Scipione	\param font The \a font to set the list view to.
4564cbcabffSJohn Scipione	\param mask A \a mask indicating which properties of \a font to set.
4574cbcabffSJohn Scipione
4584cbcabffSJohn Scipione	\see BView::SetFont()
45947852bffSJohn Scipione
46047852bffSJohn Scipione	\since BeOS R3
4614cbcabffSJohn Scipione*/
4624cbcabffSJohn Scipione
4634cbcabffSJohn Scipione
4644cbcabffSJohn Scipione/*!
4654cbcabffSJohn Scipione	\fn void BListView::ScrollTo(BPoint point)
4664cbcabffSJohn Scipione	\brief Scroll the view to the specified \a point.
4674cbcabffSJohn Scipione
4684cbcabffSJohn Scipione	\param point The location to scroll the list view to.
4694cbcabffSJohn Scipione
4704cbcabffSJohn Scipione	\see BView::ScrollTo()
47147852bffSJohn Scipione
47247852bffSJohn Scipione	\since BeOS R3
4734cbcabffSJohn Scipione*/
4744cbcabffSJohn Scipione
4754cbcabffSJohn Scipione
4764cbcabffSJohn Scipione/*!
47747852bffSJohn Scipione	\name Adding/Removing Items
4784cbcabffSJohn Scipione*/
4794cbcabffSJohn Scipione
4804cbcabffSJohn Scipione
4814cbcabffSJohn Scipione//! @{
4824cbcabffSJohn Scipione
4834cbcabffSJohn Scipione
4844cbcabffSJohn Scipione/*!
4854cbcabffSJohn Scipione	\fn bool BListView::AddItem(BListItem *item, int32 index)
4864cbcabffSJohn Scipione	\brief Add an \a item to the list view at the specified \a index.
4874cbcabffSJohn Scipione
4884cbcabffSJohn Scipione	\param item The list item to add.
489853f7246SJohn Scipione	\param index The \a index of where to add the list item, if not
490853f7246SJohn Scipione	       specified the item is added to the end.
4914cbcabffSJohn Scipione
4924cbcabffSJohn Scipione	\return \c true if the list item was added, \c false otherwise.
49347852bffSJohn Scipione
49447852bffSJohn Scipione	\since BeOS R3
4954cbcabffSJohn Scipione*/
4964cbcabffSJohn Scipione
4974cbcabffSJohn Scipione
4984cbcabffSJohn Scipione/*!
4994cbcabffSJohn Scipione	\fn bool BListView::AddList(BList* list, int32 index)
500853f7246SJohn Scipione	\brief Add a \a list of list items to the list view at the specified
501853f7246SJohn Scipione	       \a index.
5024cbcabffSJohn Scipione
5034cbcabffSJohn Scipione	\param list The \a list of list items to add.
5044cbcabffSJohn Scipione	\param index The \a index of where to add the list, if not specified the
5054cbcabffSJohn Scipione	       \a list is added to the end.
5064cbcabffSJohn Scipione
5074cbcabffSJohn Scipione	\return \c true if the \a list was added, \c false otherwise.
50847852bffSJohn Scipione
50947852bffSJohn Scipione	\since BeOS R3
5104cbcabffSJohn Scipione*/
5114cbcabffSJohn Scipione
5124cbcabffSJohn Scipione
5134cbcabffSJohn Scipione/*!
5144cbcabffSJohn Scipione	\fn bool BListView::AddList(BList* list)
515080bf8feSJohn Scipione	\brief Add a \a list of list items to the end of the list view.
5164cbcabffSJohn Scipione
5174cbcabffSJohn Scipione	\param list The \a list of list items to add.
5184cbcabffSJohn Scipione
5194cbcabffSJohn Scipione	\return \c true if the \a list was added, \c false otherwise.
52047852bffSJohn Scipione
52147852bffSJohn Scipione	\since BeOS R3
5224cbcabffSJohn Scipione*/
5234cbcabffSJohn Scipione
5244cbcabffSJohn Scipione
5254cbcabffSJohn Scipione/*!
5264cbcabffSJohn Scipione	\fn BListItem* BListView::RemoveItem(int32 index)
5274cbcabffSJohn Scipione	\brief Remove the item at \a index from the list.
5284cbcabffSJohn Scipione
5294cbcabffSJohn Scipione	\param index The \a index of the item to remove.
5304cbcabffSJohn Scipione
5314cbcabffSJohn Scipione	\return \c true if the item was removed, \c false otherwise.
53247852bffSJohn Scipione
53347852bffSJohn Scipione	\since BeOS R3
5344cbcabffSJohn Scipione*/
5354cbcabffSJohn Scipione
5364cbcabffSJohn Scipione
5374cbcabffSJohn Scipione/*!
5384cbcabffSJohn Scipione	\fn bool BListView::RemoveItem(BListItem* item)
5394cbcabffSJohn Scipione	\brief Remove the specified list item.
5404cbcabffSJohn Scipione
5414cbcabffSJohn Scipione	\param item The list item to remove.
5424cbcabffSJohn Scipione
5434cbcabffSJohn Scipione	\return \c true if the \a item was removed, \c false otherwise.
54447852bffSJohn Scipione
54547852bffSJohn Scipione	\since BeOS R3
5464cbcabffSJohn Scipione*/
5474cbcabffSJohn Scipione
5484cbcabffSJohn Scipione
5494cbcabffSJohn Scipione/*!
5504cbcabffSJohn Scipione	\fn bool BListView::RemoveItems(int32 index, int32 count)
5514cbcabffSJohn Scipione	\brief Removes the items from \a index and the next \a count items.
5524cbcabffSJohn Scipione
5534cbcabffSJohn Scipione	\param index The location to start removing items from.
5544cbcabffSJohn Scipione	\param count The number of items past \a index to remove.
5554cbcabffSJohn Scipione
5564cbcabffSJohn Scipione	return \c true if the \a items were removed, \c false otherwise.
55747852bffSJohn Scipione
55847852bffSJohn Scipione	\since BeOS R3
5594cbcabffSJohn Scipione*/
5604cbcabffSJohn Scipione
5614cbcabffSJohn Scipione
5624cbcabffSJohn Scipione//! @}
5634cbcabffSJohn Scipione
5644cbcabffSJohn Scipione
5654cbcabffSJohn Scipione/*!
56647852bffSJohn Scipione	\name Selection and Invocation Message Methods
5674cbcabffSJohn Scipione*/
5684cbcabffSJohn Scipione
5694cbcabffSJohn Scipione
5704cbcabffSJohn Scipione//! @{
5714cbcabffSJohn Scipione
5724cbcabffSJohn Scipione
5734cbcabffSJohn Scipione/*!
5744cbcabffSJohn Scipione	\fn void BListView::SetSelectionMessage(BMessage* message)
575853f7246SJohn Scipione	\brief Sets the \a message that the list view sends when a new item
576853f7246SJohn Scipione	       is selected.
5774cbcabffSJohn Scipione
5784cbcabffSJohn Scipione	\param message The selection \a message to set.
57947852bffSJohn Scipione
58047852bffSJohn Scipione	\since BeOS R3
5814cbcabffSJohn Scipione*/
5824cbcabffSJohn Scipione
5834cbcabffSJohn Scipione
5844cbcabffSJohn Scipione/*!
5854cbcabffSJohn Scipione	\fn void BListView::SetInvocationMessage(BMessage* message)
5864cbcabffSJohn Scipione	Sets the \a message that the list view sends when an item is invoked.
5874cbcabffSJohn Scipione
5884cbcabffSJohn Scipione	\param message The invocation \a message to set.
5894cbcabffSJohn Scipione
5904cbcabffSJohn Scipione	\see BInvoker::SetMessage()
59147852bffSJohn Scipione
59247852bffSJohn Scipione	\since BeOS R3
5934cbcabffSJohn Scipione*/
5944cbcabffSJohn Scipione
5954cbcabffSJohn Scipione
5964cbcabffSJohn Scipione/*!
5974cbcabffSJohn Scipione	\fn BMessage* BListView::InvocationMessage() const
5984cbcabffSJohn Scipione	\brief Returns the message that is send when an item is invoked.
5994cbcabffSJohn Scipione
6004cbcabffSJohn Scipione	\return The current invocation method as a BMessage.
6014cbcabffSJohn Scipione
6024cbcabffSJohn Scipione	\see BInvoker::Message()
60347852bffSJohn Scipione
60447852bffSJohn Scipione	\since BeOS R3
6054cbcabffSJohn Scipione*/
6064cbcabffSJohn Scipione
6074cbcabffSJohn Scipione
6084cbcabffSJohn Scipione/*!
6094cbcabffSJohn Scipione	\fn uint32 BListView::InvocationCommand() const
6104cbcabffSJohn Scipione	\brief Returns the what parameter of the current invocation method.
6114cbcabffSJohn Scipione
6124cbcabffSJohn Scipione	\returns The what parameter of the currently set invocation method.
6134cbcabffSJohn Scipione
6144cbcabffSJohn Scipione	\see BInvoker::Command()
61547852bffSJohn Scipione
61647852bffSJohn Scipione	\since BeOS R3
6174cbcabffSJohn Scipione*/
6184cbcabffSJohn Scipione
6194cbcabffSJohn Scipione
6204cbcabffSJohn Scipione/*!
6214cbcabffSJohn Scipione	\fn BMessage* BListView::SelectionMessage() const
6224cbcabffSJohn Scipione	\brief Returns the message that is send when an item is selected.
6234cbcabffSJohn Scipione
6244cbcabffSJohn Scipione	\return The current selection message as a BMessage.
62547852bffSJohn Scipione
62647852bffSJohn Scipione	\since BeOS R3
6274cbcabffSJohn Scipione*/
6284cbcabffSJohn Scipione
6294cbcabffSJohn Scipione
6304cbcabffSJohn Scipione/*!
6314cbcabffSJohn Scipione	\fn uint32 BListView::SelectionCommand() const
6324cbcabffSJohn Scipione	\brief Returns the what parameter of the message that is send when an item is
6334cbcabffSJohn Scipione	       selected.
6344cbcabffSJohn Scipione
6354cbcabffSJohn Scipione	\return The what parameter of the current selection message.
63647852bffSJohn Scipione
63747852bffSJohn Scipione	\since BeOS R3
6384cbcabffSJohn Scipione*/
6394cbcabffSJohn Scipione
6404cbcabffSJohn Scipione
6414cbcabffSJohn Scipione//! @}
6424cbcabffSJohn Scipione
6434cbcabffSJohn Scipione
6444cbcabffSJohn Scipione/*!
64547852bffSJohn Scipione	\name List Type Methods
6464cbcabffSJohn Scipione*/
6474cbcabffSJohn Scipione
6484cbcabffSJohn Scipione
6494cbcabffSJohn Scipione//! @{
6504cbcabffSJohn Scipione
6514cbcabffSJohn Scipione
6524cbcabffSJohn Scipione/*!
6534cbcabffSJohn Scipione	\fn void BListView::SetListType(list_view_type type)
6544cbcabffSJohn Scipione	\brief Sets the list view \a type.
6554cbcabffSJohn Scipione
65647852bffSJohn Scipione
65747852bffSJohn Scipione	\since BeOS R3
6584cbcabffSJohn Scipione	\param type The list view \a type to set.
6594cbcabffSJohn Scipione*/
6604cbcabffSJohn Scipione
6614cbcabffSJohn Scipione
6624cbcabffSJohn Scipione/*!
6634cbcabffSJohn Scipione	\fn list_view_type BListView::ListType() const
6644cbcabffSJohn Scipione	\brief Returns the current list view type.
6654cbcabffSJohn Scipione
6664cbcabffSJohn Scipione	\return The list view type.
66747852bffSJohn Scipione
66847852bffSJohn Scipione	\since BeOS R3
6694cbcabffSJohn Scipione*/
6704cbcabffSJohn Scipione
6714cbcabffSJohn Scipione
6724cbcabffSJohn Scipione//! @}
6734cbcabffSJohn Scipione
6744cbcabffSJohn Scipione
6754cbcabffSJohn Scipione/*!
67647852bffSJohn Scipione	\name List Methods
6774cbcabffSJohn Scipione*/
6784cbcabffSJohn Scipione
6794cbcabffSJohn Scipione
6804cbcabffSJohn Scipione//! @{
6814cbcabffSJohn Scipione
6824cbcabffSJohn Scipione
6834cbcabffSJohn Scipione/*!
6844cbcabffSJohn Scipione	\fn BListItem* BListView::ItemAt(int32 index) const
6854cbcabffSJohn Scipione	\brief Returns the list item at the specified \a index.
6864cbcabffSJohn Scipione
6874cbcabffSJohn Scipione	\param index
6884cbcabffSJohn Scipione
6894cbcabffSJohn Scipione	\return The list item at the specified \a index.
69047852bffSJohn Scipione
69147852bffSJohn Scipione	\since BeOS R3
6924cbcabffSJohn Scipione*/
6934cbcabffSJohn Scipione
6944cbcabffSJohn Scipione
6954cbcabffSJohn Scipione/*!
6964cbcabffSJohn Scipione	\fn int32 BListView::IndexOf(BListItem* item) const
6974cbcabffSJohn Scipione	\brief Returns the index of the specified \a item.
6984cbcabffSJohn Scipione
6994cbcabffSJohn Scipione	\param item The list item to get the index of.
7004cbcabffSJohn Scipione
7014cbcabffSJohn Scipione	\return The index of the specified \a item.
70247852bffSJohn Scipione
70347852bffSJohn Scipione	\since BeOS R3
7044cbcabffSJohn Scipione*/
7054cbcabffSJohn Scipione
7064cbcabffSJohn Scipione
7074cbcabffSJohn Scipione/*!
7084cbcabffSJohn Scipione	\fn int32 BListView::IndexOf(BPoint point) const
7094cbcabffSJohn Scipione	\brief Returns the index of the item at the specified \a point.
7104cbcabffSJohn Scipione
7114cbcabffSJohn Scipione	\param point The location of the list item to get the index of.
7124cbcabffSJohn Scipione
7134cbcabffSJohn Scipione	\return The index of the list item at the specified \a point.
71447852bffSJohn Scipione
71547852bffSJohn Scipione	\since BeOS R3
7164cbcabffSJohn Scipione*/
7174cbcabffSJohn Scipione
7184cbcabffSJohn Scipione
7194cbcabffSJohn Scipione/*!
7204cbcabffSJohn Scipione	\fn BListItem* BListView::FirstItem() const
721853f7246SJohn Scipione	\brief Returns a pointer to the first list item.
7224cbcabffSJohn Scipione
723853f7246SJohn Scipione	\return A pointer to the first item in the list or \c NULL there are no items.
72447852bffSJohn Scipione
72547852bffSJohn Scipione	\since BeOS R3
7264cbcabffSJohn Scipione*/
7274cbcabffSJohn Scipione
7284cbcabffSJohn Scipione
7294cbcabffSJohn Scipione/*!
7304cbcabffSJohn Scipione	\fn BListItem* BListView::LastItem() const
731853f7246SJohn Scipione	\brief Returns a pointer to the last list item.
7324cbcabffSJohn Scipione
733853f7246SJohn Scipione	\return A pointer to the last item in the list or \c NULL there are no items.
73447852bffSJohn Scipione
73547852bffSJohn Scipione	\since BeOS R3
7364cbcabffSJohn Scipione*/
7374cbcabffSJohn Scipione
7384cbcabffSJohn Scipione
7394cbcabffSJohn Scipione/*!
7404cbcabffSJohn Scipione	\fn bool BListView::HasItem(BListItem* item) const
7414cbcabffSJohn Scipione	\brief Returns whether or not the list contains the specified \a item.
7424cbcabffSJohn Scipione
7434cbcabffSJohn Scipione	\param item The list item to check.
7444cbcabffSJohn Scipione
745853f7246SJohn Scipione	\return \c true if \a item is in the list, \c false otherwise.
74647852bffSJohn Scipione
74747852bffSJohn Scipione	\since BeOS R3
7484cbcabffSJohn Scipione*/
7494cbcabffSJohn Scipione
7504cbcabffSJohn Scipione
7514cbcabffSJohn Scipione/*!
7524cbcabffSJohn Scipione	\fn int32 BListView::CountItems() const
753853f7246SJohn Scipione	\brief Returns the number of items contained in the list view.
7544cbcabffSJohn Scipione
755853f7246SJohn Scipione	\return The number of items.
75647852bffSJohn Scipione
75747852bffSJohn Scipione	\since BeOS R3
7584cbcabffSJohn Scipione*/
7594cbcabffSJohn Scipione
7604cbcabffSJohn Scipione
7614cbcabffSJohn Scipione/*!
7624cbcabffSJohn Scipione	\fn void BListView::MakeEmpty()
763853f7246SJohn Scipione	\brief Empties the list view of all items.
76447852bffSJohn Scipione
76547852bffSJohn Scipione	\since BeOS R3
7664cbcabffSJohn Scipione*/
7674cbcabffSJohn Scipione
7684cbcabffSJohn Scipione
7694cbcabffSJohn Scipione/*!
7704cbcabffSJohn Scipione	\fn bool BListView::IsEmpty() const
771853f7246SJohn Scipione	\brief Returns whether or not the list view is empty.
7724cbcabffSJohn Scipione
773853f7246SJohn Scipione	\return \c true if the list view is empty, \c false otherwise.
77447852bffSJohn Scipione
77547852bffSJohn Scipione	\since BeOS R3
7764cbcabffSJohn Scipione*/
7774cbcabffSJohn Scipione
7784cbcabffSJohn Scipione
7794cbcabffSJohn Scipione/*!
780080bf8feSJohn Scipione	\fn void BListView::DoForEach(bool (*func)(BListItem* item))
7814cbcabffSJohn Scipione	\brief Calls the specified function on each item in the list.
7824cbcabffSJohn Scipione
783853f7246SJohn Scipione	The \a func is called on the items in order starting with the item at
784853f7246SJohn Scipione	index 0 and ending at the last item in the list. This method stops
785853f7246SJohn Scipione	calling the \a func once it returns \a true or the end of the list
786853f7246SJohn Scipione	is reached.
7874cbcabffSJohn Scipione
7884cbcabffSJohn Scipione	The first argument of \a func is a pointer to the list item.
7894cbcabffSJohn Scipione
7904cbcabffSJohn Scipione	\param func The function to call on each item.
79147852bffSJohn Scipione
79247852bffSJohn Scipione	\since BeOS R3
7934cbcabffSJohn Scipione*/
7944cbcabffSJohn Scipione
7954cbcabffSJohn Scipione
7964cbcabffSJohn Scipione/*!
797080bf8feSJohn Scipione	\fn void BListView::DoForEach(bool (*func)(BListItem* item, void* arg),
798080bf8feSJohn Scipione		void* arg)
7994cbcabffSJohn Scipione	\brief Calls the specified function on each item in the list.
8004cbcabffSJohn Scipione
801853f7246SJohn Scipione	The \a func is called on the items in order starting with the item at
802853f7246SJohn Scipione	index 0 and ending at the last item in the list. This method stops
803853f7246SJohn Scipione	calling the \a func once it returns \a true or the end of the list
804853f7246SJohn Scipione	is reached.
8054cbcabffSJohn Scipione
806853f7246SJohn Scipione	The first argument of \a func is a pointer to the list item, \a arg is
807853f7246SJohn Scipione	passed in as the second argument.
8084cbcabffSJohn Scipione
8094cbcabffSJohn Scipione	\param func The function to call on each item.
810080bf8feSJohn Scipione	\param arg The second argument of the function.
81147852bffSJohn Scipione
81247852bffSJohn Scipione	\since BeOS R3
8134cbcabffSJohn Scipione*/
8144cbcabffSJohn Scipione
8154cbcabffSJohn Scipione
8164cbcabffSJohn Scipione/*!
8174cbcabffSJohn Scipione	\fn const BListItem** BListView::Items() const
8184cbcabffSJohn Scipione	\brief Returns a pointer to the list of list items.
8194cbcabffSJohn Scipione
8204cbcabffSJohn Scipione	\returns a pointer to the list of list items.
82147852bffSJohn Scipione
82247852bffSJohn Scipione	\since BeOS R3
8234cbcabffSJohn Scipione*/
8244cbcabffSJohn Scipione
8254cbcabffSJohn Scipione
8264cbcabffSJohn Scipione//! @}
8274cbcabffSJohn Scipione
8284cbcabffSJohn Scipione
8294cbcabffSJohn Scipione/*!
8304cbcabffSJohn Scipione	\fn void BListView::InvalidateItem(int32 index)
8314cbcabffSJohn Scipione	\brief Draws the list item at the specified \a index.
8324cbcabffSJohn Scipione
8334cbcabffSJohn Scipione	\param index The \a index of the list item to draw.
83447852bffSJohn Scipione
83547852bffSJohn Scipione	\since Haiku R1
8364cbcabffSJohn Scipione*/
8374cbcabffSJohn Scipione
8384cbcabffSJohn Scipione
8394cbcabffSJohn Scipione/*!
84047852bffSJohn Scipione	\name Selection
8414cbcabffSJohn Scipione*/
8424cbcabffSJohn Scipione
8434cbcabffSJohn Scipione
8444cbcabffSJohn Scipione//! @{
8454cbcabffSJohn Scipione
8464cbcabffSJohn Scipione
8474cbcabffSJohn Scipione/*!
8484cbcabffSJohn Scipione	\fn void BListView::ScrollToSelection()
8494cbcabffSJohn Scipione	\brief Scrolls to selected list item.
85047852bffSJohn Scipione
85147852bffSJohn Scipione	\since BeOS R3
8524cbcabffSJohn Scipione*/
8534cbcabffSJohn Scipione
8544cbcabffSJohn Scipione
8554cbcabffSJohn Scipione/*!
8564cbcabffSJohn Scipione	\fn void BListView::Select(int32 index, bool extend)
8574cbcabffSJohn Scipione	\brief Selects the list item at the specified \a index.
8584cbcabffSJohn Scipione
8594cbcabffSJohn Scipione	\param index The \a index of the item to select.
8604cbcabffSJohn Scipione	\param extend Whether or not to also select child items.
86147852bffSJohn Scipione
86247852bffSJohn Scipione	\since BeOS R3
8634cbcabffSJohn Scipione*/
8644cbcabffSJohn Scipione
8654cbcabffSJohn Scipione
8664cbcabffSJohn Scipione/*!
8674cbcabffSJohn Scipione	\fn void BListView::Select(int32 start, int32 finish, bool extend)
8684cbcabffSJohn Scipione	\brief Select items from \a start to \a finish.
8694cbcabffSJohn Scipione
8704cbcabffSJohn Scipione	\param start The index of the item to start the selection.
8714cbcabffSJohn Scipione	\param finish The index of the item to end the selection.
8724cbcabffSJohn Scipione	\param extend Whether or not to also select child items.
87347852bffSJohn Scipione
87447852bffSJohn Scipione	\since BeOS R3
8754cbcabffSJohn Scipione*/
8764cbcabffSJohn Scipione
8774cbcabffSJohn Scipione
8784cbcabffSJohn Scipione/*!
8794cbcabffSJohn Scipione	\fn bool BListView::IsItemSelected(int32 index) const
8804cbcabffSJohn Scipione	\brief Returns whether or not the item at \a index is selected.
8814cbcabffSJohn Scipione
8824cbcabffSJohn Scipione	\return \c true if the item was selected, \c false otherwise.
88347852bffSJohn Scipione
88447852bffSJohn Scipione	\since BeOS R3
8854cbcabffSJohn Scipione*/
8864cbcabffSJohn Scipione
8874cbcabffSJohn Scipione
8884cbcabffSJohn Scipione/*!
8894cbcabffSJohn Scipione	\fn int32 BListView::CurrentSelection(int32 index) const
8904cbcabffSJohn Scipione	\brief Returns the index of a currently selected item relative to the passed
8914cbcabffSJohn Scipione	       in \a index.
8924cbcabffSJohn Scipione
8934cbcabffSJohn Scipione	If the index of the selected item is lower than \a index the value returned
8944cbcabffSJohn Scipione	is negative, if the index of the selected item is greater than \a index the
8954cbcabffSJohn Scipione	value returned is positive. If the index of the selected item is equal to
8964cbcabffSJohn Scipione	\a index then 0 is returned.
8974cbcabffSJohn Scipione
898853f7246SJohn Scipione	\param index The \a index of the item to get relative to the selected item's
8994cbcabffSJohn Scipione	       index.
90047852bffSJohn Scipione
90147852bffSJohn Scipione	\since BeOS R3
9024cbcabffSJohn Scipione*/
9034cbcabffSJohn Scipione
9044cbcabffSJohn Scipione
9054cbcabffSJohn Scipione//! @}
9064cbcabffSJohn Scipione
9074cbcabffSJohn Scipione
9084cbcabffSJohn Scipione/*!
9094cbcabffSJohn Scipione	\fn status_t BListView::Invoke(BMessage* message)
9104cbcabffSJohn Scipione	\brief Invoke the list view, either with the current invocation message or
9114cbcabffSJohn Scipione	       \a message if it is specified.
9124cbcabffSJohn Scipione
9134cbcabffSJohn Scipione	\param message The message to send or \c NULL to send the current invocation
9144cbcabffSJohn Scipione	       message.
9154cbcabffSJohn Scipione
9164cbcabffSJohn Scipione	\see BControl::Invoke()
91747852bffSJohn Scipione
91847852bffSJohn Scipione	\since BeOS R3
9194cbcabffSJohn Scipione*/
9204cbcabffSJohn Scipione
9214cbcabffSJohn Scipione
9224cbcabffSJohn Scipione/*!
92347852bffSJohn Scipione	\name Deselection
9244cbcabffSJohn Scipione*/
9254cbcabffSJohn Scipione
9264cbcabffSJohn Scipione
9274cbcabffSJohn Scipione//! @{
9284cbcabffSJohn Scipione
9294cbcabffSJohn Scipione
9304cbcabffSJohn Scipione/*!
9314cbcabffSJohn Scipione	\fn void BListView::DeselectAll()
9324cbcabffSJohn Scipione	\brief Deselect all items.
93347852bffSJohn Scipione
93447852bffSJohn Scipione	\since BeOS R3
9354cbcabffSJohn Scipione*/
9364cbcabffSJohn Scipione
9374cbcabffSJohn Scipione
9384cbcabffSJohn Scipione/*!
9394cbcabffSJohn Scipione	\fn void BListView::DeselectExcept(int32 exceptFrom, int32 exceptTo)
9404cbcabffSJohn Scipione	\brief Deselect all items except the items with index in the range of
9414cbcabffSJohn Scipione	       \a exceptFrom to \a exceptTo.
9424cbcabffSJohn Scipione
9434cbcabffSJohn Scipione	\param exceptFrom The index of the start of the exception list.
9444cbcabffSJohn Scipione	\param exceptTo The index of the end of the exception list.
94547852bffSJohn Scipione
94647852bffSJohn Scipione	\since BeOS R3
9474cbcabffSJohn Scipione*/
9484cbcabffSJohn Scipione
9494cbcabffSJohn Scipione
9504cbcabffSJohn Scipione/*!
9514cbcabffSJohn Scipione	\fn void BListView::Deselect(int32 index)
9524cbcabffSJohn Scipione	\brief Deselect the item at \a index.
9534cbcabffSJohn Scipione
9544cbcabffSJohn Scipione	\param index The \a index of the item to deselect.
95547852bffSJohn Scipione
95647852bffSJohn Scipione	\since BeOS R3
9574cbcabffSJohn Scipione*/
9584cbcabffSJohn Scipione
9594cbcabffSJohn Scipione
9604cbcabffSJohn Scipione//! @}
9614cbcabffSJohn Scipione
9624cbcabffSJohn Scipione
9634cbcabffSJohn Scipione/*!
9644cbcabffSJohn Scipione	\fn void BListView::SortItems(int (*cmp)(const void *, const void *))
965853f7246SJohn Scipione	\brief Sort the items according the the passed in \a cmp function.
9664cbcabffSJohn Scipione
9674cbcabffSJohn Scipione	\param cmp The compare function to use to sort the items.
96847852bffSJohn Scipione
96947852bffSJohn Scipione	\since BeOS R3
9704cbcabffSJohn Scipione*/
9714cbcabffSJohn Scipione
9724cbcabffSJohn Scipione
9734cbcabffSJohn Scipione/*!
9744cbcabffSJohn Scipione	\fn bool BListView::SwapItems(int32 a, int32 b)
9754cbcabffSJohn Scipione	\brief Swap item \a a with item \a b.
9764cbcabffSJohn Scipione
9774cbcabffSJohn Scipione	\param a The index of the first item to swap.
9784cbcabffSJohn Scipione	\param b The index of the second item to swap.
9794cbcabffSJohn Scipione
9804cbcabffSJohn Scipione	\return \c true if the items were swapped, \c false otherwise.
98147852bffSJohn Scipione
98247852bffSJohn Scipione	\since BeOS R3
9834cbcabffSJohn Scipione*/
9844cbcabffSJohn Scipione
9854cbcabffSJohn Scipione
9864cbcabffSJohn Scipione/*!
9874cbcabffSJohn Scipione	\fn bool BListView::MoveItem(int32 from, int32 to)
9884cbcabffSJohn Scipione	\brief Move the item at index \a from to the position in the list at index \a to.
9894cbcabffSJohn Scipione
9904cbcabffSJohn Scipione	\param from The index of the item to move.
9914cbcabffSJohn Scipione	\param to The index to move the item to.
9924cbcabffSJohn Scipione
9934cbcabffSJohn Scipione	\return \c true if the item was moved, \c false otherwise.
99447852bffSJohn Scipione
99547852bffSJohn Scipione	\since BeOS R3
9964cbcabffSJohn Scipione*/
9974cbcabffSJohn Scipione
9984cbcabffSJohn Scipione
9994cbcabffSJohn Scipione/*!
10004cbcabffSJohn Scipione	\fn bool BListView::ReplaceItem(int32 index, BListItem* item)
10014cbcabffSJohn Scipione	\brief Replace the item at index \a index with \a item.
10024cbcabffSJohn Scipione
10034cbcabffSJohn Scipione	\param index The \a index of the item to replace.
10044cbcabffSJohn Scipione	\param item The \a item to replace the item at \a index with.
10054cbcabffSJohn Scipione
10064cbcabffSJohn Scipione	\return \c true if the item was replaced, \c false otherwise.
100747852bffSJohn Scipione
100847852bffSJohn Scipione	\since BeOS R3
10094cbcabffSJohn Scipione*/
10104cbcabffSJohn Scipione
10114cbcabffSJohn Scipione
10124cbcabffSJohn Scipione/*!
10134cbcabffSJohn Scipione	\fn BRect BListView::ItemFrame(int32 index)
10144cbcabffSJohn Scipione	\brief Return the frame of the item at the specified \a index.
10154cbcabffSJohn Scipione
10164cbcabffSJohn Scipione	\param index The \a index of the item to get the frame of.
10174cbcabffSJohn Scipione
10184cbcabffSJohn Scipione	\returns The frame of the item at \a index.
101947852bffSJohn Scipione
102047852bffSJohn Scipione	\since BeOS R3
10214cbcabffSJohn Scipione*/
10224cbcabffSJohn Scipione
10234cbcabffSJohn Scipione
10244cbcabffSJohn Scipione/*!
10254cbcabffSJohn Scipione	\fn BHandler* BListView::ResolveSpecifier(BMessage* message, int32 index,
102647852bffSJohn Scipione		BMessage* specifier, int32 what, const char* property);
102747852bffSJohn Scipione	\brief Determines the proper handler for the passed in scripting \a message.
10284cbcabffSJohn Scipione
102947852bffSJohn Scipione	\copydetails BView::ResolveSpecifier()
10304cbcabffSJohn Scipione*/
10314cbcabffSJohn Scipione
10324cbcabffSJohn Scipione
10334cbcabffSJohn Scipione/*!
10344cbcabffSJohn Scipione	\fn status_t BListView::GetSupportedSuites(BMessage* data)
10354cbcabffSJohn Scipione	\brief Reports the suites of messages and specifiers that derived classes
10364cbcabffSJohn Scipione		understand.
10374cbcabffSJohn Scipione
103847852bffSJohn Scipione	\copydetails BView::GetSupportedSuites()
10394cbcabffSJohn Scipione*/
10404cbcabffSJohn Scipione
10414cbcabffSJohn Scipione
10424cbcabffSJohn Scipione/*!
10434cbcabffSJohn Scipione	\fn status_t BListView::Perform(perform_code code, void* _data)
10444cbcabffSJohn Scipione	\brief Performs an action give a perform_code and data. (Internal Method)
10454cbcabffSJohn Scipione
104647852bffSJohn Scipione	\copydetails BHandler::Perform()
104747852bffSJohn Scipione*/
10484cbcabffSJohn Scipione
10494cbcabffSJohn Scipione
105047852bffSJohn Scipione/*!
105147852bffSJohn Scipione	\fn bool BListView::DoMiscellaneous(MiscCode code, MiscData* data)
105247852bffSJohn Scipione	\brief Do a miscellaneous action.
105347852bffSJohn Scipione
105447852bffSJohn Scipione	\param code The action \a code to use.
105547852bffSJohn Scipione		- \c B_NO_OP: Do nothing
105647852bffSJohn Scipione		- \c B_REPLACE_OP: Replace the item in \a data
105747852bffSJohn Scipione		- \c B_MOVE_OP: Move the item in \a data.
105847852bffSJohn Scipione		- \c B_SWAP_OP: Swap the items in \a data.
105947852bffSJohn Scipione	\param data The \a data to act on.
106047852bffSJohn Scipione
106147852bffSJohn Scipione	\since Haiku R1
10624cbcabffSJohn Scipione*/
1063