xref: /haiku/docs/user/interface/ListView.dox (revision 5f4f984a94d150153bcb00a2ed780d0437859543)
1/*
2 * Copyright 2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		John Scipione, jscipione@gmail.com
7 *
8 * Corresponds to:
9 *		headers/os/interface/ListView.h	 hrev45555
10 *		src/kits/interface/ListView.cpp	 hrev45555
11 */
12
13
14/*!
15	\file ListView.h
16	\ingroup interface
17	\ingroup libbe
18	\brief ListView class definition.
19*/
20
21
22/*!
23	\class BListView
24	\ingroup interface
25	\ingroup libbe
26	\brief Displays a list of items that the user can select and invoke.
27
28	BListView's can be one of two types set by the type parameter of the
29	constructor:
30	- \c B_SINGLE_SELECTION_LIST Can select only one item in the list at a
31	     time. This is the default.
32	- \c B_MULTIPLE_SELECTION_LIST	Can select any number of items by
33	     holding down Option for a discontinuous selection, or Shift for
34	     a contiguous selection.
35
36	An example of a BListView looks like this:
37	\image html BListView_example.png
38
39	Click on an item to select it and double-click an item to invoke it. The
40	BListView doesn't define what it means to "invoke" an item. See
41	BListView::SetSelectionMessage() and BListView::SetInvocationMessage()
42	to set a message to be set when these actions occur. You can also select
43	and invoke items with keyboard keys such as the up and down arrow keys,
44	Page Up and Page Down and the Enter key or Space key to invoke the item.
45
46	This class is based on the BList class from the Support Kit and many of
47	the methods it uses behave similarly.
48
49	Although a BListView is scrollable, it doesn't provide scroll bars by
50	itself. You should add the BListView as a child of a BScrollView to make
51	it scrollable.
52
53	The code to add a BListView to a BScrollView looks something like this:
54
55\code
56	BListView* list = new BListView(frame, "List", B_SINGLE_SELECTION_LIST);
57	list->AddItem(new BStringItem("Item 1"));
58	list->AddItem(new BStringItem("Item 2"));
59	...
60	view->AddChild(new BScrollView("scroll_view", list,
61		B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true));
62\endcode
63
64	\see BScrollView for more information on scrolling views.
65	\see BList in the Support Kit.
66	\see BOutlineListView
67	\see BListItem
68
69	\since BeOS R3
70*/
71
72
73/*!
74	\fn BListView::BListView(BRect frame, const char* name, list_view_type type,
75		uint32 resizingMode, uint32 flags)
76	\brief Creates a new list view. This is the non-layout constructor.
77
78	\param frame The frame rectangle of the view.
79	\param name The name of the view.
80	\param type Whether the list view supports a single selection or multiple
81	       selections.
82	\param resizingMode The resizing mode flags. See BView for details.
83	\param flags The view flags. See BView for details.
84
85	\since BeOS R3
86*/
87
88
89/*!
90	\fn BListView::BListView(const char* name, list_view_type type,
91		uint32 flags)
92	\brief Creates a new list view suitable as part of a layout with the
93	       specified \a name, \a type, and \a flags.
94
95	\param name The name of the view.
96	\param type Whether the list view supports a single selection or multiple
97	       selections.
98	\param flags The view flags. See BView for details.
99
100	\since Haiku R1
101*/
102
103
104/*!
105	\fn BListView::BListView(list_view_type type)
106	\brief Creates a new list view suitable as part of a layout.
107
108	\param type Whether the list view supports a single selection or multiple
109	       selections.
110
111	\since Haiku R1
112*/
113
114
115/*!
116	\fn BListView::BListView(BMessage* archive)
117	\brief Creates a BListView object from the \a archive message.
118
119	\param archive The message to create the object from.
120
121	\since BeOS R3
122*/
123
124
125/*!
126	\fn BListView::~BListView()
127	\brief Delete the BListView object and free the memory used by it.
128
129	This method does not free the attached list items.
130
131	\since BeOS R3
132*/
133
134
135/*!
136	\name Archiving
137*/
138
139
140//! @{
141
142
143/*!
144	\fn BArchivable* BListView::Instantiate(BMessage* archive)
145	\brief Create a new BListView object from the message \a archive.
146
147	\copydetails BView::Instantiate()
148*/
149
150
151/*!
152	\fn status_t BListView::Archive(BMessage* data, bool deep) const
153	\brief Archive the BListView object to a message.
154
155	\copydetails BView::Archive()
156*/
157
158
159//! @}
160
161
162/*!
163	\name Hook Methods
164*/
165
166
167//! @{
168
169
170/*!
171	\fn void BListView::Draw(BRect updateRect)
172	\brief Hook method called to draw the contents of the text view.
173
174	You should not have to call this method directly, use Invalidate() instead.
175
176	\param updateRect The rectangular area to draw.
177
178	\see BView::Draw()
179
180	\since BeOS R3
181*/
182
183
184/*!
185	\fn void BListView::AttachedToWindow()
186	\brief Hook method called when the list view is added to the view hierarchy.
187
188	\copydetails BView::AttachedToWindow()
189*/
190
191
192/*!
193	\fn void BListView::DetachedFromWindow()
194	\brief Hook method that is called when the list view is removed from the
195	       view hierarchy.
196
197	\copydetails BView::DetachedFromWindow()
198*/
199
200
201/*!
202	\fn void BListView::AllAttached()
203	\brief Hook method called once all views are attached to the view.
204
205	\copydetails BView::AllAttached()
206*/
207
208
209/*!
210	\fn void BListView::AllDetached()
211	\brief Hook method called once all views are detached from the view.
212
213	\copydetails BView::AllDetached()
214*/
215
216
217/*!
218	\fn void BListView::FrameResized(float newWidth, float newHeight)
219	\brief Hook method called when the list view is resized.
220
221	\copydetails BView::FrameResized()
222*/
223
224
225/*!
226	\fn void BListView::FrameMoved(BPoint newPosition)
227	\brief Hook method called when the list view is moved.
228
229	\copydetails BView::FrameMoved()
230*/
231
232
233/*!
234	\fn void BListView::TargetedByScrollView(BScrollView* view)
235	\brief Hook method called when the list view is attached to a BScrollView.
236
237	\param view The BScrollView the list view is attached to.
238
239	\since BeOS R3
240*/
241
242
243/*!
244	\fn void BListView::WindowActivated(bool active)
245	\brief Hook method that is called when the window becomes the active window
246	       or gives up that status.
247
248	\copydetails BView::WindowActivated()
249*/
250
251
252/*!
253	\fn void BListView::MessageReceived(BMessage* message)
254	\brief Hook method called when a message is received by the list view.
255
256	\copydetails BView::MessageReceived()
257*/
258
259
260/*!
261	\fn void BListView::KeyDown(const char* bytes, int32 numBytes)
262	\brief Hook method that is called when a key is pressed while the view is
263	       the focus view of the active window.
264
265	The following keys are used by the list view by default:
266	- Up Arrow				Selects the previous item.
267	- Down Arrow			Selects the next item.
268	- Page Up				Selects the item one view height above the
269	                        current item.
270	- Page Down				Selects the item one view height below the
271	                        current item.
272	- Home					Selects the first item in the list.
273	- End					Select the last item in the list.
274	- Enter and Spacebar	Invokes the currently selected item.
275
276	\param bytes The \a bytes representing the keys pushed down.
277	\param numBytes The size of \a bytes.
278
279	\see BView::KeyDown()
280
281	\since BeOS R3
282*/
283
284
285/*!
286	\fn void BListView::MouseDown(BPoint point)
287	\brief Hook method that is called when a mouse button is pushed down while
288	       the cursor is contained in the view.
289
290	By default this method selects items on a single click, and invokes them on a
291	double click. This method calls InitiateDrag() to allow derived classes the
292	opportunity to drag and drop items from the list.
293
294	\param point The \a point where the mouse button was pushed down.
295
296	\see BView::MouseDown()
297
298	\since BeOS R3
299*/
300
301
302/*!
303	\fn void BListView::MouseUp(BPoint where)
304	\brief Hook method that is called when a mouse button is released while
305	       the cursor is contained in the view.
306
307	\param where The location that the mouse button was released.
308
309	\see BView::MouseUp()
310
311	\since BeOS R3
312*/
313
314
315/*!
316	\fn void BListView::MouseMoved(BPoint where, uint32 code,
317		const BMessage* dragMessage)
318	\brief Hook method that is called whenever the mouse cursor enters, exits
319	       or moves inside the list view.
320
321	\param where The point where the mouse cursor has moved to.
322	\param code A code which indicating if the mouse entered or exited the view.
323	\param dragMessage A message containing drag and drop information.
324
325	\see BView::MouseMoved()
326
327	\since BeOS R3
328*/
329
330
331/*!
332	\fn bool BListView::InitiateDrag(BPoint point, int32 index, bool wasSelected)
333	\brief Hook method called when a drag and drop operation is initiated.
334
335	This method is used by derived classes to implement drag and drop.
336	This method is called by the MouseDown() method. If the derived
337	class initiates the drag & drop operation you should return
338	\c true, otherwise return \c false. By default this method returns
339	\c false.
340
341	\param point Where the drag & drop operation started.
342	\param index
343	\param wasSelected Indicates whether or not the item was selected.
344
345	\returns \c true if a drag & drop operation was initiated, \c false
346	         otherwise.
347
348	\since BeOS R3
349*/
350
351
352/*!
353	\fn void BListView::SelectionChanged()
354	\brief Hook method that is called when the selection changes.
355
356	This method should be implemented by derived classes, the default
357	implementation does nothing.
358
359	\since BeOS R3
360*/
361
362
363//! @}
364
365
366/*!
367	\name Resizing
368*/
369
370
371//! @{
372
373
374/*!
375	\fn void BListView::ResizeToPreferred()
376	\brief Resize the view to its preferred size.
377
378	\see BView::ResizeToPreferred()
379
380	\since BeOS R3
381*/
382
383
384/*!
385	\fn void BListView::GetPreferredSize(float *_width, float *_height)
386	\brief Fill out the \a _width and \a _height parameters with the preferred
387	       width and height of the list view.
388
389	\param _width The list view's preferred width is written to \a _width.
390	\param _height The list view's preferred height is written to \a _height.
391
392	\see BView::GetPreferredSize()
393
394	\since BeOS R3
395*/
396
397
398/*!
399	\fn BSize BListView::MinSize()
400	\brief Returns the minimum size of the list view.
401
402	\return The minimum size of the list view as a BSize.
403
404	\see BView::MinSize()
405
406	\since Haiku R1
407*/
408
409
410/*!
411	\fn BSize BListView::MaxSize()
412	\brief Returns the maximum size of the list view.
413
414	\return The maximum size of the list view as a BSize.
415
416	\see BView::MaxSize()
417
418	\since Haiku R1
419*/
420
421
422/*!
423	\fn BSize BListView::PreferredSize()
424	\brief Returns the preferred size of the list view.
425
426	\return The preferred size of the list view as a BSize.
427
428	\see BView::PreferredSize()
429
430	\since Haiku R1
431*/
432
433
434//! @}
435
436
437/*!
438	\fn void BListView::MakeFocus(bool focused)
439	\brief Highlight or unhighlight the selection when the list view acquires
440	       or loses its focus state.
441
442	\param focused \c true to receive focus or \c false to lose it.
443
444	\see BView::MakeFocus()
445
446	\since BeOS R3
447*/
448
449
450/*!
451	\fn void BListView::SetFont(const BFont* font, uint32 mask)
452	\brief Sets the font of the list view to \a font with the font
453	       parameters set by \a mask.
454
455	\param font The \a font to set the list view to.
456	\param mask A \a mask indicating which properties of \a font to set.
457
458	\see BView::SetFont()
459
460	\since BeOS R3
461*/
462
463
464/*!
465	\fn void BListView::ScrollTo(BPoint point)
466	\brief Scroll the view to the specified \a point.
467
468	\param point The location to scroll the list view to.
469
470	\see BView::ScrollTo()
471
472	\since BeOS R3
473*/
474
475
476/*!
477	\name Adding/Removing Items
478*/
479
480
481//! @{
482
483
484/*!
485	\fn bool BListView::AddItem(BListItem *item, int32 index)
486	\brief Add an \a item to the list view at the specified \a index.
487
488	\param item The list item to add.
489	\param index The \a index of where to add the list item, if not
490	       specified the item is added to the end.
491
492	\return \c true if the list item was added, \c false otherwise.
493
494	\since BeOS R3
495*/
496
497
498/*!
499	\fn bool BListView::AddList(BList* list, int32 index)
500	\brief Add a \a list of list items to the list view at the specified
501	       \a index.
502
503	\param list The \a list of list items to add.
504	\param index The \a index of where to add the list, if not specified the
505	       \a list is added to the end.
506
507	\return \c true if the \a list was added, \c false otherwise.
508
509	\since BeOS R3
510*/
511
512
513/*!
514	\fn bool BListView::AddList(BList* list)
515	\brief Add a \a list of list items to the end of the list view.
516
517	\param list The \a list of list items to add.
518
519	\return \c true if the \a list was added, \c false otherwise.
520
521	\since BeOS R3
522*/
523
524
525/*!
526	\fn BListItem* BListView::RemoveItem(int32 index)
527	\brief Remove the item at \a index from the list.
528
529	\param index The \a index of the item to remove.
530
531	\return \c true if the item was removed, \c false otherwise.
532
533	\since BeOS R3
534*/
535
536
537/*!
538	\fn bool BListView::RemoveItem(BListItem* item)
539	\brief Remove the specified list item.
540
541	\param item The list item to remove.
542
543	\return \c true if the \a item was removed, \c false otherwise.
544
545	\since BeOS R3
546*/
547
548
549/*!
550	\fn bool BListView::RemoveItems(int32 index, int32 count)
551	\brief Removes the items from \a index and the next \a count items.
552
553	\param index The location to start removing items from.
554	\param count The number of items past \a index to remove.
555
556	return \c true if the \a items were removed, \c false otherwise.
557
558	\since BeOS R3
559*/
560
561
562//! @}
563
564
565/*!
566	\name Selection and Invocation Message Methods
567*/
568
569
570//! @{
571
572
573/*!
574	\fn void BListView::SetSelectionMessage(BMessage* message)
575	\brief Sets the \a message that the list view sends when a new item
576	       is selected.
577
578	\param message The selection \a message to set.
579
580	\since BeOS R3
581*/
582
583
584/*!
585	\fn void BListView::SetInvocationMessage(BMessage* message)
586	Sets the \a message that the list view sends when an item is invoked.
587
588	\param message The invocation \a message to set.
589
590	\see BInvoker::SetMessage()
591
592	\since BeOS R3
593*/
594
595
596/*!
597	\fn BMessage* BListView::InvocationMessage() const
598	\brief Returns the message that is send when an item is invoked.
599
600	\return The current invocation method as a BMessage.
601
602	\see BInvoker::Message()
603
604	\since BeOS R3
605*/
606
607
608/*!
609	\fn uint32 BListView::InvocationCommand() const
610	\brief Returns the what parameter of the current invocation method.
611
612	\returns The what parameter of the currently set invocation method.
613
614	\see BInvoker::Command()
615
616	\since BeOS R3
617*/
618
619
620/*!
621	\fn BMessage* BListView::SelectionMessage() const
622	\brief Returns the message that is send when an item is selected.
623
624	\return The current selection message as a BMessage.
625
626	\since BeOS R3
627*/
628
629
630/*!
631	\fn uint32 BListView::SelectionCommand() const
632	\brief Returns the what parameter of the message that is send when an item is
633	       selected.
634
635	\return The what parameter of the current selection message.
636
637	\since BeOS R3
638*/
639
640
641//! @}
642
643
644/*!
645	\name List Type Methods
646*/
647
648
649//! @{
650
651
652/*!
653	\fn void BListView::SetListType(list_view_type type)
654	\brief Sets the list view \a type.
655
656
657	\since BeOS R3
658	\param type The list view \a type to set.
659*/
660
661
662/*!
663	\fn list_view_type BListView::ListType() const
664	\brief Returns the current list view type.
665
666	\return The list view type.
667
668	\since BeOS R3
669*/
670
671
672//! @}
673
674
675/*!
676	\name List Methods
677*/
678
679
680//! @{
681
682
683/*!
684	\fn BListItem* BListView::ItemAt(int32 index) const
685	\brief Returns the list item at the specified \a index.
686
687	\param index
688
689	\return The list item at the specified \a index.
690
691	\since BeOS R3
692*/
693
694
695/*!
696	\fn int32 BListView::IndexOf(BListItem* item) const
697	\brief Returns the index of the specified \a item.
698
699	\param item The list item to get the index of.
700
701	\return The index of the specified \a item.
702
703	\since BeOS R3
704*/
705
706
707/*!
708	\fn int32 BListView::IndexOf(BPoint point) const
709	\brief Returns the index of the item at the specified \a point.
710
711	\param point The location of the list item to get the index of.
712
713	\return The index of the list item at the specified \a point.
714
715	\since BeOS R3
716*/
717
718
719/*!
720	\fn BListItem* BListView::FirstItem() const
721	\brief Returns a pointer to the first list item.
722
723	\return A pointer to the first item in the list or \c NULL there are no items.
724
725	\since BeOS R3
726*/
727
728
729/*!
730	\fn BListItem* BListView::LastItem() const
731	\brief Returns a pointer to the last list item.
732
733	\return A pointer to the last item in the list or \c NULL there are no items.
734
735	\since BeOS R3
736*/
737
738
739/*!
740	\fn bool BListView::HasItem(BListItem* item) const
741	\brief Returns whether or not the list contains the specified \a item.
742
743	\param item The list item to check.
744
745	\return \c true if \a item is in the list, \c false otherwise.
746
747	\since BeOS R3
748*/
749
750
751/*!
752	\fn int32 BListView::CountItems() const
753	\brief Returns the number of items contained in the list view.
754
755	\return The number of items.
756
757	\since BeOS R3
758*/
759
760
761/*!
762	\fn void BListView::MakeEmpty()
763	\brief Empties the list view of all items.
764
765	\since BeOS R3
766*/
767
768
769/*!
770	\fn bool BListView::IsEmpty() const
771	\brief Returns whether or not the list view is empty.
772
773	\return \c true if the list view is empty, \c false otherwise.
774
775	\since BeOS R3
776*/
777
778
779/*!
780	\fn void BListView::DoForEach(bool (*func)(BListItem* item))
781	\brief Calls the specified function on each item in the list.
782
783	The \a func is called on the items in order starting with the item at
784	index 0 and ending at the last item in the list. This method stops
785	calling the \a func once it returns \a true or the end of the list
786	is reached.
787
788	The first argument of \a func is a pointer to the list item.
789
790	\param func The function to call on each item.
791
792	\since BeOS R3
793*/
794
795
796/*!
797	\fn void BListView::DoForEach(bool (*func)(BListItem* item, void* arg),
798		void* arg)
799	\brief Calls the specified function on each item in the list.
800
801	The \a func is called on the items in order starting with the item at
802	index 0 and ending at the last item in the list. This method stops
803	calling the \a func once it returns \a true or the end of the list
804	is reached.
805
806	The first argument of \a func is a pointer to the list item, \a arg is
807	passed in as the second argument.
808
809	\param func The function to call on each item.
810	\param arg The second argument of the function.
811
812	\since BeOS R3
813*/
814
815
816/*!
817	\fn const BListItem** BListView::Items() const
818	\brief Returns a pointer to the list of list items.
819
820	\returns a pointer to the list of list items.
821
822	\since BeOS R3
823*/
824
825
826//! @}
827
828
829/*!
830	\fn void BListView::InvalidateItem(int32 index)
831	\brief Draws the list item at the specified \a index.
832
833	\param index The \a index of the list item to draw.
834
835	\since Haiku R1
836*/
837
838
839/*!
840	\name Selection
841*/
842
843
844//! @{
845
846
847/*!
848	\fn void BListView::ScrollToSelection()
849	\brief Scrolls to selected list item.
850
851	\since BeOS R3
852*/
853
854
855/*!
856	\fn void BListView::Select(int32 index, bool extend)
857	\brief Selects the list item at the specified \a index.
858
859	\param index The \a index of the item to select.
860	\param extend Whether or not to also select child items.
861
862	\since BeOS R3
863*/
864
865
866/*!
867	\fn void BListView::Select(int32 start, int32 finish, bool extend)
868	\brief Select items from \a start to \a finish.
869
870	\param start The index of the item to start the selection.
871	\param finish The index of the item to end the selection.
872	\param extend Whether or not to also select child items.
873
874	\since BeOS R3
875*/
876
877
878/*!
879	\fn bool BListView::IsItemSelected(int32 index) const
880	\brief Returns whether or not the item at \a index is selected.
881
882	\return \c true if the item was selected, \c false otherwise.
883
884	\since BeOS R3
885*/
886
887
888/*!
889	\fn int32 BListView::CurrentSelection(int32 index) const
890	\brief Returns the index of a currently selected item relative to the passed
891	       in \a index.
892
893	If the index of the selected item is lower than \a index the value returned
894	is negative, if the index of the selected item is greater than \a index the
895	value returned is positive. If the index of the selected item is equal to
896	\a index then 0 is returned.
897
898	\param index The \a index of the item to get relative to the selected item's
899	       index.
900
901	\since BeOS R3
902*/
903
904
905//! @}
906
907
908/*!
909	\fn status_t BListView::Invoke(BMessage* message)
910	\brief Invoke the list view, either with the current invocation message or
911	       \a message if it is specified.
912
913	\param message The message to send or \c NULL to send the current invocation
914	       message.
915
916	\see BControl::Invoke()
917
918	\since BeOS R3
919*/
920
921
922/*!
923	\name Deselection
924*/
925
926
927//! @{
928
929
930/*!
931	\fn void BListView::DeselectAll()
932	\brief Deselect all items.
933
934	\since BeOS R3
935*/
936
937
938/*!
939	\fn void BListView::DeselectExcept(int32 exceptFrom, int32 exceptTo)
940	\brief Deselect all items except the items with index in the range of
941	       \a exceptFrom to \a exceptTo.
942
943	\param exceptFrom The index of the start of the exception list.
944	\param exceptTo The index of the end of the exception list.
945
946	\since BeOS R3
947*/
948
949
950/*!
951	\fn void BListView::Deselect(int32 index)
952	\brief Deselect the item at \a index.
953
954	\param index The \a index of the item to deselect.
955
956	\since BeOS R3
957*/
958
959
960//! @}
961
962
963/*!
964	\fn void BListView::SortItems(int (*cmp)(const void *, const void *))
965	\brief Sort the items according the the passed in \a cmp function.
966
967	\param cmp The compare function to use to sort the items.
968
969	\since BeOS R3
970*/
971
972
973/*!
974	\fn bool BListView::SwapItems(int32 a, int32 b)
975	\brief Swap item \a a with item \a b.
976
977	\param a The index of the first item to swap.
978	\param b The index of the second item to swap.
979
980	\return \c true if the items were swapped, \c false otherwise.
981
982	\since BeOS R3
983*/
984
985
986/*!
987	\fn bool BListView::MoveItem(int32 from, int32 to)
988	\brief Move the item at index \a from to the position in the list at index \a to.
989
990	\param from The index of the item to move.
991	\param to The index to move the item to.
992
993	\return \c true if the item was moved, \c false otherwise.
994
995	\since BeOS R3
996*/
997
998
999/*!
1000	\fn bool BListView::ReplaceItem(int32 index, BListItem* item)
1001	\brief Replace the item at index \a index with \a item.
1002
1003	\param index The \a index of the item to replace.
1004	\param item The \a item to replace the item at \a index with.
1005
1006	\return \c true if the item was replaced, \c false otherwise.
1007
1008	\since BeOS R3
1009*/
1010
1011
1012/*!
1013	\fn BRect BListView::ItemFrame(int32 index)
1014	\brief Return the frame of the item at the specified \a index.
1015
1016	\param index The \a index of the item to get the frame of.
1017
1018	\returns The frame of the item at \a index.
1019
1020	\since BeOS R3
1021*/
1022
1023
1024/*!
1025	\fn BHandler* BListView::ResolveSpecifier(BMessage* message, int32 index,
1026		BMessage* specifier, int32 what, const char* property);
1027	\brief Determines the proper handler for the passed in scripting \a message.
1028
1029	\copydetails BView::ResolveSpecifier()
1030*/
1031
1032
1033/*!
1034	\fn status_t BListView::GetSupportedSuites(BMessage* data)
1035	\brief Reports the suites of messages and specifiers that derived classes
1036		understand.
1037
1038	\copydetails BView::GetSupportedSuites()
1039*/
1040
1041
1042/*!
1043	\fn status_t BListView::Perform(perform_code code, void* _data)
1044	\brief Performs an action give a perform_code and data. (Internal Method)
1045
1046	\copydetails BHandler::Perform()
1047*/
1048
1049
1050/*!
1051	\fn bool BListView::DoMiscellaneous(MiscCode code, MiscData* data)
1052	\brief Do a miscellaneous action.
1053
1054	\param code The action \a code to use.
1055		- \c B_NO_OP: Do nothing
1056		- \c B_REPLACE_OP: Replace the item in \a data
1057		- \c B_MOVE_OP: Move the item in \a data.
1058		- \c B_SWAP_OP: Swap the items in \a data.
1059	\param data The \a data to act on.
1060
1061	\since Haiku R1
1062*/
1063