]> git.sesse.net Git - vlc/blob - plugins/beos/InterfaceWindow.h
e2effc116fe603e870e09cdf65c1d2e254ddacc4
[vlc] / plugins / beos / InterfaceWindow.h
1 /*****************************************************************************
2  * InterfaceWindow.h: BeOS interface window class prototype
3  *****************************************************************************
4  * Copyright (C) 1999, 2000, 2001 VideoLAN
5  *
6  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
7  *          Tony Castley <tcastley@mail.powerup.com.au>
8  *          Richard Shepherd <richard@rshepherd.demon.co.uk>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  * 
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
23  *****************************************************************************/
24
25 class SeekSlider;
26 class MediaSlider;
27
28 class CDMenu : public BMenu
29 {
30 public:
31         CDMenu(const char *name);
32         ~CDMenu();
33         void AttachedToWindow(void);
34 private:
35         int GetCD(const char *directory);
36 };
37
38 class InterfaceWindow : public BWindow
39 {
40 public:
41     InterfaceWindow( BRect frame, const char *name, intf_thread_t  *p_intf );
42     ~InterfaceWindow();
43
44     // standard window member
45     virtual bool    QuitRequested();
46     virtual void    MessageReceived(BMessage *message);
47     
48         
49     intf_thread_t  *p_intf;
50         MediaSlider * p_vol;
51         SeekSlider * p_seek;
52         BCheckBox * p_mute;
53         sem_id  fScrubSem;
54         bool    fSeeking;
55         BFilePanel *file_panel;
56
57 };
58
59 class InterfaceView : public BView
60 {
61 public:
62     InterfaceView();
63     ~InterfaceView();
64
65     virtual void    MessageReceived(BMessage *message);
66 };
67
68
69 class MediaSlider : public BSlider
70 {
71 public:
72         MediaSlider(BRect frame,
73                                 BMessage *message,
74                                 int32 minValue,
75                                 int32 maxValue);
76         ~MediaSlider();
77         virtual void DrawThumb(void);
78 };
79                                 
80
81 class SeekSlider : public MediaSlider
82 {
83 public:
84         SeekSlider(BRect frame,
85                                 InterfaceWindow *owner,
86                                 int32 minValue,
87                                 int32 maxValue,
88                                 thumb_style thumbType = B_TRIANGLE_THUMB);
89
90         ~SeekSlider();
91         
92         virtual void MouseDown(BPoint);
93         virtual void MouseUp(BPoint pt);
94         virtual void MouseMoved(BPoint pt, uint32 c, const BMessage *m);
95 private:
96         InterfaceWindow*        fOwner; 
97         bool fMouseDown;
98 };