]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/dialogs/interaction.hpp
Beginning of a WX implementation
[vlc] / modules / gui / wxwidgets / dialogs / interaction.hpp
1 /*****************************************************************************
2  * interaction.hpp : Headers for an interaction dialog
3  *****************************************************************************
4  * Copyright (C) 1999-2005 the VideoLAN team
5  * $Id: bookmarks.hpp 13444 2005-11-28 23:33:48Z dionoea $
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 #ifndef _WXVLC_INTERACTION_H_
25 #define _WXVLC_INTERACTION_H_
26
27 #include "wxwidgets.hpp"
28 #include <vlc_interaction.h>
29
30 #include <vector>
31 using namespace std;
32
33 namespace wxvlc
34 {
35
36     struct InputWidget
37     {
38         /// \todo Clean up
39         wxTextCtrl *control;
40         vlc_value_t *val;
41     };
42
43     class InteractionDialog: public wxFrame
44     {
45     public:
46         /* Constructor */
47         InteractionDialog( intf_thread_t *p_intf, wxWindow *p_parent,
48                            interaction_dialog_t * );
49         virtual ~InteractionDialog();
50
51         void Update();
52
53     private:
54         /* Event handlers (these functions should _not_ be virtual) */
55         void OnClose ( wxCloseEvent& event );
56         void OnOkYes ( wxCommandEvent& event );
57         void OnCancel( wxCommandEvent& event );
58         void OnNo    ( wxCommandEvent& event );
59
60         void Render();
61         void Finish( int );
62
63         wxBoxSizer *widgets_sizer;
64         wxPanel    *widgets_panel;
65         wxBoxSizer *buttons_sizer;
66         wxPanel    *buttons_panel;
67
68         wxBoxSizer *main_sizer;
69
70         DECLARE_EVENT_TABLE();
71
72         vector<InputWidget> input_widgets;
73
74         intf_thread_t *p_intf;
75         interaction_dialog_t *p_dialog;
76         wxWindow *p_parent;
77     };
78 };
79
80 #endif