]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - tools/src/tools/configtool/standalone/wxwin/admindlg.h
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / tools / src / tools / configtool / standalone / wxwin / admindlg.h
1 //####COPYRIGHTBEGIN####
2 //
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5 //
6 // This program is part of the eCos host tools.
7 //
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
11 // any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
16 // more details.
17 //
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 //
22 // ----------------------------------------------------------------------------
23 //
24 //####COPYRIGHTEND####
25 // admindlg.h :
26 //
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
29 //
30 // Author(s):   julians
31 // Contact(s):  julians
32 // Date:        2000/09/28
33 // Version:     $Id$
34 // Purpose:
35 // Description: Header file for ecAdminDialog
36 // Requires:
37 // Provides:
38 // See also:
39 // Known bugs:
40 // Usage:
41 //
42 //####DESCRIPTIONEND####
43 //
44 //===========================================================================
45
46 #ifndef _ECOS_ADMINDLG_H_
47 #define _ECOS_ADMINDLG_H_
48
49 #ifdef __GNUG__
50 #pragma interface "admindlg.cpp"
51 #endif
52
53 #include "ecutils.h"
54
55 class ecAdminDialog : public ecDialog
56 {
57 public:
58 // Ctor(s)
59     ecAdminDialog(wxWindow* parent, const wxString& repository = wxEmptyString, const wxString& userTools = wxEmptyString);
60     ~ecAdminDialog();
61
62 //// Event handlers
63
64     void OnClose(wxCommandEvent& event);
65     void OnAdd(wxCommandEvent& event);
66     void OnRemove(wxCommandEvent& event);
67     void OnInitDialog(wxInitDialogEvent& event);
68
69 //// Operations
70     void CreateControls(wxWindow* parent);
71         bool FindUserToolsPath();
72         bool RemovePackageVersion (wxTreeItemId hTreeItem);
73         bool EvalTclFile (int nargc, const wxString& argv, const wxString& msg);
74         void ClearPackageTree ();
75         bool PopulatePackageTree (const wxString& packageDatabase);
76
77 protected:
78     wxTreeCtrl* m_treeCtrl;
79     wxImageList m_imageList;
80
81 private:
82     DECLARE_EVENT_TABLE()
83
84         wxString m_strRepository;
85         wxString m_strUserTools;
86         CdlPackagesDatabase m_CdlPkgData;
87 };
88
89 // Data to associate with each item
90 class ecAdminItemData : public wxTreeItemData
91 {
92 public:
93     ecAdminItemData(const wxString& str) : m_string(str) { }
94
95     wxString m_string;
96 };
97
98
99 #define ecID_ADMIN_DIALOG_TREE 10400
100 #define ecID_ADMIN_DIALOG_ADD 10064
101 #define ecID_ADMIN_DIALOG_REMOVE 10065
102
103 #endif
104         // _ECOS_ADMINDLG_H_