1 /*
2  *      scriptdialog.h
3  *
4  *      Copyright 2009 David Vachulka <arch_dvx@users.sourceforge.net>
5  *
6  *      This program is free software; you can redistribute it and/or modify
7  *      it under the terms of the GNU General Public License as published by
8  *      the Free Software Foundation; either version 2 of the License, or
9  *      (at your option) any later version.
10  *
11  *      This program is distributed in the hope that it will be useful,
12  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *      GNU General Public License for more details.
15  *
16  *      You should have received a copy of the GNU General Public License
17  *      along with this program; if not, write to the Free Software
18  *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  *      MA 02110-1301, USA.
20  */
21 
22 
23 #ifndef SCRIPTDIALOG_H
24 #define SCRIPTDIALOG_H
25 
26 #include "defs.h"
27 #include "fxext.h"
28 
29 class dxirc;
30 
31 class ScriptDialog: public FXDialogBox
32 {
33     FXDECLARE(ScriptDialog)
34     public:
35         ScriptDialog(FXMainWindow *owner);
36         virtual ~ScriptDialog();
37 
38         long onLoad(FXObject*,FXSelector,void*);
39         long onView(FXObject*,FXSelector,void*);
40         long onViewNew(FXObject*,FXSelector,void*);
41         long onUnload(FXObject*,FXSelector,void*);
42         long onClose(FXObject*,FXSelector,void*);
43         long onList(FXObject*,FXSelector,void*);
44         long onKeyPress(FXObject*,FXSelector,void*);
45 
46     private:
ScriptDialog()47         ScriptDialog():m_contents(NULL),m_listframe(NULL),m_buttonframe(NULL),m_scriptframe(NULL),m_group(NULL),m_matrix(NULL),
48         m_names(NULL),m_name(NULL),m_version(NULL),m_description(NULL),m_path(NULL),m_buttonLoad(NULL),m_buttonView(NULL),
49         m_buttonUnload(NULL),m_buttonClose(NULL),m_buttonViewNew(NULL)
50         {}
51         ScriptDialog(const ScriptDialog&);
52 
53         FXVerticalFrame *m_contents, *m_listframe;
54         FXHorizontalFrame *m_buttonframe, *m_scriptframe;
55         FXGroupBox *m_group;
56         FXMatrix *m_matrix;
57         FXList *m_names;
58         FXTextField *m_name, *m_version;
59         FXText *m_description, *m_path;
60         dxEXButton *m_buttonLoad, *m_buttonView, *m_buttonUnload, *m_buttonClose, *m_buttonViewNew;
61 
62         void updateList();
63         void updateDetails();
64         void viewFile(const FXString&);
65 };
66 
67 #endif // SCRIPTDIALOG_H
68