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 \name Scrolling 466*/ 467 468 469//! @{ 470 471 472/*! 473 \fn void BListView::ScrollTo(BPoint point) 474 \brief Scroll the view to the specified \a point. 475 476 \param point The location to scroll the list view to. 477 478 \see BView::ScrollTo() 479 480 \since BeOS R3 481*/ 482 483 484/*! 485 \fn void BListView::ScrollTo(int32 index) 486 \brief Scrolls to list item at \a index. 487 488 If above top scroll to first item, if below bottom 489 scroll to last item otherwise scroll to item at \a index. 490 491 \see IndexOf(), MouseMoved(), ScrollToSelection() 492 493 \since Haiku R1 494*/ 495 496 497/*! 498 \fn void BListView::ScrollToSelection() 499 \brief Scrolls to selected list item. 500 501 \since BeOS R3 502*/ 503 504 505//! @} 506 507 508/*! 509 \name Adding/Removing Items 510*/ 511 512 513//! @{ 514 515 516/*! 517 \fn bool BListView::AddItem(BListItem *item, int32 index) 518 \brief Add an \a item to the list view at the specified \a index. 519 520 \param item The list item to add. 521 \param index The \a index of where to add the list item, if not 522 specified the item is added to the end. 523 524 \return \c true if the list item was added, \c false otherwise. 525 526 \since BeOS R3 527*/ 528 529 530/*! 531 \fn bool BListView::AddList(BList* list, int32 index) 532 \brief Add a \a list of list items to the list view at the specified 533 \a index. 534 535 \param list The \a list of list items to add. 536 \param index The \a index of where to add the list, if not specified the 537 \a list is added to the end. 538 539 \return \c true if the \a list was added, \c false otherwise. 540 541 \since BeOS R3 542*/ 543 544 545/*! 546 \fn bool BListView::AddList(BList* list) 547 \brief Add a \a list of list items to the end of the list view. 548 549 \param list The \a list of list items to add. 550 551 \return \c true if the \a list was added, \c false otherwise. 552 553 \since BeOS R3 554*/ 555 556 557/*! 558 \fn BListItem* BListView::RemoveItem(int32 index) 559 \brief Remove the item at \a index from the list. 560 561 \param index The \a index of the item to remove. 562 563 \return \c true if the item was removed, \c false otherwise. 564 565 \since BeOS R3 566*/ 567 568 569/*! 570 \fn bool BListView::RemoveItem(BListItem* item) 571 \brief Remove the specified list item. 572 573 \param item The list item to remove. 574 575 \return \c true if the \a item was removed, \c false otherwise. 576 577 \since BeOS R3 578*/ 579 580 581/*! 582 \fn bool BListView::RemoveItems(int32 index, int32 count) 583 \brief Removes the items from \a index and the next \a count items. 584 585 \param index The location to start removing items from. 586 \param count The number of items past \a index to remove. 587 588 return \c true if the \a items were removed, \c false otherwise. 589 590 \since BeOS R3 591*/ 592 593 594//! @} 595 596 597/*! 598 \name Selection and Invocation Message Methods 599*/ 600 601 602//! @{ 603 604 605/*! 606 \fn void BListView::SetSelectionMessage(BMessage* message) 607 \brief Sets the \a message that the list view sends when a new item 608 is selected. 609 610 \param message The selection \a message to set. 611 612 \since BeOS R3 613*/ 614 615 616/*! 617 \fn void BListView::SetInvocationMessage(BMessage* message) 618 Sets the \a message that the list view sends when an item is invoked. 619 620 \param message The invocation \a message to set. 621 622 \see BInvoker::SetMessage() 623 624 \since BeOS R3 625*/ 626 627 628/*! 629 \fn BMessage* BListView::InvocationMessage() const 630 \brief Returns the message that is send when an item is invoked. 631 632 \return The current invocation method as a BMessage. 633 634 \see BInvoker::Message() 635 636 \since BeOS R3 637*/ 638 639 640/*! 641 \fn uint32 BListView::InvocationCommand() const 642 \brief Returns the what parameter of the current invocation method. 643 644 \returns The what parameter of the currently set invocation method. 645 646 \see BInvoker::Command() 647 648 \since BeOS R3 649*/ 650 651 652/*! 653 \fn BMessage* BListView::SelectionMessage() const 654 \brief Returns the message that is send when an item is selected. 655 656 \return The current selection message as a BMessage. 657 658 \since BeOS R3 659*/ 660 661 662/*! 663 \fn uint32 BListView::SelectionCommand() const 664 \brief Returns the what parameter of the message that is send when an item is 665 selected. 666 667 \return The what parameter of the current selection message. 668 669 \since BeOS R3 670*/ 671 672 673//! @} 674 675 676/*! 677 \name List Type Methods 678*/ 679 680 681//! @{ 682 683 684/*! 685 \fn void BListView::SetListType(list_view_type type) 686 \brief Sets the list view \a type. 687 688 689 \since BeOS R3 690 \param type The list view \a type to set. 691*/ 692 693 694/*! 695 \fn list_view_type BListView::ListType() const 696 \brief Returns the current list view type. 697 698 \return The list view type. 699 700 \since BeOS R3 701*/ 702 703 704//! @} 705 706 707/*! 708 \name List Methods 709*/ 710 711 712//! @{ 713 714 715/*! 716 \fn BListItem* BListView::ItemAt(int32 index) const 717 \brief Returns the list item at the specified \a index. 718 719 \param index 720 721 \return The list item at the specified \a index. 722 723 \since BeOS R3 724*/ 725 726 727/*! 728 \fn int32 BListView::IndexOf(BListItem* item) const 729 \brief Returns the index of the specified \a item. 730 731 \param item The list item to get the index of. 732 733 \return The index of the specified \a item. 734 735 \since BeOS R3 736*/ 737 738 739/*! 740 \fn int32 BListView::IndexOf(BPoint point) const 741 \brief Returns the index of the item at the specified \a point. 742 743 \param point The location of the list item to get the index of. 744 745 \return The index of the list item at the specified \a point. 746 747 \since BeOS R3 748*/ 749 750 751/*! 752 \fn BListItem* BListView::FirstItem() const 753 \brief Returns a pointer to the first list item. 754 755 \return A pointer to the first item in the list or \c NULL there are no items. 756 757 \since BeOS R3 758*/ 759 760 761/*! 762 \fn BListItem* BListView::LastItem() const 763 \brief Returns a pointer to the last list item. 764 765 \return A pointer to the last item in the list or \c NULL there are no items. 766 767 \since BeOS R3 768*/ 769 770 771/*! 772 \fn bool BListView::HasItem(BListItem* item) const 773 \brief Returns whether or not the list contains the specified \a item. 774 775 \param item The list item to check. 776 777 \return \c true if \a item is in the list, \c false otherwise. 778 779 \since BeOS R3 780*/ 781 782 783/*! 784 \fn int32 BListView::CountItems() const 785 \brief Returns the number of items contained in the list view. 786 787 \return The number of items. 788 789 \since BeOS R3 790*/ 791 792 793/*! 794 \fn void BListView::MakeEmpty() 795 \brief Empties the list view of all items. 796 797 \since BeOS R3 798*/ 799 800 801/*! 802 \fn bool BListView::IsEmpty() const 803 \brief Returns whether or not the list view is empty. 804 805 \return \c true if the list view is empty, \c false otherwise. 806 807 \since BeOS R3 808*/ 809 810 811/*! 812 \fn void BListView::DoForEach(bool (*func)(BListItem* item)) 813 \brief Calls the specified function on each item in the list. 814 815 The \a func is called on the items in order starting with the item at 816 index 0 and ending at the last item in the list. This method stops 817 calling the \a func once it returns \a true or the end of the list 818 is reached. 819 820 The first argument of \a func is a pointer to the list item. 821 822 \param func The function to call on each item. 823 824 \since BeOS R3 825*/ 826 827 828/*! 829 \fn void BListView::DoForEach(bool (*func)(BListItem* item, void* arg), 830 void* arg) 831 \brief Calls the specified function on each item in the list. 832 833 The \a func is called on the items in order starting with the item at 834 index 0 and ending at the last item in the list. This method stops 835 calling the \a func once it returns \a true or the end of the list 836 is reached. 837 838 The first argument of \a func is a pointer to the list item, \a arg is 839 passed in as the second argument. 840 841 \param func The function to call on each item. 842 \param arg The second argument of the function. 843 844 \since BeOS R3 845*/ 846 847 848/*! 849 \fn const BListItem** BListView::Items() const 850 \brief Returns a pointer to the list of list items. 851 852 \returns a pointer to the list of list items. 853 854 \since BeOS R3 855*/ 856 857 858//! @} 859 860 861/*! 862 \fn void BListView::InvalidateItem(int32 index) 863 \brief Draws the list item at the specified \a index. 864 865 \param index The \a index of the list item to draw. 866 867 \since Haiku R1 868*/ 869 870 871/*! 872 \name Selection 873*/ 874 875 876//! @{ 877 878 879/*! 880 \fn void BListView::Select(int32 index, bool extend) 881 \brief Selects the list item at the specified \a index. 882 883 \param index The \a index of the item to select. 884 \param extend Whether or not to also select child items. 885 886 \since BeOS R3 887*/ 888 889 890/*! 891 \fn void BListView::Select(int32 start, int32 finish, bool extend) 892 \brief Select items from \a start to \a finish. 893 894 \param start The index of the item to start the selection. 895 \param finish The index of the item to end the selection. 896 \param extend Whether or not to also select child items. 897 898 \since BeOS R3 899*/ 900 901 902/*! 903 \fn bool BListView::IsItemSelected(int32 index) const 904 \brief Returns whether or not the item at \a index is selected. 905 906 \return \c true if the item was selected, \c false otherwise. 907 908 \since BeOS R3 909*/ 910 911 912/*! 913 \fn int32 BListView::CurrentSelection(int32 index) const 914 \brief Returns the index of a currently selected item relative to the passed 915 in \a index. 916 917 If the index of the selected item is lower than \a index the value returned 918 is negative, if the index of the selected item is greater than \a index the 919 value returned is positive. If the index of the selected item is equal to 920 \a index then 0 is returned. 921 922 \param index The \a index of the item to get relative to the selected item's 923 index. 924 925 \since BeOS R3 926*/ 927 928 929//! @} 930 931 932/*! 933 \fn status_t BListView::Invoke(BMessage* message) 934 \brief Invoke the list view, either with the current invocation message or 935 \a message if it is specified. 936 937 \param message The message to send or \c NULL to send the current invocation 938 message. 939 940 \see BControl::Invoke() 941 942 \since BeOS R3 943*/ 944 945 946/*! 947 \name Deselection 948*/ 949 950 951//! @{ 952 953 954/*! 955 \fn void BListView::DeselectAll() 956 \brief Deselect all items. 957 958 \since BeOS R3 959*/ 960 961 962/*! 963 \fn void BListView::DeselectExcept(int32 exceptFrom, int32 exceptTo) 964 \brief Deselect all items except the items with index in the range of 965 \a exceptFrom to \a exceptTo. 966 967 \param exceptFrom The index of the start of the exception list. 968 \param exceptTo The index of the end of the exception list. 969 970 \since BeOS R3 971*/ 972 973 974/*! 975 \fn void BListView::Deselect(int32 index) 976 \brief Deselect the item at \a index. 977 978 \param index The \a index of the item to deselect. 979 980 \since BeOS R3 981*/ 982 983 984//! @} 985 986 987/*! 988 \fn void BListView::SortItems(int (*cmp)(const void *, const void *)) 989 \brief Sort the items according the the passed in \a cmp function. 990 991 \param cmp The compare function to use to sort the items. 992 993 \since BeOS R3 994*/ 995 996 997/*! 998 \fn bool BListView::SwapItems(int32 a, int32 b) 999 \brief Swap item \a a with item \a b. 1000 1001 \param a The index of the first item to swap. 1002 \param b The index of the second item to swap. 1003 1004 \return \c true if the items were swapped, \c false otherwise. 1005 1006 \since BeOS R3 1007*/ 1008 1009 1010/*! 1011 \fn bool BListView::MoveItem(int32 from, int32 to) 1012 \brief Move the item at index \a from to the position in the list at index \a to. 1013 1014 \param from The index of the item to move. 1015 \param to The index to move the item to. 1016 1017 \return \c true if the item was moved, \c false otherwise. 1018 1019 \since BeOS R3 1020*/ 1021 1022 1023/*! 1024 \fn bool BListView::ReplaceItem(int32 index, BListItem* item) 1025 \brief Replace the item at index \a index with \a item. 1026 1027 \param index The \a index of the item to replace. 1028 \param item The \a item to replace the item at \a index with. 1029 1030 \return \c true if the item was replaced, \c false otherwise. 1031 1032 \since BeOS R3 1033*/ 1034 1035 1036/*! 1037 \fn BRect BListView::ItemFrame(int32 index) 1038 \brief Return the frame of the item at the specified \a index. 1039 1040 \param index The \a index of the item to get the frame of. 1041 1042 \returns The frame of the item at \a index. 1043 1044 \since BeOS R3 1045*/ 1046 1047 1048/*! 1049 \fn BHandler* BListView::ResolveSpecifier(BMessage* message, int32 index, 1050 BMessage* specifier, int32 what, const char* property); 1051 \brief Determines the proper handler for the passed in scripting \a message. 1052 1053 \copydetails BView::ResolveSpecifier() 1054*/ 1055 1056 1057/*! 1058 \fn status_t BListView::GetSupportedSuites(BMessage* data) 1059 \brief Reports the suites of messages and specifiers that derived classes 1060 understand. 1061 1062 \copydetails BView::GetSupportedSuites() 1063*/ 1064 1065 1066/*! 1067 \fn status_t BListView::Perform(perform_code code, void* _data) 1068 \brief Performs an action give a perform_code and data. (Internal Method) 1069 1070 \copydetails BHandler::Perform() 1071*/ 1072 1073 1074/*! 1075 \fn bool BListView::DoMiscellaneous(MiscCode code, MiscData* data) 1076 \brief Do a miscellaneous action. 1077 1078 \param code The action \a code to use. 1079 - \c B_NO_OP: Do nothing 1080 - \c B_REPLACE_OP: Replace the item in \a data 1081 - \c B_MOVE_OP: Move the item in \a data. 1082 - \c B_SWAP_OP: Swap the items in \a data. 1083 \param data The \a data to act on. 1084 1085 \since Haiku R1 1086*/ 1087