fszontagh
2024-02-25 780aaf9c1177ae3ead0cae1db57ba51aa83dd34a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
 
#include "ImageViewer.h"
 
#include "../res/add_image.png.h"
#include "../res/fullscreen.png.h"
#include "../res/rotate_left.png.h"
#include "../res/rotate_right.png.h"
#include "../res/zoom_in.png.h"
#include "../res/zoom_out.png.h"
 
// Using the construction of a static object to ensure that the help provider is set
// wx Manages the most recent HelpProvider passed to ::Set, but not the previous ones
// If ::Set gets called more than once, the previous one is returned and should be deleted
class wxFBContextSensitiveHelpSetter
{
public:
wxFBContextSensitiveHelpSetter()
{
wxSimpleHelpProvider* help = new wxSimpleHelpProvider();
wxHelpProvider* old = wxHelpProvider::Set( help );
if (old != 0){
delete old;
}
}
};
 
static wxFBContextSensitiveHelpSetter s_wxFBSetTheHelpProvider;
///////////////////////////////////////////////////////////////////////////
 
ImageWindow::ImageWindow( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
    this->SetSizeHints( wxDefaultSize, wxDefaultSize );
    this->DragAcceptFiles( true );
 
    wxBoxSizer* bSizer1;
    bSizer1 = new wxBoxSizer( wxVERTICAL );
 
    m_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
    bSizer1->Add( m_bitmap1, 1, wxALL|wxEXPAND, 5 );
 
 
    this->SetSizer( bSizer1 );
    this->Layout();
    m_statusBar1 = this->CreateStatusBar( 1, wxSTB_SIZEGRIP, wxID_ANY );
    m_toolBar1 = this->CreateToolBar( wxTB_DOCKABLE|wxTB_HORIZONTAL, wxID_ANY );
    m_open_image = m_toolBar1->AddTool( wxID_ANY, _("Open image"), add_image_png_to_wx_bitmap(), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
 
    m_toolBar1->AddSeparator();
 
    m_rotate_left = m_toolBar1->AddTool( wxID_ANY, _("Rotate -90"), rotate_left_png_to_wx_bitmap(), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
 
    m_rotate_right = m_toolBar1->AddTool( wxID_ANY, _("Rotate +90"), rotate_right_png_to_wx_bitmap(), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
 
    m_zoom_in = m_toolBar1->AddTool( wxID_ANY, _("Zoom in"), zoom_in_png_to_wx_bitmap(), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
 
    m_zoom_out = m_toolBar1->AddTool( wxID_ANY, _("Zoom out"), zoom_out_png_to_wx_bitmap(), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
 
    m_fullscreen = m_toolBar1->AddTool( wxID_ANY, _("Fullscreen"), fullscreen_png_to_wx_bitmap(), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL );
 
    m_toolBar1->Realize();
 
 
    this->Centre( wxBOTH );
}
 
ImageWindow::~ImageWindow()
{
}