{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MainFrame - #include"stdafx.h#include"MainFrame.h#include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "stdafx.h" #include "MainFrame.h" #include <OverlayDraw.h> # BEGIN_EVENT_TABLE(MainFrame, wxFrame) EVT_RADIOBUTTON(XRCID("VisibleRadio"), OnVisibleRadio) EVT_RADIOBUTTON(XRCID("HiddenRadio"), OnHiddenRadio) EVT_BUTTON(XRCID("ExitButton"), OnExit) EVT_TIMER(wxID_ANY, OnTimer) END_EVENT_TABLE() E MainFrame::MainFrame() : m_timer(this) { LoadFromResources(); m_timer.Start(500); } MainFrame::~MainFrame() { } void MainFrame::LoadFromResources() { wxXmlResource* res = wxXmlResource::Get(); if(!res->LoadFrame(this, 0, wxT("MainFrame"))) throw std::exception("Could not load MainFrame from the XRC resource file."); f widthText = XRCCTRL(*this, "WidthText", wxTextCtrl); heightText = XRCCTRL(*this, "HeightText", wxTextCtrl); } void MainFrame::OnExit(wxCommandEvent& event) { Destroy(); } void MainFrame::OnVisibleRadio(wxCommandEvent& event) { const int width = GetSize().GetWidth(); const int height = GetSize().GetHeight(); c if(!overlayManager_.get()) overlayManager_.reset(new Overlay::OverlayManager); o if(!overlayManager_->IsInitialized()) { try { overlayManager_->Reset(width, height); const Overlay::PixelFormat format = overlayManager_-
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}