1 /** \file wxsimagecomboeditordlg.h
2 *
3 * This file is part of wxSmith plugin for Code::Blocks Studio
4 * Copyright (C) 2010 Gary Harris
5 *
6 * wxSmith 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 3 of the License, or
9 * (at your option) any later version.
10 *
11 * wxSmith 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 wxSmith. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * This code was taken from the wxSmithImage plug-in, copyright Ron Collins
20 * and released under the GPL.
21 *
22 */
23 
24 #ifndef WXSIMAGECOMBOEDITORDLG_H
25 #define WXSIMAGECOMBOEDITORDLG_H
26 
27 //(*Headers(wxsImageComboEditorDlg)
28 #include <wx/treectrl.h>
29 #include <wx/sizer.h>
30 #include <wx/stattext.h>
31 #include <wx/bmpbuttn.h>
32 #include <wx/button.h>
33 #include "scrollingdialog.h"
34 #include <wx/combobox.h>
35 //*)
36 
37 #include "../defitems/wxsimagelist.h"
38 #include <wx/bmpcbox.h>
39 #include <wx/msgdlg.h>
40 #include <wx/imaglist.h>
41 #include <wx/bitmap.h>
42 
43 class wxsItem;
44 
45 ///*! \brief wxBitmapComboBox item editor dialogue. */
46 class wxsImageComboEditorDlg: public wxScrollingDialog
47 {
48     public:
49 
50         /*! \brief Constructor.
51          *
52          * \param parent wxWindow*
53          * \param id wxWindowID
54          * \param pos const wxPoint&
55          * \param size const wxSize&
56          */
57         wxsImageComboEditorDlg(wxWindow* parent);
58         /** \brief Destructor. */
59         virtual ~wxsImageComboEditorDlg();
60 
61         bool    Execute(wxArrayString &aItems);
62 
63 
64         //(*Declarations(wxsImageComboEditorDlg)
65         wxStaticText* StaticText10;
66         wxStaticText* StaticText9;
67         wxBitmapButton* m_pBtnEditItem;
68         wxBitmapButton* m_pBtnMoveDown;
69         wxButton* m_pBtnOK;
70         wxStaticText* StaticText2;
71         wxStaticText* StaticText6;
72         wxBitmapButton* m_pBtnDeleteItem;
73         wxBitmapButton* m_pBtnDeleteAll;
74         wxStaticText* StaticText8;
75         wxStaticText* StaticText1;
76         wxStaticText* StaticText3;
77         wxTreeCtrl* m_pTree;
78         wxButton* m_pBtnCancel;
79         wxStaticText* StaticText5;
80         wxStaticText* StaticText7;
81         wxBitmapComboBox* m_pCmbImage;
82         wxBitmapButton* m_pBtnMoveUp;
83         wxBitmapButton* m_pBtnAddItem;
84         wxStaticText* StaticText4;
85         //*)
86 
87     protected:
88 
89         //(*Identifiers(wxsImageComboEditorDlg)
90         static const long ID_STATICTEXT1;
91         static const long ID_TREECTRL1;
92         static const long ID_STATICTEXT2;
93         static const long ID_BITMAPBUTTON1;
94         static const long ID_STATICTEXT3;
95         static const long ID_BITMAPBUTTON2;
96         static const long ID_STATICTEXT4;
97         static const long ID_BITMAPBUTTON3;
98         static const long ID_STATICTEXT5;
99         static const long ID_BITMAPBUTTON4;
100         static const long ID_STATICTEXT6;
101         static const long ID_BITMAPBUTTON5;
102         static const long ID_STATICTEXT7;
103         static const long ID_BITMAPBUTTON6;
104         static const long ID_STATICTEXT8;
105         static const long ID_STATICTEXT9;
106         static const long ID_COMBOBOX1;
107         static const long ID_STATICTEXT10;
108         static const long ID_BUTTON1;
109         static const long ID_BUTTON2;
110         //*)
111 
112     private:
113 
114         //(*Handlers(wxsImageComboEditorDlg)
115         void OnBtnDeleteAllClick(wxCommandEvent& event);
116         void OnBtnAddItemClick(wxCommandEvent& event);
117         void OnBtnMoveUpClick(wxCommandEvent& event);
118         void OnBtnMoveDownClick(wxCommandEvent& event);
119         void OnBtnDeleteItemClick(wxCommandEvent& event);
120         void OnBtnEditItemClick(wxCommandEvent& event);
121         void OnBtnOKClick(wxCommandEvent& event);
122         void OnBtnCancelClick(wxCommandEvent& event);
123         void OnCmbImageSelect(wxCommandEvent& event);
124         void OnTreeSelectionChanged(wxTreeEvent& event);
125         //*)
126 
127         wxString            m_ComboName;        //!< The name of the base combobox.
128         wxString            m_ImageName;        //!< The name of the image list.
129         wxImageList        m_ImageList;                 //!< Local copy of an image list
130 
131         DECLARE_EVENT_TABLE()
132 };
133 
134 #endif
135