comparison include/mainframe.h @ 1:e4aa0e7a07ad

Second release.
author pyon@macmini
date Sun, 13 Sep 2015 14:56:42 +0900
parents cb3403ca39b1
children
comparison
equal deleted inserted replaced
0:cb3403ca39b1 1:e4aa0e7a07ad
1 // Filename: mainframe.h 1 // Filename: mainframe.h
2 // Last Change: 2015-08-30 Sun 20:35:50. 2 // Last Change: 2015-09-13 Sun 13:44:36.
3 // 3 //
4 #ifndef __MAINFRAME_H__ 4 #ifndef __MAINFRAME_H__
5 #define __MAINFRAME_H__ 5 #define __MAINFRAME_H__
6 6
7 #include <wx/listctrl.h> 7 #include <wx/listctrl.h>
8 #include <wx/listbox.h>
8 #include <wx/gdicmn.h> 9 #include <wx/gdicmn.h>
9 #include <wx/font.h> 10 #include <wx/font.h>
10 #include <wx/colour.h> 11 #include <wx/colour.h>
11 #include <wx/settings.h> 12 #include <wx/settings.h>
12 #include <wx/string.h> 13 #include <wx/string.h>
17 #include <wx/icon.h> 18 #include <wx/icon.h>
18 #include <wx/menu.h> 19 #include <wx/menu.h>
19 #include <wx/frame.h> 20 #include <wx/frame.h>
20 #include <wx/timer.h> 21 #include <wx/timer.h>
21 22
23 #include "qdata.h"
24 WX_DECLARE_HASH_MAP( int, QlipData*, wxIntegerHash, wxIntegerEqual, QlipDataHash );
25
22 class MainFrame : public wxFrame 26 class MainFrame : public wxFrame
23 { 27 {
24 DECLARE_EVENT_TABLE() 28 DECLARE_EVENT_TABLE()
25 private: 29 private:
26 wxTimer m_timer; 30 wxTimer m_timer;
27 int m_current; 31 int m_current;
28 long m_counter; 32 int m_counter;
29 wxString m_last; 33 int m_period;
34 bool m_bottom;
35 QlipDataHash QH;
30 36
31 protected: 37 protected:
32 enum 38 enum
33 { 39 {
34 ID_MNABOUT = wxID_HIGHEST + 1, 40 ID_MNAPPDIR = wxID_HIGHEST + 1,
41 ID_MNINTERVAL,
42 ID_MNABOUT,
35 ID_MNEXIT, 43 ID_MNEXIT,
36 ID_MNLDPGIN, 44 ID_MNLDPGIN,
37 ID_MNSVPGIN, 45 ID_MNSVPGIN,
38 46
39 ID_TIMER, 47 ID_TIMER,
40 ID_TGL, 48 ID_TGL,
41 ID_LIST, 49 ID_LISTVIEW,
50 ID_LISTBOX,
42 51
43 ID_BTNUP, 52 ID_BTNUP,
44 ID_BTNDOWN, 53 ID_BTNDOWN,
45 ID_BTNDEL, 54 ID_BTNDEL,
46 ID_BTNADD, 55 ID_BTNADD,
50 wxMenuBar* m_menubar; 59 wxMenuBar* m_menubar;
51 wxMenu* m_menuFile; 60 wxMenu* m_menuFile;
52 wxMenu* m_menuPlugin; 61 wxMenu* m_menuPlugin;
53 62
54 wxTextCtrl* m_textCtrlShow; 63 wxTextCtrl* m_textCtrlShow;
64 wxTextCtrl* m_textCtrlRemain;
55 wxToggleButton* m_toggleBtn; 65 wxToggleButton* m_toggleBtn;
56 66
57 wxListView* m_listView; 67 wxStaticText* m_staticTextCycle;
68 wxListView* m_lisViewCycle;
69 wxStaticText* m_staticTextHist;
70 wxListBox* m_listBoxHist;
58 71
59 wxButton* m_buttonUp; 72 wxButton* m_buttonUp;
60 wxButton* m_buttonDown; 73 wxButton* m_buttonDown;
61 wxButton* m_buttonDel; 74 wxButton* m_buttonDel;
62 wxButton* m_buttonAdd; 75 wxButton* m_buttonAdd;
65 public: 78 public:
66 MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ); 79 MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style );
67 ~MainFrame(); 80 ~MainFrame();
68 81
69 // Event Handlers 82 // Event Handlers
83 void OnMNAppdir( wxCommandEvent& );
84 void OnMNInterval( wxCommandEvent& );
70 void OnMNAbout( wxCommandEvent& ); 85 void OnMNAbout( wxCommandEvent& );
71 void OnMNExit( wxCommandEvent& ); 86 void OnMNExit( wxCommandEvent& );
72 void OnMNLoad( wxCommandEvent& ); 87 void OnMNLoad( wxCommandEvent& );
73 void OnMNSaveAs( wxCommandEvent& ); 88 void OnMNSaveAs( wxCommandEvent& );
74 89
75 void OnDClickItem( wxListEvent& ); 90 void OnLViewDClickItem( wxListEvent& );
76 void OnSelectItem( wxListEvent& ); 91 void OnLViewSelectItem( wxListEvent& );
92 void OnLBoxDClickItem( wxCommandEvent& );
77 93
78 void OnToggle( wxCommandEvent& ); 94 void OnToggle( wxCommandEvent& );
79 void OnTimer( wxTimerEvent& ); 95 void OnTimer( wxTimerEvent& );
80 96
81 void OnBtnUp( wxCommandEvent& ); 97 void OnBtnUp( wxCommandEvent& );
86 102
87 // Functions 103 // Functions
88 void EnableButtons( bool ); 104 void EnableButtons( bool );
89 void SwapListItem( long, long ); 105 void SwapListItem( long, long );
90 void ReNumberList(); 106 void ReNumberList();
91 void DoProcess(); 107 int CreateID();
108 void AddStackTime();
109 void UpdateView();
110 void UpdateHistory( wxString );
111 int GetEmptyStack();
112 int ToInt( wxString );
92 }; 113 };
93 114
94 #endif //__MAINFRAME_H__ 115 #endif //__MAINFRAME_H__
95 116