KiCad PCB EDA Suite
dialog_image_editor_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 5 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_IMAGE_EDITOR_BASE::DIALOG_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bUpperSizer;
20  bUpperSizer = new wxBoxSizer( wxVERTICAL );
21 
22  wxBoxSizer* bSizerLeft;
23  bSizerLeft = new wxBoxSizer( wxHORIZONTAL );
24 
25  m_panelDraw = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER|wxTAB_TRAVERSAL );
26  m_panelDraw->SetMinSize( wxSize( 256,256 ) );
27 
28  bSizerLeft->Add( m_panelDraw, 1, wxEXPAND | wxALL, 5 );
29 
30  wxBoxSizer* bSizerRight;
31  bSizerRight = new wxBoxSizer( wxVERTICAL );
32 
33  m_buttonMirrorX = new wxButton( this, wxID_ANY, _("Mirror X"), wxDefaultPosition, wxDefaultSize, 0 );
34  bSizerRight->Add( m_buttonMirrorX, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
35 
36  m_buttonMirrorY = new wxButton( this, wxID_ANY, _("Mirror Y"), wxDefaultPosition, wxDefaultSize, 0 );
37  bSizerRight->Add( m_buttonMirrorY, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
38 
39  m_buttonRotate = new wxButton( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
40  bSizerRight->Add( m_buttonRotate, 0, wxEXPAND|wxALL, 5 );
41 
42  m_buttonGrey = new wxButton( this, wxID_ANY, _("Grey"), wxDefaultPosition, wxDefaultSize, 0 );
43  bSizerRight->Add( m_buttonGrey, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
44 
45  m_buttonHalfSize = new wxButton( this, wxID_ANY, _("Half Size"), wxDefaultPosition, wxDefaultSize, 0 );
46  bSizerRight->Add( m_buttonHalfSize, 0, wxALL|wxEXPAND, 5 );
47 
48  m_buttonUndoLast = new wxButton( this, wxID_ANY, _("Undo Last"), wxDefaultPosition, wxDefaultSize, 0 );
49  bSizerRight->Add( m_buttonUndoLast, 0, wxALL|wxEXPAND, 5 );
50 
51  m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Image Scale:"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_staticTextScale->Wrap( -1 );
53  bSizerRight->Add( m_staticTextScale, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
54 
55  m_textCtrlScale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
56  bSizerRight->Add( m_textCtrlScale, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
57 
58 
59  bSizerLeft->Add( bSizerRight, 0, wxEXPAND, 5 );
60 
61 
62  bUpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
63 
64 
65  bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
66 
67  m_sdbSizer = new wxStdDialogButtonSizer();
68  m_sdbSizerOK = new wxButton( this, wxID_OK );
69  m_sdbSizer->AddButton( m_sdbSizerOK );
70  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
71  m_sdbSizer->AddButton( m_sdbSizerCancel );
72  m_sdbSizer->Realize();
73 
74  bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
75 
76 
77  this->SetSizer( bSizerMain );
78  this->Layout();
79  bSizerMain->Fit( this );
80 
81  this->Centre( wxBOTH );
82 
83  // Connect Events
84  m_panelDraw->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
85  m_buttonMirrorX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorX_click ), NULL, this );
86  m_buttonMirrorY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorY_click ), NULL, this );
87  m_buttonRotate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRotateClick ), NULL, this );
88  m_buttonGrey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
89  m_buttonHalfSize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnHalfSize ), NULL, this );
90  m_buttonUndoLast->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnUndoLastChange ), NULL, this );
91 }
92 
94 {
95  // Disconnect Events
96  m_panelDraw->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
97  m_buttonMirrorX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorX_click ), NULL, this );
98  m_buttonMirrorY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnMirrorY_click ), NULL, this );
99  m_buttonRotate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRotateClick ), NULL, this );
100  m_buttonGrey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
101  m_buttonHalfSize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnHalfSize ), NULL, this );
102  m_buttonUndoLast->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnUndoLastChange ), NULL, this );
103 
104 }
virtual void OnRotateClick(wxCommandEvent &event)
virtual void OnMirrorY_click(wxCommandEvent &event)
DIALOG_IMAGE_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Image Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:53
virtual void OnMirrorX_click(wxCommandEvent &event)
virtual void OnUndoLastChange(wxCommandEvent &event)
virtual void OnRedrawPanel(wxPaintEvent &event)
virtual void OnHalfSize(wxCommandEvent &event)
virtual void OnGreyScaleConvert(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer