]> git.sesse.net Git - vlc/blob - modules/gui/win32/playlist.h
4e713a6b407273768caf54400cf2502e06a0f1bd
[vlc] / modules / gui / win32 / playlist.h
1 /*****************************************************************************\r
2  * playlist.h: Interface for the playlist dialog\r
3  *****************************************************************************\r
4  * Copyright (C) 2002 VideoLAN\r
5  *\r
6  * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>\r
7  *\r
8  * This program is free software; you can redistribute it and/or modify\r
9  * it under the terms of the GNU General Public License as published by\r
10  * the Free Software Foundation; either version 2 of the License, or\r
11  * (at your option) any later version.\r
12  * \r
13  * This program is distributed in the hope that it will be useful,\r
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16  * GNU General Public License for more details.\r
17  *\r
18  * You should have received a copy of the GNU General Public License\r
19  * along with this program; if not, write to the Free Software\r
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.\r
21  *****************************************************************************/\r
22 \r
23 #ifndef playlistH\r
24 #define playlistH\r
25 //---------------------------------------------------------------------------\r
26 #include <Classes.hpp>\r
27 #include <Controls.hpp>\r
28 #include <StdCtrls.hpp>\r
29 #include <Forms.hpp>\r
30 #include <Buttons.hpp>\r
31 #include <Menus.hpp>\r
32 #include <Grids.hpp>\r
33 #include <ComCtrls.hpp>\r
34 #include <ActnList.hpp>\r
35 \r
36 #include <oleidl.h>                                   /* for drag and drop */\r
37 \r
38 /*****************************************************************************\r
39  * This message is sent to the controls registered as drop targets\r
40  *****************************************************************************/\r
41 #define WM_OLEDROP WM_USER + 1\r
42 \r
43 //---------------------------------------------------------------------------\r
44 class TPlaylistDlg : public TForm\r
45 {\r
46 __published:    // IDE-managed Components\r
47     TBitBtn *BitBtnOk;\r
48     TMainMenu *MainMenuPlaylist;\r
49     TMenuItem *MenuAdd;\r
50     TMenuItem *MenuAddFile;\r
51     TMenuItem *MenuAddDisc;\r
52     TMenuItem *MenuAddNet;\r
53     TMenuItem *MenuAddUrl;\r
54     TMenuItem *MenuDelete;\r
55     TMenuItem *MenuDeleteAll;\r
56     TMenuItem *MenuDeleteSelected;\r
57     TMenuItem *MenuSelection;\r
58     TMenuItem *MenuSelectionCrop;\r
59     TMenuItem *MenuSelectionInvert;\r
60     TListView *ListViewPlaylist;\r
61     TPopupMenu *PopupMenuPlaylist;\r
62     TMenuItem *PopupPlay;\r
63     TMenuItem *N1;\r
64     TMenuItem *PopupDeleteAll;\r
65     TMenuItem *PopupDeleteSelected;\r
66     TMenuItem *N2;\r
67     TMenuItem *PopupInvertSelection;\r
68     TMenuItem *PopupCropSelection;\r
69     TActionList *ActionList1;\r
70     TAction *InvertSelectionAction;\r
71     TAction *CropSelectionAction;\r
72     TAction *DeleteSelectionAction;\r
73     TAction *DeleteAllAction;\r
74     TAction *PlayStreamAction;\r
75     void __fastcall FormShow( TObject *Sender );\r
76     void __fastcall FormHide( TObject *Sender );\r
77     void __fastcall BitBtnOkClick( TObject *Sender );\r
78     void __fastcall ListViewPlaylistKeyDown( TObject *Sender, WORD &Key,\r
79             TShiftState Shift );\r
80     void __fastcall ListViewPlaylistCustomDrawItem( TCustomListView *Sender,\r
81             TListItem *Item, TCustomDrawState State, bool &DefaultDraw );\r
82     void __fastcall MenuAddFileClick( TObject *Sender );\r
83     void __fastcall MenuAddDiscClick( TObject *Sender );\r
84     void __fastcall MenuAddNetClick( TObject *Sender );\r
85     void __fastcall MenuAddUrlClick( TObject *Sender );\r
86     void __fastcall InvertSelectionActionExecute( TObject *Sender );\r
87     void __fastcall CropSelectionActionExecute( TObject *Sender );\r
88     void __fastcall DeleteSelectionActionExecute( TObject *Sender );\r
89     void __fastcall DeleteAllActionExecute( TObject *Sender );\r
90     void __fastcall PlayStreamActionExecute( TObject *Sender );\r
91 private:        // User declarations\r
92     char * __fastcall rindex( char *s, char c );\r
93     intf_thread_t *p_intf;\r
94     playlist_t *p_playlist;\r
95     /* drag and drop handling */\r
96     LPDROPTARGET lpDropTarget;\r
97     BEGIN_MESSAGE_MAP\r
98         MESSAGE_HANDLER( WM_OLEDROP, TMessage, OnDrop )\r
99     END_MESSAGE_MAP( TForm )\r
100     void __fastcall OnDrop( TMessage &Msg );\r
101 public:         // User declarations\r
102     __fastcall TPlaylistDlg( TComponent* Owner, intf_thread_t *_p_intf );\r
103     __fastcall ~TPlaylistDlg();\r
104     void __fastcall Add( AnsiString FileName, int i_mode, int i_pos );\r
105     void __fastcall Stop();\r
106     void __fastcall Play();\r
107     void __fastcall Pause();\r
108     void __fastcall Slow();\r
109     void __fastcall Fast();\r
110     void __fastcall UpdateGrid();\r
111     void __fastcall Manage();\r
112     void __fastcall DeleteItem( int i_pos );\r
113     void __fastcall Previous();\r
114     void __fastcall Next();\r
115 };\r
116 //---------------------------------------------------------------------------\r
117 #endif\r