]> git.sesse.net Git - vlc/blob - modules/gui/win32/playlist.h
- vlc_playlist.h, playlist.c: added the ability to save a playlist to
[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>\r
37 #include <Dialogs.hpp>                                   /* for drag and drop */\r
38 \r
39 /*****************************************************************************\r
40  * This message is sent to the controls registered as drop targets\r
41  *****************************************************************************/\r
42 #define WM_OLEDROP WM_USER + 1\r
43 \r
44 //---------------------------------------------------------------------------\r
45 class TPlaylistDlg : public TForm\r
46 {\r
47 __published:    // IDE-managed Components\r
48     TBitBtn *BitBtnOk;\r
49     TMainMenu *MainMenuPlaylist;\r
50     TMenuItem *MenuAdd;\r
51     TMenuItem *MenuAddFile;\r
52     TMenuItem *MenuAddDisc;\r
53     TMenuItem *MenuAddNet;\r
54     TMenuItem *MenuAddUrl;\r
55     TMenuItem *MenuDelete;\r
56     TMenuItem *MenuDeleteAll;\r
57     TMenuItem *MenuDeleteSelected;\r
58     TMenuItem *MenuSelection;\r
59     TMenuItem *MenuSelectionCrop;\r
60     TMenuItem *MenuSelectionInvert;\r
61     TListView *ListViewPlaylist;\r
62     TPopupMenu *PopupMenuPlaylist;\r
63     TMenuItem *PopupPlay;\r
64     TMenuItem *N1;\r
65     TMenuItem *PopupDeleteAll;\r
66     TMenuItem *PopupDeleteSelected;\r
67     TMenuItem *N2;\r
68     TMenuItem *PopupInvertSelection;\r
69     TMenuItem *PopupCropSelection;\r
70     TActionList *ActionList1;\r
71     TAction *InvertSelectionAction;\r
72     TAction *CropSelectionAction;\r
73     TAction *DeleteSelectionAction;\r
74     TAction *DeleteAllAction;\r
75     TAction *PlayStreamAction;\r
76     TMenuItem *MenuFile;\r
77     TMenuItem *MenuFileOpen;\r
78     TMenuItem *MenuFileSave;\r
79    TMenuItem *N3;\r
80     TMenuItem *MenuFileClose;\r
81     TOpenDialog *PlaylistOpenDlg;\r
82     TSaveDialog *PlaylistSaveDlg;\r
83     void __fastcall FormShow( TObject *Sender );\r
84     void __fastcall FormHide( TObject *Sender );\r
85     void __fastcall BitBtnOkClick( TObject *Sender );\r
86     void __fastcall ListViewPlaylistKeyDown( TObject *Sender, WORD &Key,\r
87             TShiftState Shift );\r
88     void __fastcall ListViewPlaylistCustomDrawItem( TCustomListView *Sender,\r
89             TListItem *Item, TCustomDrawState State, bool &DefaultDraw );\r
90     void __fastcall MenuAddFileClick( TObject *Sender );\r
91     void __fastcall MenuAddDiscClick( TObject *Sender );\r
92     void __fastcall MenuAddNetClick( TObject *Sender );\r
93     void __fastcall MenuAddUrlClick( TObject *Sender );\r
94     void __fastcall InvertSelectionActionExecute( TObject *Sender );\r
95     void __fastcall CropSelectionActionExecute( TObject *Sender );\r
96     void __fastcall DeleteSelectionActionExecute( TObject *Sender );\r
97     void __fastcall DeleteAllActionExecute( TObject *Sender );\r
98     void __fastcall PlayStreamActionExecute( TObject *Sender );\r
99    void __fastcall MenuFileCloseClick(TObject *Sender);\r
100     void __fastcall MenuFileOpenClick(TObject *Sender);\r
101     void __fastcall MenuFileSaveClick(TObject *Sender);\r
102 private:        // User declarations\r
103     char * __fastcall rindex( char *s, char c );\r
104     intf_thread_t *p_intf;\r
105     playlist_t *p_playlist;\r
106     /* drag and drop handling */\r
107     LPDROPTARGET lpDropTarget;\r
108     BEGIN_MESSAGE_MAP\r
109         MESSAGE_HANDLER( WM_OLEDROP, TMessage, OnDrop )\r
110     END_MESSAGE_MAP( TForm )\r
111     void __fastcall OnDrop( TMessage &Msg );\r
112 public:         // User declarations\r
113     __fastcall TPlaylistDlg( TComponent* Owner, intf_thread_t *_p_intf );\r
114     __fastcall ~TPlaylistDlg();\r
115     void __fastcall Add( AnsiString FileName, int i_mode, int i_pos );\r
116     void __fastcall Stop();\r
117     void __fastcall Play();\r
118     void __fastcall Pause();\r
119     void __fastcall Slow();\r
120     void __fastcall Fast();\r
121     void __fastcall UpdateGrid();\r
122     void __fastcall Manage();\r
123     void __fastcall DeleteItem( int i_pos );\r
124     void __fastcall Previous();\r
125     void __fastcall Next();\r
126 };\r
127 //---------------------------------------------------------------------------\r
128 #endif\r