Header optimizations (#1684)

Shouldn't break anything. I hope.
This commit is contained in:
Ivan 2016-04-27 01:27:24 +03:00
parent da7472fe81
commit aafcf44581
89 changed files with 2370 additions and 2348 deletions

View file

@ -12,12 +12,12 @@ BEGIN_EVENT_TABLE(GSFrame, wxFrame)
EVT_SIZE(GSFrame::OnSize)
END_EVENT_TABLE()
GSFrame::GSFrame(const wxString& title, size2i size)
GSFrame::GSFrame(const wxString& title, int w, int h)
: wxFrame(nullptr, wxID_ANY, "GSFrame[" + title + "]")
{
SetIcon(wxGetApp().m_MainFrame->GetIcon());
SetClientSize(size.width, size.height);
SetClientSize(w, h);
wxGetApp().Bind(wxEVT_KEY_DOWN, &GSFrame::OnKeyDown, this);
Bind(wxEVT_CLOSE_WINDOW, &GSFrame::OnClose, this);
Bind(wxEVT_LEFT_DCLICK, &GSFrame::OnLeftDclick, this);
@ -86,10 +86,14 @@ void GSFrame::delete_context(void* ctx)
{
}
size2i GSFrame::client_size()
int GSFrame::client_width()
{
wxSize size = GetClientSize();
return{ size.GetWidth(), size.GetHeight() };
return GetClientSize().GetWidth();
}
int GSFrame::client_height()
{
return GetClientSize().GetHeight();
}
void GSFrame::flip(draw_context_t)