Mercurial > mercurial > hgweb_qlipbrd.cgi
diff include/mainframe.h @ 0:cb3403ca39b1
First release.
author | pyon@macmini |
---|---|
date | Sun, 30 Aug 2015 21:53:19 +0900 |
parents | |
children | e4aa0e7a07ad |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/mainframe.h Sun Aug 30 21:53:19 2015 +0900 @@ -0,0 +1,95 @@ +// Filename: mainframe.h +// Last Change: 2015-08-30 Sun 20:35:50. +// +#ifndef __MAINFRAME_H__ +#define __MAINFRAME_H__ + +#include <wx/listctrl.h> +#include <wx/gdicmn.h> +#include <wx/font.h> +#include <wx/colour.h> +#include <wx/settings.h> +#include <wx/string.h> +#include <wx/stattext.h> +#include <wx/button.h> +#include <wx/tglbtn.h> +#include <wx/sizer.h> +#include <wx/icon.h> +#include <wx/menu.h> +#include <wx/frame.h> +#include <wx/timer.h> + +class MainFrame : public wxFrame +{ + DECLARE_EVENT_TABLE() + private: + wxTimer m_timer; + int m_current; + long m_counter; + wxString m_last; + + protected: + enum + { + ID_MNABOUT = wxID_HIGHEST + 1, + ID_MNEXIT, + ID_MNLDPGIN, + ID_MNSVPGIN, + + ID_TIMER, + ID_TGL, + ID_LIST, + + ID_BTNUP, + ID_BTNDOWN, + ID_BTNDEL, + ID_BTNADD, + ID_EXIT, + }; + + wxMenuBar* m_menubar; + wxMenu* m_menuFile; + wxMenu* m_menuPlugin; + + wxTextCtrl* m_textCtrlShow; + wxToggleButton* m_toggleBtn; + + wxListView* m_listView; + + wxButton* m_buttonUp; + wxButton* m_buttonDown; + wxButton* m_buttonDel; + wxButton* m_buttonAdd; + wxButton* m_buttonExit; + + public: + MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ); + ~MainFrame(); + + // Event Handlers + void OnMNAbout( wxCommandEvent& ); + void OnMNExit( wxCommandEvent& ); + void OnMNLoad( wxCommandEvent& ); + void OnMNSaveAs( wxCommandEvent& ); + + void OnDClickItem( wxListEvent& ); + void OnSelectItem( wxListEvent& ); + + void OnToggle( wxCommandEvent& ); + void OnTimer( wxTimerEvent& ); + + void OnBtnUp( wxCommandEvent& ); + void OnBtnDown( wxCommandEvent& ); + void OnBtnDel( wxCommandEvent& ); + void OnBtnAdd( wxCommandEvent& ); + void OnBtnExit( wxCommandEvent& ); + + // Functions + void EnableButtons( bool ); + void SwapListItem( long, long ); + void ReNumberList(); + void DoProcess(); +}; + +#endif //__MAINFRAME_H__ +