MainWindow.cpp
author viric <viriketo@gmail.com>
Sun, 24 Apr 2011 14:03:52 +0200
changeset 1 506e0fc65ba3
parent 0 7e720dcafcaf
child 2 b2772bffb62f
permissions -rw-r--r--
Ara processo la tecla ESC, almenys, i ho preparo per un next_picture

#include <wx/wx.h>
#include <wx/image.h>
#include <iostream>
#include "wxPictureWindow.hpp"
#include "MainWindow.hpp"

DEFINE_EVENT_TYPE(EVT_NEXTPICTURE)

BEGIN_EVENT_TABLE (MainWindow, wxFrame)
    EVT_COMMAND (wxID_ANY, EVT_NEXTPICTURE, MainWindow::OnNextPicture)
END_EVENT_TABLE ()

MainWindow::MainWindow(const wxImage &img, const CropArea area, const wxSize size)
    :wxFrame(0, wxID_ANY, _("wxDjvuMaker"), wxDefaultPosition, size)
{
    wxBoxSizer *s = new wxBoxSizer(wxVERTICAL);
    wxPictureWindow *picture = new wxPictureWindow(img, area, this);
    s->Add(picture);
}

void MainWindow::OnNextPicture(wxCommandEvent &e)
{
    using namespace std;
    cout << "next picture" << endl;;
}