1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
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)
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
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.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
31 // Contact(s): julians
33 // Version: $Id: admindlg.h,v 1.3 2001/08/22 16:50:32 julians Exp $
35 // Description: Header file for ecAdminDialog
42 //####DESCRIPTIONEND####
44 //===========================================================================
46 #ifndef _ECOS_ADMINDLG_H_
47 #define _ECOS_ADMINDLG_H_
50 #pragma interface "admindlg.cpp"
55 class ecAdminDialog : public ecDialog
59 ecAdminDialog(wxWindow* parent, const wxString& repository = wxEmptyString, const wxString& userTools = wxEmptyString);
64 void OnClose(wxCommandEvent& event);
65 void OnAdd(wxCommandEvent& event);
66 void OnRemove(wxCommandEvent& event);
67 void OnInitDialog(wxInitDialogEvent& event);
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);
78 wxTreeCtrl* m_treeCtrl;
79 wxImageList m_imageList;
84 wxString m_strRepository;
85 wxString m_strUserTools;
86 CdlPackagesDatabase m_CdlPkgData;
89 // Data to associate with each item
90 class ecAdminItemData : public wxTreeItemData
93 ecAdminItemData(const wxString& str) : m_string(str) { }
99 #define ecID_ADMIN_DIALOG_TREE 10400
100 #define ecID_ADMIN_DIALOG_ADD 10064
101 #define ecID_ADMIN_DIALOG_REMOVE 10065