1 /*****************************************************************************
2 * wxwindows.h: private wxWindows interface description
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: wxwindows.h,v 1.3 2002/11/23 14:28:51 gbazin Exp $
7 * Authors: Gildas Bazin <gbazin@netcourrier.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 *****************************************************************************/
24 #include <wx/listctrl.h>
29 #define SLIDER_MAX_POS 10000
31 /*****************************************************************************
32 * intf_sys_t: description and status of Gtk+ interface
33 *****************************************************************************/
36 /* the wx parent window */
39 /* secondary windows */
40 Playlist *p_playlist_window;
44 vlc_bool_t b_popup_changed; /* display menu ? */
45 vlc_bool_t b_window_changed; /* window display toggled ? */
46 vlc_bool_t b_playlist_changed; /* playlist display toggled ? */
47 vlc_bool_t b_slider_free; /* slider status */
50 vlc_bool_t b_program_update; /* do we need to update programs
52 vlc_bool_t b_title_update; /* do we need to update title menus */
53 vlc_bool_t b_chapter_update; /* do we need to update
55 vlc_bool_t b_audio_update; /* do we need to update audio menus */
56 vlc_bool_t b_spu_update; /* do we need to update spu menus */
58 /* windows and widgets */
60 /* The input thread */
61 input_thread_t * p_input;
64 int i_slider_pos; /* slider position */
65 int i_slider_oldpos; /* previous position */
67 /* The messages window */
68 msg_subscription_t* p_sub; /* message bank subscription */
70 /* Playlist management */
71 int i_playing; /* playlist selected item */
73 /* The window labels for DVD mode */
74 int i_part; /* current chapter */
77 /*****************************************************************************
79 *****************************************************************************/
81 /*****************************************************************************
82 * Classes declarations.
83 *****************************************************************************/
87 class Timer: public wxTimer
91 Timer( intf_thread_t *p_intf, Interface *p_main_interface );
94 virtual void Notify();
97 intf_thread_t *p_intf;
98 Interface *p_main_interface;
102 class Interface: public wxFrame
106 Interface( intf_thread_t *p_intf );
107 virtual ~Interface();
109 wxBoxSizer *frame_sizer;
110 wxStatusBar *statusbar;
113 wxWindow *slider_frame;
114 wxStaticBox *slider_box;
117 void CreateOurMenuBar();
118 void CreateOurToolBar();
119 void CreateOurSlider();
121 /* Event handlers (these functions should _not_ be virtual) */
122 void OnExit( wxCommandEvent& event );
123 void OnAbout( wxCommandEvent& event );
124 void OnPlaylist( wxCommandEvent& event );
125 void OnOpenFile( wxCommandEvent& event );
126 void OnPlayStream( wxCommandEvent& event );
127 void OnStopStream( wxCommandEvent& event );
128 void OnPauseStream( wxCommandEvent& event );
129 void OnSliderUpdate( wxScrollEvent& event );
130 void OnPrevStream( wxCommandEvent& event );
131 void OnNextStream( wxCommandEvent& event );
133 DECLARE_EVENT_TABLE();
136 intf_thread_t *p_intf;
140 class Playlist: public wxFrame
144 Playlist( intf_thread_t *p_intf, Interface *p_main_interface );
150 /* Event handlers (these functions should _not_ be virtual) */
151 void OnAddUrl( wxCommandEvent& event );
152 void OnAddDirectory( wxCommandEvent& event );
153 void OnClose( wxCommandEvent& event );
154 void OnInvertSelection( wxCommandEvent& event );
155 void OnDeleteSelection( wxCommandEvent& event );
156 void OnSelectAll( wxCommandEvent& event );
157 void OnActivateItem( wxListEvent& event );
158 void OnKeyDown( wxListEvent& event );
160 DECLARE_EVENT_TABLE();
162 void DeleteItem( int item );
163 intf_thread_t *p_intf;
164 Interface *p_main_interface;
165 wxListView *listview;
169 /* Drag and Drop class */
170 class DragAndDrop: public wxFileDropTarget
173 DragAndDrop( intf_thread_t *_p_intf );
175 virtual bool OnDropFiles( wxCoord x, wxCoord y,
176 const wxArrayString& filenames );
179 intf_thread_t *p_intf;