]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/dialogs/interaction.hpp
* : svn:keywords
[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$
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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 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         int i_type;
42     };
43
44     class InteractionDialog: public wxDialog
45     {
46     public:
47         /* Constructor */
48         InteractionDialog( intf_thread_t *p_intf, wxWindow *p_parent,
49                            interaction_dialog_t * );
50         virtual ~InteractionDialog();
51
52         void Update();
53
54     private:
55         /* Event handlers (these functions should _not_ be virtual) */
56         void OnClose ( wxCloseEvent& event );
57         void OnOkYes ( wxCommandEvent& event );
58         void OnCancel( wxCommandEvent& event );
59         void OnNo    ( wxCommandEvent& event );
60         void OnClear ( wxCommandEvent& event );
61         void OnNoShow( wxCommandEvent& event );
62
63         void Render();
64         void Finish( int );
65
66         wxBoxSizer *widgets_sizer;
67         wxPanel    *widgets_panel;
68         wxStdDialogButtonSizer *buttons_sizer;
69         wxPanel    *buttons_panel;
70
71         wxBoxSizer *main_sizer;
72
73         DECLARE_EVENT_TABLE();
74
75         vector<InputWidget> input_widgets;
76
77         intf_thread_t *p_intf;
78         interaction_dialog_t *p_dialog;
79         wxWindow *p_parent;
80
81         bool b_noshow;
82     };
83 };
84
85 #endif