Commit bf2362ac authored by jean-pierre charras's avatar jean-pierre charras

Eeschema: converted HPGL plot dialog from Dialogblocks to wxFormBuilder

parents 387bbe2b 4f0273b0
......@@ -37,6 +37,8 @@ set(EESCHEMA_SRCS
database.cpp
delete.cpp
delsheet.cpp
dialogs/dialog_plot_schematic_HPGL.cpp
dialogs/dialog_plot_schematic_HPGL_base.cpp
dialogs/dialog_plot_schematic_PS.cpp
dialogs/dialog_plot_schematic_PS_base.cpp
dialog_annotate_base.cpp
......@@ -118,7 +120,6 @@ set(EESCHEMA_SRCS
operations_on_items_lists.cpp
pinedit.cpp
plot.cpp
plothpgl.cpp
plotdxf.cpp
read_from_file_schematic_items_descriptions.cpp
save_schemas.cpp
......
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_plot_schematic_HPGL_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_PLOT_SCHEMATIC_HPGL_BASE::DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bmainSizer;
bmainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bleftSizer;
bleftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_SizeOptionChoices[] = { _("Schematic size"), _("Page size A4"), _("Page size A3"), _("Page size A2"), _("Page size A1"), _("Page size A0"), _("Page size A"), _("Page size B"), _("Page size C"), _("Page size D"), _("Page size E") };
int m_SizeOptionNChoices = sizeof( m_SizeOptionChoices ) / sizeof( wxString );
m_SizeOption = new wxRadioBox( this, wxID_ANY, _("Plot Page Size:"), wxDefaultPosition, wxDefaultSize, m_SizeOptionNChoices, m_SizeOptionChoices, 1, wxRA_SPECIFY_COLS );
m_SizeOption->SetSelection( 1 );
bleftSizer->Add( m_SizeOption, 0, wxALL|wxEXPAND, 5 );
m_Plot_Sheet_Ref_Ctrl = new wxCheckBox( this, wxID_ANY, _("Print page references"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Sheet_Ref_Ctrl->SetValue(true);
bleftSizer->Add( m_Plot_Sheet_Ref_Ctrl, 0, wxALL|wxEXPAND, 5 );
bupperSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
wxBoxSizer* sbSizerMiddle;
sbSizerMiddle = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pen control:") ), wxVERTICAL );
m_penWidthTitle = new wxStaticText( this, wxID_ANY, _("Pen Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_penWidthTitle->Wrap( -1 );
sbSizer1->Add( m_penWidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_penWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizer1->Add( m_penWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_penSpeedTitle = new wxStaticText( this, wxID_ANY, _("Pen Speed ( cm/s )"), wxDefaultPosition, wxDefaultSize, 0 );
m_penSpeedTitle->Wrap( -1 );
sbSizer1->Add( m_penSpeedTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_penSpeedCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 50, 20 );
sbSizer1->Add( m_penSpeedCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_penNumTitle = new wxStaticText( this, wxID_ANY, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 );
m_penNumTitle->Wrap( -1 );
sbSizer1->Add( m_penNumTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_penNumCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 8, 1 );
sbSizer1->Add( m_penNumCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerMiddle->Add( sbSizer1, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizer2;
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Page offset:") ), wxVERTICAL );
m_offsetXTitle = new wxStaticText( this, wxID_ANY, _("Plot Offset X"), wxDefaultPosition, wxDefaultSize, 0 );
m_offsetXTitle->Wrap( -1 );
sbSizer2->Add( m_offsetXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PlotOrgPosition_X = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizer2->Add( m_PlotOrgPosition_X, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_offsetYTitle = new wxStaticText( this, wxID_ANY, _("Plot Offset Y"), wxDefaultPosition, wxDefaultSize, 0 );
m_offsetYTitle->Wrap( -1 );
sbSizer2->Add( m_offsetYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PlotOrgPosition_Y = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizer2->Add( m_PlotOrgPosition_Y, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerMiddle->Add( sbSizer2, 1, wxEXPAND|wxALL, 5 );
bupperSizer->Add( sbSizerMiddle, 1, wxEXPAND, 5 );
bupperSizer->Add( 10, 10, 0, 0, 5 );
wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonPlotPage = new wxButton( this, wxID_ANY, _("&Plot Page"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPlotPage, 0, wxALL|wxEXPAND, 5 );
m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
bbuttonsSizer->Add( 10, 10, 1, wxEXPAND, 5 );
m_buttonOffset = new wxButton( this, wxID_ANY, _("&Accept Offset"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonOffset, 0, wxALL, 5 );
bupperSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
bmainSizer->Add( bupperSizer, 0, wxEXPAND, 5 );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages :"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
bmainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MsgBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_MsgBox->SetMinSize( wxSize( -1,150 ) );
bmainSizer->Add( m_MsgBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( bmainSizer );
this->Layout();
this->Centre( wxBOTH );
// Connect Events
m_SizeOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnPageSelected ), NULL, this );
m_buttonPlotPage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnPlotCurrent ), NULL, this );
m_buttonPlotAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnPlotAll ), NULL, this );
m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnCancelClick ), NULL, this );
m_buttonOffset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::AcceptPlotOffset ), NULL, this );
}
DIALOG_PLOT_SCHEMATIC_HPGL_BASE::~DIALOG_PLOT_SCHEMATIC_HPGL_BASE()
{
// Disconnect Events
m_SizeOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnPageSelected ), NULL, this );
m_buttonPlotPage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnPlotCurrent ), NULL, this );
m_buttonPlotAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnPlotAll ), NULL, this );
m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::OnCancelClick ), NULL, this );
m_buttonOffset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_HPGL_BASE::AcceptPlotOffset ), NULL, this );
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_plot_schematic_HPGL_base__
#define __dialog_plot_schematic_HPGL_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/spinctrl.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PLOT_SCHEMATIC_HPGL_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_PLOT_SCHEMATIC_HPGL_BASE : public wxDialog
{
private:
protected:
wxRadioBox* m_SizeOption;
wxCheckBox* m_Plot_Sheet_Ref_Ctrl;
wxStaticText* m_penWidthTitle;
wxTextCtrl* m_penWidthCtrl;
wxStaticText* m_penSpeedTitle;
wxSpinCtrl* m_penSpeedCtrl;
wxStaticText* m_penNumTitle;
wxSpinCtrl* m_penNumCtrl;
wxStaticText* m_offsetXTitle;
wxTextCtrl* m_PlotOrgPosition_X;
wxStaticText* m_offsetYTitle;
wxTextCtrl* m_PlotOrgPosition_Y;
wxButton* m_buttonPlotPage;
wxButton* m_buttonPlotAll;
wxButton* m_buttonClose;
wxButton* m_buttonOffset;
wxStaticText* m_staticText1;
wxTextCtrl* m_MsgBox;
// Virtual event handlers, overide them in your derived class
virtual void OnPageSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotCurrent( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotAll( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void AcceptPlotOffset( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot HPGL"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,408 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_SCHEMATIC_HPGL_BASE();
};
#endif //__dialog_plot_schematic_HPGL_base__
/** @file dialog_plot_schematic_ps.cpp
/** @file dialog_plot_schematic_PS.cpp
*/
/*
......@@ -60,8 +60,8 @@ private:
static bool m_plot_Sheet_Ref;
bool m_select_PlotAll;
private:
void OnPlotPsCurrentExecuteClick( wxCommandEvent& event );
void OnPlotPsAllExecuteClick( wxCommandEvent& event );
void OnPlotCurrent( wxCommandEvent& event );
void OnPlotAll( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
void initDlg();
......@@ -71,7 +71,7 @@ private:
SCH_SCREEN* screen, Ki_PageDescr* sheet,
wxPoint plot_offset, double scale );
};
/* static variables (staic to remember last state: */
/* static members (static to remember last state): */
bool DIALOG_PLOT_SCHEMATIC_PS::m_plotColorOpt = false;
int DIALOG_PLOT_SCHEMATIC_PS:: m_pageSizeSelect = PAGE_SIZE_AUTO;
bool DIALOG_PLOT_SCHEMATIC_PS::m_plot_Sheet_Ref = true;
......@@ -120,7 +120,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::initDlg()
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
*/
void DIALOG_PLOT_SCHEMATIC_PS::OnPlotPsCurrentExecuteClick( wxCommandEvent& event )
void DIALOG_PLOT_SCHEMATIC_PS::OnPlotCurrent( wxCommandEvent& event )
{
m_select_PlotAll = false;
......@@ -134,7 +134,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::OnPlotPsCurrentExecuteClick( wxCommandEvent& even
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1
*/
void DIALOG_PLOT_SCHEMATIC_PS::OnPlotPsAllExecuteClick( wxCommandEvent& event )
void DIALOG_PLOT_SCHEMATIC_PS::OnPlotAll( wxCommandEvent& event )
{
m_select_PlotAll = TRUE;
......
......@@ -19,9 +19,9 @@ DIALOG_PLOT_SCHEMATIC_PS_BASE::DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent,
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxHORIZONTAL );
wxString m_SizeOptionChoices[] = { wxT("Schematic size"), wxT("Force size A4"), wxT("Force size A") };
wxString m_SizeOptionChoices[] = { _("Schematic size"), _("Force size A4"), _("Force size A") };
int m_SizeOptionNChoices = sizeof( m_SizeOptionChoices ) / sizeof( wxString );
m_SizeOption = new wxRadioBox( this, wxID_ANY, wxT("Plot Page Size:"), wxDefaultPosition, wxDefaultSize, m_SizeOptionNChoices, m_SizeOptionChoices, 1, wxRA_SPECIFY_COLS );
m_SizeOption = new wxRadioBox( this, wxID_ANY, _("Plot Page Size:"), wxDefaultPosition, wxDefaultSize, m_SizeOptionNChoices, m_SizeOptionChoices, 1, wxRA_SPECIFY_COLS );
m_SizeOption->SetSelection( 0 );
bupperSizer->Add( m_SizeOption, 1, wxALL, 5 );
......@@ -31,13 +31,13 @@ DIALOG_PLOT_SCHEMATIC_PS_BASE::DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent,
wxBoxSizer* sbSizerMiddle;
sbSizerMiddle = new wxBoxSizer( wxVERTICAL );
wxString m_PlotPSColorOptionChoices[] = { wxT("B/W"), wxT("Color") };
wxString m_PlotPSColorOptionChoices[] = { _("B/W"), _("Color") };
int m_PlotPSColorOptionNChoices = sizeof( m_PlotPSColorOptionChoices ) / sizeof( wxString );
m_PlotPSColorOption = new wxRadioBox( this, wxID_ANY, wxT("Plot Mode:"), wxDefaultPosition, wxDefaultSize, m_PlotPSColorOptionNChoices, m_PlotPSColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_PlotPSColorOption = new wxRadioBox( this, wxID_ANY, _("Plot Mode:"), wxDefaultPosition, wxDefaultSize, m_PlotPSColorOptionNChoices, m_PlotPSColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_PlotPSColorOption->SetSelection( 0 );
sbSizerMiddle->Add( m_PlotPSColorOption, 0, wxALL|wxEXPAND, 5 );
m_Plot_Sheet_Ref_Ctrl = new wxCheckBox( this, wxID_ANY, wxT("Print page references"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Sheet_Ref_Ctrl = new wxCheckBox( this, wxID_ANY, _("Print page references"), wxDefaultPosition, wxDefaultSize, 0 );
m_Plot_Sheet_Ref_Ctrl->SetValue(true);
sbSizerMiddle->Add( m_Plot_Sheet_Ref_Ctrl, 0, wxALL|wxEXPAND, 5 );
......@@ -49,13 +49,13 @@ DIALOG_PLOT_SCHEMATIC_PS_BASE::DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent,
wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonPlotPage = new wxButton( this, wxID_ANY, wxT("&Plot Page"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonPlotPage = new wxButton( this, wxID_ANY, _("&Plot Page"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPlotPage, 0, wxALL|wxEXPAND, 5 );
m_buttonPlotAll = new wxButton( this, wxID_ANY, wxT("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonClose = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
bupperSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
......@@ -65,7 +65,7 @@ DIALOG_PLOT_SCHEMATIC_PS_BASE::DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent,
wxBoxSizer* bSizerLineWidth;
bSizerLineWidth = new wxBoxSizer( wxHORIZONTAL );
m_defaultLineWidthTitle = new wxStaticText( this, wxID_ANY, wxT("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_defaultLineWidthTitle = new wxStaticText( this, wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_defaultLineWidthTitle->Wrap( -1 );
bSizerLineWidth->Add( m_defaultLineWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -74,7 +74,7 @@ DIALOG_PLOT_SCHEMATIC_PS_BASE::DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent,
bmainSizer->Add( bSizerLineWidth, 0, wxEXPAND, 5 );
m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Messages :"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages :"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
bmainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
......@@ -89,16 +89,16 @@ DIALOG_PLOT_SCHEMATIC_PS_BASE::DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent,
this->Centre( wxBOTH );
// Connect Events
m_buttonPlotPage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotPsCurrentExecuteClick ), NULL, this );
m_buttonPlotAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotPsAllExecuteClick ), NULL, this );
m_buttonPlotPage->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotCurrent ), NULL, this );
m_buttonPlotAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotAll ), NULL, this );
m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnCancelClick ), NULL, this );
}
DIALOG_PLOT_SCHEMATIC_PS_BASE::~DIALOG_PLOT_SCHEMATIC_PS_BASE()
{
// Disconnect Events
m_buttonPlotPage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotPsCurrentExecuteClick ), NULL, this );
m_buttonPlotAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotPsAllExecuteClick ), NULL, this );
m_buttonPlotPage->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotCurrent ), NULL, this );
m_buttonPlotAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnPlotAll ), NULL, this );
m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_PS_BASE::OnCancelClick ), NULL, this );
}
......@@ -12,7 +12,7 @@
<property name="file">dialog_plot_schematic_PS_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">0</property>
<property name="internationalize">1</property>
<property name="name">dialog_plot_schematic_PS</property>
<property name="namespace"></property>
<property name="path">.</property>
......@@ -339,7 +339,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPlotPsCurrentExecuteClick</event>
<event name="OnButtonClick">OnPlotCurrent</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
......@@ -396,7 +396,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPlotPsAllExecuteClick</event>
<event name="OnButtonClick">OnPlotAll</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
......
......@@ -8,6 +8,8 @@
#ifndef __dialog_plot_schematic_PS_base__
#define __dialog_plot_schematic_PS_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
......@@ -46,14 +48,14 @@ class DIALOG_PLOT_SCHEMATIC_PS_BASE : public wxDialog
wxTextCtrl* m_MsgBox;
// Virtual event handlers, overide them in your derived class
virtual void OnPlotPsCurrentExecuteClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotPsAllExecuteClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotCurrent( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotAll( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("EESchema Plot PS"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot PS"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_SCHEMATIC_PS_BASE();
};
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: plothpgl.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 04/02/2006 16:54:19
// RCS-ID:
// Copyright: License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 04/02/2006 16:54:19
#ifndef _PLOTHPGL_H_
#define _PLOTHPGL_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "plothpgl.h"
#endif
/*!
* Includes
*/
////@begin includes
#include "wx/valgen.h"
#include "wx/spinctrl.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class wxSpinCtrl;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_RADIOBOX 10001
#define ID_PEN_WIDTH_UPDATED 10002
#define ID_PEN_SPEED_UPDATED 10003
#define ID_PEN_NUMBER_UPDATED 10004
#define ID_TEXTCTRL1 10010
#define ID_TEXTCTRL2 10009
#define ID_PLOT_HPGL_CURRENT_EXECUTE 10005
#define ID_PLOT_HPGL_ALL_EXECUTE 10006
#define ID_PLOT_ACCEPT_OFFSET 10008
#define ID_TEXTCTRL 10007
#define SYMBOL_WINEDA_PLOTHPGLFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PLOTHPGLFRAME_TITLE _("EESchema Plot HPGL")
#define SYMBOL_WINEDA_PLOTHPGLFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PLOTHPGLFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_PLOTHPGLFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_PlotHPGLFrame class declaration
*/
class WinEDA_PlotHPGLFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_PlotHPGLFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_PlotHPGLFrame( );
WinEDA_PlotHPGLFrame( WinEDA_DrawFrame* parent, wxWindowID id = SYMBOL_WINEDA_PLOTHPGLFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PLOTHPGLFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PLOTHPGLFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PLOTHPGLFRAME_SIZE, long style = SYMBOL_WINEDA_PLOTHPGLFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PLOTHPGLFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PLOTHPGLFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PLOTHPGLFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PLOTHPGLFRAME_SIZE, long style = SYMBOL_WINEDA_PLOTHPGLFRAME_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_PlotHPGLFrame event handler declarations
/// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
void OnRadioboxSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_PEN_WIDTH_UPDATED
void OnPenWidthUpdatedUpdated( wxSpinEvent& event );
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_PEN_SPEED_UPDATED
void OnPenSpeedUpdatedUpdated( wxSpinEvent& event );
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_PEN_NUMBER_UPDATED
void OnPenNumberUpdatedUpdated( wxSpinEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PLOT_HPGL_CURRENT_EXECUTE
void OnPlotHpglCurrentExecuteClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PLOT_HPGL_ALL_EXECUTE
void OnPlotHpglAllExecuteClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PLOT_ACCEPT_OFFSET
void OnPlotAcceptOffsetClick( wxCommandEvent& event );
////@end WinEDA_PlotHPGLFrame event handler declarations
////@begin WinEDA_PlotHPGLFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_PlotHPGLFrame member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
void HPGL_Plot(wxCommandEvent& event);
void SetSizeOption(wxCommandEvent& event);
void AcceptPlotOffset(wxCommandEvent& event);
void SetPenWidth(wxSpinEvent& event);
void SetPenSpeed(wxSpinEvent& event);
void SetPenNum(wxSpinEvent& event);
void Plot_1_Page_HPGL(const wxString &FileName, SCH_SCREEN * screen,
Ki_PageDescr* paper, wxPoint& offset, double scale);
void Plot_Schematic_HPGL(int Select_PlotAll, int HPGL_SheetSize);
void ReturnSheetDims( BASE_SCREEN * screen, wxSize & SheetSize, wxPoint & SheetOffset);
void SetPageOffsetValue();
////@begin WinEDA_PlotHPGLFrame member variables
wxRadioBox* m_SizeOption;
wxSpinCtrl* m_ButtPenWidth;
wxSpinCtrl* m_ButtPenSpeed;
wxSpinCtrl* m_ButtPenNum;
wxTextCtrl* m_PlotOrgPosition_X;
wxTextCtrl* m_PlotOrgPosition_Y;
wxButton* m_btClose;
wxTextCtrl* m_MsgBox;
////@end WinEDA_PlotHPGLFrame member variables
WinEDA_DrawFrame * m_Parent;
};
#endif
// _PLOTHPGL_H_
This diff is collapsed.
#include "wx/msw/wx.rc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment