KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_image_editor_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12PANEL_IMAGE_EDITOR_BASE::PANEL_IMAGE_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bSizerMain;
15 bSizerMain = new wxBoxSizer( wxVERTICAL );
16
17 wxBoxSizer* bUpperSizer;
18 bUpperSizer = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bSizerLeft;
21 bSizerLeft = new wxBoxSizer( wxHORIZONTAL );
22
23 m_panelDraw = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL|wxBORDER_SIMPLE );
24 m_panelDraw->SetMinSize( wxSize( 300,300 ) );
25
26 bSizerLeft->Add( m_panelDraw, 1, wxEXPAND | wxALL, 5 );
27
28 wxGridBagSizer* gbSizer1;
29 gbSizer1 = new wxGridBagSizer( 5, 5 );
30 gbSizer1->SetFlexibleDirection( wxBOTH );
31 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
32
33 m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Scale:"), wxDefaultPosition, wxDefaultSize, 0 );
34 m_staticTextScale->Wrap( -1 );
35 gbSizer1->Add( m_staticTextScale, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
36
37 m_textCtrlScale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
38 gbSizer1->Add( m_textCtrlScale, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
39
40 m_staticTextPPI = new wxStaticText( this, wxID_ANY, _("PPI:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_staticTextPPI->Wrap( -1 );
42 gbSizer1->Add( m_staticTextPPI, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
43
44 m_stPPI_Value = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
45 m_stPPI_Value->Wrap( -1 );
46 gbSizer1->Add( m_stPPI_Value, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
47
48 m_buttonGrey = new wxButton( this, wxID_ANY, _("Convert to Greyscale"), wxDefaultPosition, wxDefaultSize, 0 );
49 gbSizer1->Add( m_buttonGrey, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
50
51
52 gbSizer1->AddGrowableCol( 1 );
53
54 bSizerLeft->Add( gbSizer1, 0, wxEXPAND|wxALL, 10 );
55
56
57 bUpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
58
59
60 bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
61
62
63 this->SetSizer( bSizerMain );
64 this->Layout();
65 bSizerMain->Fit( this );
66
67 // Connect Events
68 m_panelDraw->Connect( wxEVT_PAINT, wxPaintEventHandler( PANEL_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
69 m_buttonGrey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
70}
71
73{
74 // Disconnect Events
75 m_panelDraw->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PANEL_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
76 m_buttonGrey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
77
78}
const char * name
Definition: DXF_plotter.cpp:57
PANEL_IMAGE_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnGreyScaleConvert(wxCommandEvent &event)
virtual void OnRedrawPanel(wxPaintEvent &event)
#define _(s)