1 /*****************************************************************************
2 * ListViews.h: BeOS interface list view class prototype
3 *****************************************************************************
4 * Copyright (C) 1999, 2000, 2001 VideoLAN
5 * $Id: ListViews.h,v 1.1.2.1 2002/09/29 12:06:08 titer Exp $
7 * Authors: Stephan Aßmus <stippi@yellowbites.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
30 class InterfaceWindow;
33 class PlaylistItem : public BStringItem
36 PlaylistItem( const char* name );
37 virtual ~PlaylistItem();
39 virtual void Draw( BView* owner, BRect frame,
42 bool playing = false );
46 // DragSortableListView
47 class DragSortableListView : public BListView
50 DragSortableListView( BRect frame,
53 = B_SINGLE_SELECTION_LIST,
61 virtual ~DragSortableListView();
64 virtual void Draw( BRect updateRect );
65 virtual bool InitiateDrag( BPoint point, int32 index,
67 virtual void MessageReceived( BMessage* message );
68 virtual void MouseMoved( BPoint where, uint32 transit,
69 const BMessage* dragMessage );
70 virtual void MouseUp( BPoint where );
71 virtual void WindowActivated( bool active );
72 virtual void DrawItem( BListItem *item, BRect itemFrame,
73 bool complete = false);
75 // DragSortableListView
76 virtual BListItem* CloneItem( int32 atIndex ) const = 0;
77 virtual void DrawListItem( BView* owner, int32 index,
78 BRect itemFrame ) const = 0;
79 virtual void MakeDragMessage( BMessage* message ) const = 0;
86 class PlaylistView : public DragSortableListView
89 PlaylistView( BRect frame,
90 InterfaceWindow* mainWindow );
94 virtual void AttachedToWindow();
95 virtual void MouseDown( BPoint where );
96 virtual void KeyDown( const char* bytes, int32 numBytes );
99 // DragSortableListView
100 virtual BListItem* CloneItem( int32 atIndex ) const;
101 virtual void DrawListItem( BView* owner, int32 index,
102 BRect itemFrame ) const;
103 virtual void MakeDragMessage( BMessage* message ) const;
106 void SetCurrent( int32 index );
107 void SetPlaying( bool playing );
112 InterfaceWindow* fMainWindow;
115 #endif // LIST_VIEWS_H