2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2023-04-08 14:41:41 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2017-12-26 14:38:45 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-07-07 14:17:21 +00:00
|
|
|
#include "panel_image_editor_base.h"
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-07-07 14:17:21 +00:00
|
|
|
PANEL_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 )
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
wxBoxSizer* bSizerMain;
|
|
|
|
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bUpperSizer;
|
|
|
|
bUpperSizer = new wxBoxSizer( wxVERTICAL );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bSizerLeft;
|
|
|
|
bSizerLeft = new wxBoxSizer( wxHORIZONTAL );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
|
|
|
m_panelDraw = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL|wxBORDER_SIMPLE );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_panelDraw->SetMinSize( wxSize( 256,256 ) );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
bSizerLeft->Add( m_panelDraw, 1, wxEXPAND | wxALL, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bSizerRight;
|
|
|
|
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_buttonGrey = new wxButton( this, wxID_ANY, _("Grey"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerRight->Add( m_buttonGrey, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
|
|
|
|
2019-06-19 10:31:21 +00:00
|
|
|
bSizerRight->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Image Scale:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticTextScale->Wrap( -1 );
|
|
|
|
bSizerRight->Add( m_staticTextScale, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_textCtrlScale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerRight->Add( m_textCtrlScale, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
|
|
|
|
2019-06-19 10:31:21 +00:00
|
|
|
bSizerLeft->Add( bSizerRight, 0, wxEXPAND|wxALL, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
bUpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
|
2022-07-07 14:17:21 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
this->SetSizer( bSizerMain );
|
|
|
|
this->Layout();
|
2022-07-07 14:17:21 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Connect Events
|
2022-07-07 14:17:21 +00:00
|
|
|
m_panelDraw->Connect( wxEVT_PAINT, wxPaintEventHandler( PANEL_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
|
|
|
|
m_buttonGrey->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
2022-07-07 14:17:21 +00:00
|
|
|
PANEL_IMAGE_EDITOR_BASE::~PANEL_IMAGE_EDITOR_BASE()
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
// Disconnect Events
|
2022-07-07 14:17:21 +00:00
|
|
|
m_panelDraw->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PANEL_IMAGE_EDITOR_BASE::OnRedrawPanel ), NULL, this );
|
|
|
|
m_buttonGrey->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_IMAGE_EDITOR_BASE::OnGreyScaleConvert ), NULL, this );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|