MainWindow.cpp
changeset 1 506e0fc65ba3
parent 0 7e720dcafcaf
child 2 b2772bffb62f
equal deleted inserted replaced
0:7e720dcafcaf 1:506e0fc65ba3
     1 #include <wx/wx.h>
     1 #include <wx/wx.h>
     2 #include <wx/image.h>
     2 #include <wx/image.h>
       
     3 #include <iostream>
     3 #include "wxPictureWindow.hpp"
     4 #include "wxPictureWindow.hpp"
     4 #include "MainWindow.hpp"
     5 #include "MainWindow.hpp"
       
     6 
       
     7 DEFINE_EVENT_TYPE(EVT_NEXTPICTURE)
       
     8 
       
     9 BEGIN_EVENT_TABLE (MainWindow, wxFrame)
       
    10     EVT_COMMAND (wxID_ANY, EVT_NEXTPICTURE, MainWindow::OnNextPicture)
       
    11 END_EVENT_TABLE ()
     5 
    12 
     6 MainWindow::MainWindow(const wxImage &img, const CropArea area, const wxSize size)
    13 MainWindow::MainWindow(const wxImage &img, const CropArea area, const wxSize size)
     7     :wxFrame(0, wxID_ANY, _("wxDjvuMaker"), wxDefaultPosition, size)
    14     :wxFrame(0, wxID_ANY, _("wxDjvuMaker"), wxDefaultPosition, size)
     8 {
    15 {
     9     wxBoxSizer *s = new wxBoxSizer(wxVERTICAL);
    16     wxBoxSizer *s = new wxBoxSizer(wxVERTICAL);
    10     wxPictureWindow *picture = new wxPictureWindow(img, area, this);
    17     wxPictureWindow *picture = new wxPictureWindow(img, area, this);
    11     s->Add(picture);
    18     s->Add(picture);
    12 }
    19 }
       
    20 
       
    21 void MainWindow::OnNextPicture(wxCommandEvent &e)
       
    22 {
       
    23     using namespace std;
       
    24     cout << "next picture" << endl;;
       
    25 }