OSDN Git Service

A couple of bugfix in the Document. The version number is set to 1.0b1.
[molby/Molby.git] / wxSources / GlobalParameterFrame.h
1 /*
2  *  GlobalParameterFrame.h
3  *  Molby
4  *
5  *  Created by Toshi Nagata on 09/11/05.
6  *  Copyright 2009 Toshi Nagata. All rights reserved.
7  *
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.
11  
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.
16  */
17
18 #ifndef __GlobalParameterFrame_h__
19 #define __GlobalParameterFrame_h__
20
21 #include "wx/mdi.h"
22 #include "MyListCtrl.h"
23
24 class wxMenu;
25
26 class GlobalParameterFrame: public wxFrame, public MyListCtrlDataSource
27 {
28
29 public:
30         MyListCtrl *listCtrl;
31         wxMenu *file_history_menu;
32         wxMenu *edit_menu;
33
34         GlobalParameterFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, long type);
35         virtual ~GlobalParameterFrame();
36
37         MyListCtrl *GetListCtrl() { return listCtrl; }
38
39         void OnCreate();
40
41         static GlobalParameterFrame *CreateGlobalParameterFrame(wxWindow *parent);
42         
43         void OnCloseWindow(wxCloseEvent &event);
44         void OnClose(wxCommandEvent &event);
45         void OnUpdateUI(wxUpdateUIEvent& event);
46
47         /*  MyListCtrlDataSource functions  */
48         virtual int GetItemCount(MyListCtrl *ctrl);
49         virtual wxString GetItemText(MyListCtrl *ctrl, long row, long column) const;
50         virtual int SetItemText(MyListCtrl *ctrl, long row, long column, const wxString &value);
51         virtual void DragSelectionToRow(MyListCtrl *ctrl, long row);
52         virtual bool IsItemEditable(MyListCtrl *ctrl, long row, long column);
53         virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl);
54         virtual void OnSelectionChanged(MyListCtrl *ctrl);
55         virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg);
56
57 private:
58         DECLARE_EVENT_TABLE()
59 };
60
61 #endif /* __GlobalParameterFrame_h__ */