lsnes/include/platform/wxwidgets/window_messages.hpp

51 lines
1.2 KiB
C++
Raw Normal View History

2012-01-06 17:28:01 +02:00
#ifndef _plat_wxwidgets__window_messages__hpp__included__
#define _plat_wxwidgets__window_messages__hpp__included__
#include <wx/string.h>
#include <wx/wx.h>
#include "platform/wxwidgets/textrender.hpp"
2012-01-06 17:28:01 +02:00
class wxwin_messages : public wxFrame
{
public:
class panel : public text_framebuffer_panel
2012-01-06 17:28:01 +02:00
{
public:
panel(wxwin_messages* _parent, unsigned lines);
2013-11-26 14:46:15 +02:00
void on_resize(wxSizeEvent& e);
void on_mouse(wxMouseEvent& e);
void on_menu(wxCommandEvent& e);
2013-11-26 14:46:15 +02:00
virtual wxSize DoGetBestSize() const;
protected:
void prepare_paint();
2012-01-06 17:28:01 +02:00
private:
wxwin_messages* parent;
2013-11-26 14:46:15 +02:00
size_t ilines;
uint64_t line_clicked;
uint64_t line_declicked;
uint64_t line_current;
2013-11-26 14:46:15 +02:00
size_t line_separation;
bool mouse_held;
2013-11-26 19:14:33 +02:00
int scroll_acc;
2012-01-06 17:28:01 +02:00
};
wxwin_messages();
~wxwin_messages();
void notify_update() throw();
bool ShouldPreventAppExit() const;
void notify_message();
void on_scroll_home(wxCommandEvent& e);
void on_scroll_pageup(wxCommandEvent& e);
void on_scroll_lineup(wxCommandEvent& e);
void on_scroll_linedown(wxCommandEvent& e);
void on_scroll_pagedown(wxCommandEvent& e);
void on_scroll_end(wxCommandEvent& e);
void on_execute(wxCommandEvent& e);
2012-09-19 12:13:08 +03:00
void on_close(wxCloseEvent& e);
void reshow();
2012-01-06 17:28:01 +02:00
private:
2013-10-27 15:01:59 +02:00
wxComboBox* command;
2012-01-06 17:28:01 +02:00
panel* mpanel;
};
#endif