KiCad PCB EDA Suite
dialog_image_editor_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
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_buttonGrey = new wxButton( this, wxID_ANY, _("Grey"), wxDefaultPosition, wxDefaultSize, 0 );
34  bSizerRight->Add( m_buttonGrey, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
35 
36 
37  bSizerRight->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
38 
39  m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Image Scale:"), wxDefaultPosition, wxDefaultSize, 0 );
40  m_staticTextScale->Wrap( -1 );
41  bSizerRight->Add( m_staticTextScale, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
42 
43  m_textCtrlScale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
44  bSizerRight->Add( m_textCtrlScale, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
45 
46 
47  bSizerLeft->Add( bSizerRight, 0, wxEXPAND|wxALL, 5 );
48 
49 
50  bUpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
51 
52 
53  bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
54 
55  m_sdbSizer = new wxStdDialogButtonSizer();
56  m_sdbSizerOK = new wxButton( this, wxID_OK );
57  m_sdbSizer->AddButton( m_sdbSizerOK );
58  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
59  m_sdbSizer->AddButton( m_sdbSizerCancel );
60  m_sdbSizer->Realize();
61 
62  bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
63 
64 
65  this->SetSizer( bSizerMain );
66  this->Layout();
67  bSizerMain->Fit( this );
68 
69  this->Centre( wxBOTH );
70 
71  // Connect Events
72  m_panelDraw->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
73  m_buttonGrey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
74 }
75 
77 {
78  // Disconnect Events
79  m_panelDraw->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
80  m_buttonGrey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
81 
82 }
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)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
#define NULL
virtual void OnRedrawPanel(wxPaintEvent &event)
#define _(s)
Definition: 3d_actions.cpp:33
virtual void OnGreyScaleConvert(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer