2 * GlobalParameterFilesFrame.h
5 * Created by Toshi Nagata on 09/11/14.
6 * Copyright 2009 Toshi Nagata. All rights reserved.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation version 2 of the License.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
18 #ifndef __GlobalParameterFilesFrame_h__
19 #define __GlobalParameterFilesFrame_h__
22 #include "MyListCtrl.h"
26 class GlobalParameterFilesFrame: public wxMDIChildFrame, public MyListCtrlDataSource
30 wxButton *add_button, *remove_button;
31 wxMenu *file_history_menu;
34 GlobalParameterFilesFrame(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, long type);
35 virtual ~GlobalParameterFilesFrame();
37 MyListCtrl *GetListCtrl() { return listctrl; }
41 static GlobalParameterFilesFrame *CreateGlobalParameterFilesFrame(wxMDIParentFrame *parent);
43 void OnCloseWindow(wxCloseEvent &event);
44 void OnClose(wxCommandEvent &event);
45 void OnUpdateUI(wxUpdateUIEvent& event);
46 void OnAddGlobalParameterFile(wxCommandEvent& event);
47 void OnRemoveGlobalParameterFile(wxCommandEvent& event);
49 /* MyListCtrlDataSource functions */
50 virtual int GetItemCount(MyListCtrl *ctrl);
51 virtual wxString GetItemText(MyListCtrl *ctrl, long row, long column) const;
52 virtual int SetItemText(MyListCtrl *ctrl, long row, long column, const wxString &value);
53 virtual void DragSelectionToRow(MyListCtrl *ctrl, long row);
54 virtual bool IsItemEditable(MyListCtrl *ctrl, long row, long column);
55 virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl);
56 virtual void OnSelectionChanged(MyListCtrl *ctrl);
57 virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg);
63 #endif /* __GlobalParameterFilesFrame_h__ */