Add margin values control in pl_editor, and remove margin definition from class PAGE_INFO.

This commit is contained in:
jean-pierre charras 2013-07-20 21:36:19 +02:00
parent 50743cf3ba
commit 1f3f11ca0d
31 changed files with 6648 additions and 5328 deletions

View File

@ -126,25 +126,6 @@ inline void PAGE_INFO::updatePortrait()
} }
void PAGE_INFO::setMargins()
{
if( IsGOST() )
{
m_left_margin = Mm2mils( 20 ); // 20mm
m_right_margin = // 5mm
m_top_margin = // 5mm
m_bottom_margin = Mm2mils( 5 ); // 5mm
}
else
{
m_left_margin =
m_right_margin =
m_top_margin =
m_bottom_margin = Mm2mils( 10 );
}
}
PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType, wxPaperSize aPaperId ) : PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType, wxPaperSize aPaperId ) :
m_type( aType ), m_type( aType ),
m_size( aSizeMils ), m_size( aSizeMils ),
@ -152,8 +133,6 @@ PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType, wxPaperSiz
{ {
updatePortrait(); updatePortrait();
setMargins();
// This constructor is protected, and only used by const PAGE_INFO's known // This constructor is protected, and only used by const PAGE_INFO's known
// only to class implementation, so no further changes to "this" object are // only to class implementation, so no further changes to "this" object are
// expected. Therefore we should also setMargin() again when copying this // expected. Therefore we should also setMargin() again when copying this
@ -222,8 +201,6 @@ bool PAGE_INFO::SetType( const wxString& aType, bool IsPortrait )
updatePortrait(); updatePortrait();
} }
setMargins();
return rc; return rc;
} }

View File

@ -77,15 +77,6 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
/* Note: Page sizes values are given in mils /* Note: Page sizes values are given in mils
*/ */
double iusPerMil = plotter->GetIUsPerDecimil() * 10.0; double iusPerMil = plotter->GetIUsPerDecimil() * 10.0;
wxSize pageSize = aPageInfo.GetSizeMils(); // in mils
wxPoint LTmargin;
LTmargin.x = aPageInfo.GetLeftMarginMils() * iusPerMil;
LTmargin.y = aPageInfo.GetTopMarginMils() * iusPerMil;
wxPoint RBmargin;
RBmargin.x = aPageInfo.GetRightMarginMils() * iusPerMil;
RBmargin.y = aPageInfo.GetBottomMarginMils() * iusPerMil;
EDA_COLOR_T plotColor = plotter->GetColorMode() ? RED : BLACK; EDA_COLOR_T plotColor = plotter->GetColorMode() ? RED : BLACK;
plotter->SetColor( plotColor ); plotter->SetColor( plotColor );
@ -96,10 +87,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
wxFileName fn( aFilename ); wxFileName fn( aFilename );
// Prepare plot parameters // Prepare plot parameters
drawList.SetMargins( LTmargin, RBmargin);
drawList.SetPenSize(PLOTTER::DEFAULT_LINE_WIDTH ); drawList.SetPenSize(PLOTTER::DEFAULT_LINE_WIDTH );
drawList.SetMilsToIUfactor( iusPerMil ); drawList.SetMilsToIUfactor( iusPerMil );
drawList.SetPageSize( pageSize );
drawList.SetSheetNumber( aSheetNumber ); drawList.SetSheetNumber( aSheetNumber );
drawList.SetSheetCount( aNumberOfSheets ); drawList.SetSheetCount( aNumberOfSheets );
drawList.SetFileName( fn.GetFullName() ); // Print only the short filename drawList.SetFileName( fn.GetFullName() ); // Print only the short filename

View File

@ -563,13 +563,14 @@ void EDA_DRAW_PANEL::ReDraw( wxDC* DC, bool erasebg )
g_GhostColor = WHITE; g_GhostColor = WHITE;
} }
GRResetPenAndBrush( DC );
DC->SetBackground( g_DrawBgColor == BLACK ? *wxBLACK_BRUSH : *wxWHITE_BRUSH );
DC->SetBackgroundMode( wxSOLID );
if( erasebg ) if( erasebg )
EraseScreen( DC ); EraseScreen( DC );
GRResetPenAndBrush( DC );
DC->SetBackground( *wxBLACK_BRUSH );
DC->SetBackgroundMode( wxSOLID );
GetParent()->RedrawActiveWindow( DC, erasebg ); GetParent()->RedrawActiveWindow( DC, erasebg );
// Verfies that the clipping is working correctly. If these two sets of numbers are // Verfies that the clipping is working correctly. If these two sets of numbers are

View File

@ -682,7 +682,7 @@ void EDA_BASE_FRAME::ImportHotkeyConfigFromFile( struct EDA_HOTKEY_CONFIG* aDesc
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext; wxString mask = wxT( "*." ) + ext;
wxString path = wxGetCwd(); wxString path = wxGetCwd();
wxString filename; wxString filename = wxGetApp().GetAppName() + wxT( "." ) + ext;
filename = EDA_FileSelector( _( "Read Hotkey Configuration File:" ), filename = EDA_FileSelector( _( "Read Hotkey Configuration File:" ),
path, path,
@ -710,7 +710,7 @@ void EDA_BASE_FRAME::ExportHotkeyConfigToFile( struct EDA_HOTKEY_CONFIG* aDescLi
wxString ext = DEFAULT_HOTKEY_FILENAME_EXT; wxString ext = DEFAULT_HOTKEY_FILENAME_EXT;
wxString mask = wxT( "*." ) + ext; wxString mask = wxT( "*." ) + ext;
wxString path = wxGetCwd(); wxString path = wxGetCwd();
wxString filename; wxString filename = wxGetApp().GetAppName() + wxT( "." ) + ext;
filename = EDA_FileSelector( _( "Write Hotkey Configuration File:" ), filename = EDA_FileSelector( _( "Write Hotkey Configuration File:" ),
path, path,

View File

@ -72,7 +72,7 @@ double WORKSHEET_DATAITEM::m_DefaultTextThickness = 0.0;
bool WORKSHEET_DATAITEM::m_SpecialMode = false; bool WORKSHEET_DATAITEM::m_SpecialMode = false;
EDA_COLOR_T WORKSHEET_DATAITEM::m_Color = RED; // the default color to draw items EDA_COLOR_T WORKSHEET_DATAITEM::m_Color = RED; // the default color to draw items
EDA_COLOR_T WORKSHEET_DATAITEM::m_AltColor = RED; // an alternate color to draw items EDA_COLOR_T WORKSHEET_DATAITEM::m_AltColor = RED; // an alternate color to draw items
EDA_COLOR_T WORKSHEET_DATAITEM::m_SelectedColor = YELLOW; // the color to draw selected items EDA_COLOR_T WORKSHEET_DATAITEM::m_SelectedColor = BROWN; // the color to draw selected items
// The constructor: // The constructor:
WORKSHEET_DATAITEM::WORKSHEET_DATAITEM( WS_ItemType aType ) WORKSHEET_DATAITEM::WORKSHEET_DATAITEM( WS_ItemType aType )

View File

@ -61,6 +61,36 @@
// It is accessible by WORKSHEET_LAYOUT::GetTheInstance() // It is accessible by WORKSHEET_LAYOUT::GetTheInstance()
WORKSHEET_LAYOUT wksTheInstance; WORKSHEET_LAYOUT wksTheInstance;
WORKSHEET_LAYOUT::WORKSHEET_LAYOUT()
{
m_allowVoidList = false;
m_leftMargin = 10.0; // the left page margin in mm
m_rightMargin = 10.0; // the right page margin in mm
m_topMargin = 10.0; // the top page margin in mm
m_bottomMargin = 10.0; // the bottom page margin in mm
}
void WORKSHEET_LAYOUT::SetLeftMargin( double aMargin )
{
m_leftMargin = aMargin; // the left page margin in mm
}
void WORKSHEET_LAYOUT::SetRightMargin( double aMargin )
{
m_rightMargin = aMargin; // the right page margin in mm
}
void WORKSHEET_LAYOUT::SetTopMargin( double aMargin )
{
m_topMargin = aMargin; // the top page margin in mm
}
void WORKSHEET_LAYOUT::SetBottomMargin( double aMargin )
{
m_bottomMargin = aMargin; // the bottom page margin in mm
}
void WORKSHEET_LAYOUT::ClearList() void WORKSHEET_LAYOUT::ClearList()
{ {
for( unsigned ii = 0; ii < m_list.size(); ii++ ) for( unsigned ii = 0; ii < m_list.size(); ii++ )

View File

@ -167,7 +167,8 @@ extern const char defaultPageLayout[];
// Default page layout (sizes are in mm) // Default page layout (sizes are in mm)
const char defaultPageLayout[] = "( page_layout\n" const char defaultPageLayout[] = "( page_layout\n"
"(setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) )" "(setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15)\n"
"(left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))\n"
"(rect (comment \"rect around the title block\") (linewidth 0.15) (start 110 34) (end 2 2) )\n" "(rect (comment \"rect around the title block\") (linewidth 0.15) (start 110 34) (end 2 2) )\n"
"(rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) )\n" "(rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) )\n"
"(line (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50) )\n" "(line (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50) )\n"

View File

@ -69,7 +69,7 @@ private:
*/ */
double parseDouble(); double parseDouble();
void parseSetup() throw( IO_ERROR, PARSE_ERROR ); void parseSetup( WORKSHEET_LAYOUT* aLayout ) throw( IO_ERROR, PARSE_ERROR );
void parseGraphic( WORKSHEET_DATAITEM * aItem ) throw( IO_ERROR, PARSE_ERROR ); void parseGraphic( WORKSHEET_DATAITEM * aItem ) throw( IO_ERROR, PARSE_ERROR );
void parseText( WORKSHEET_DATAITEM_TEXT * aItem ) throw( IO_ERROR, PARSE_ERROR ); void parseText( WORKSHEET_DATAITEM_TEXT * aItem ) throw( IO_ERROR, PARSE_ERROR );
void parsePolygon( WORKSHEET_DATAITEM_POLYPOLYGON * aItem ) void parsePolygon( WORKSHEET_DATAITEM_POLYPOLYGON * aItem )
@ -110,7 +110,7 @@ void PAGE_LAYOUT_READER_PARSER::Parse( WORKSHEET_LAYOUT* aLayout )
switch( token ) switch( token )
{ {
case T_setup: // Defines default values for graphic items case T_setup: // Defines default values for graphic items
parseSetup(); parseSetup( aLayout );
break; break;
case T_line: case T_line:
@ -145,7 +145,8 @@ void PAGE_LAYOUT_READER_PARSER::Parse( WORKSHEET_LAYOUT* aLayout )
} }
} }
void PAGE_LAYOUT_READER_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) void PAGE_LAYOUT_READER_PARSER::parseSetup( WORKSHEET_LAYOUT* aLayout )
throw( IO_ERROR, PARSE_ERROR )
{ {
T token; T token;
while( ( token = NextTok() ) != T_RIGHT ) while( ( token = NextTok() ) != T_RIGHT )
@ -174,6 +175,26 @@ void PAGE_LAYOUT_READER_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR )
NeedRIGHT(); NeedRIGHT();
break; break;
case T_left_margin:
aLayout->SetLeftMargin( parseDouble() );
NeedRIGHT();
break;
case T_right_margin:
aLayout->SetRightMargin( parseDouble() );
NeedRIGHT();
break;
case T_top_margin:
aLayout->SetTopMargin( parseDouble() );
NeedRIGHT();
break;
case T_bottom_margin:
aLayout->SetBottomMargin( parseDouble() );
NeedRIGHT();
break;
default: default:
Unexpected( CurText() ); Unexpected( CurText() );
break; break;

View File

@ -1,5 +1,9 @@
page_layout page_layout
setup setup
left_margin
right_margin
top_margin
bottom_margin
linewidth linewidth
textlinewidth textlinewidth
textsize textsize

View File

@ -67,17 +67,21 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
EDA_COLOR_T aColor, EDA_COLOR_T aAltColor ) EDA_COLOR_T aColor, EDA_COLOR_T aAltColor )
{ {
#define milsTomm (25.4/1000) #define milsTomm (25.4/1000)
#define mmTomils (1000/25.4)
m_titleBlock = &aTitleBlock; m_titleBlock = &aTitleBlock;
m_paperFormat = &aPageInfo.GetType(); m_paperFormat = &aPageInfo.GetType();
wxPoint LTmargin( aPageInfo.GetLeftMarginMils(), aPageInfo.GetTopMarginMils() ); WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
wxPoint RBmargin( aPageInfo.GetRightMarginMils(), aPageInfo.GetBottomMarginMils() );
wxPoint LTmargin( Mm2mils( pglayout.GetLeftMargin() ),
Mm2mils( pglayout.GetTopMargin() ) );
wxPoint RBmargin( Mm2mils( pglayout.GetRightMargin() ),
Mm2mils( pglayout.GetBottomMargin() ) );
SetMargins( LTmargin, RBmargin ); SetMargins( LTmargin, RBmargin );
SetPageSize( aPageInfo.GetSizeMils() ); SetPageSize( aPageInfo.GetSizeMils() );
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
// Build the basic layout shape, if the layout list is empty // Build the basic layout shape, if the layout list is empty
if( pglayout.GetCount() == 0 && !pglayout.VoidListAllowed() ) if( pglayout.GetCount() == 0 && !pglayout.VoidListAllowed() )
pglayout.SetPageLayout(); pglayout.SetPageLayout();

View File

@ -991,8 +991,8 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
wxString paperFormat = aPageInfo.GetType(); wxString paperFormat = aPageInfo.GetType();
WS_DRAW_ITEM_TEXT* gtext; WS_DRAW_ITEM_TEXT* gtext;
wxPoint LTmargin( aPageInfo.GetLeftMarginMils(), aPageInfo.GetTopMarginMils() ); wxPoint LTmargin( Mm2mils( 20 ), Mm2mils( 5 ) );
wxPoint RBmargin( aPageInfo.GetRightMarginMils(), aPageInfo.GetBottomMarginMils() ); wxPoint RBmargin( Mm2mils( 5 ), Mm2mils( 5 ) );
SetMargins( LTmargin, RBmargin ); SetMargins( LTmargin, RBmargin );
SetPageSize( aPageInfo.GetSizeMils() ); SetPageSize( aPageInfo.GetSizeMils() );

View File

@ -44,7 +44,8 @@ enum EDA_APP_T {
APP_PCBNEW_T, APP_PCBNEW_T,
APP_CVPCB_T, APP_CVPCB_T,
APP_GERBVIEW_T, APP_GERBVIEW_T,
APP_KICAD_T APP_KICAD_T,
APP_PL_EDITOR_T
}; };
class wxConfigBase; class wxConfigBase;

View File

@ -302,54 +302,6 @@ public:
const wxSize GetSizeIU() const { return wxSize( GetWidthIU(), GetHeightIU() ); } const wxSize GetSizeIU() const { return wxSize( GetWidthIU(), GetHeightIU() ); }
#endif #endif
/**
* Function GetLeftMarginMils.
* @return int - logical page left margin in mils.
*/
int GetLeftMarginMils() const { return m_left_margin; }
/**
* Function GetLeftMarginMils.
* @return int - logical page right margin in mils.
*/
int GetRightMarginMils() const { return m_right_margin; }
/**
* Function GetLeftMarginMils.
* @return int - logical page top margin in mils.
*/
int GetTopMarginMils() const { return m_top_margin; }
/**
* Function GetBottomMarginMils.
* @return int - logical page bottom margin in mils.
*/
int GetBottomMarginMils() const { return m_bottom_margin; }
/**
* Function SetLeftMarginMils
* sets left page margin to @a aMargin in mils.
*/
void SetLeftMarginMils( int aMargin ) { m_left_margin = aMargin; }
/**
* Function SetRightMarginMils
* sets right page margin to @a aMargin in mils.
*/
void SetRightMarginMils( int aMargin ) { m_right_margin = aMargin; }
/**
* Function SetTopMarginMils
* sets top page margin to @a aMargin in mils.
*/
void SetTopMarginMils( int aMargin ) { m_top_margin = aMargin; }
/**
* Function SetBottomMarginMils
* sets bottom page margin to @a aMargin in mils.
*/
void SetBottomMarginMils( int aMargin ) { m_bottom_margin = aMargin; }
/** /**
* Function SetCustomWidthMils * Function SetCustomWidthMils
* sets the width of Custom page in mils, for any custom page * sets the width of Custom page in mils, for any custom page
@ -429,12 +381,6 @@ private:
#define MIN_PAGE_SIZE 4000 #define MIN_PAGE_SIZE 4000
#define MAX_PAGE_SIZE 48000 #define MAX_PAGE_SIZE 48000
int m_left_margin;
int m_right_margin;
int m_top_margin;
int m_bottom_margin;
bool m_portrait; ///< true if portrait, false if landscape bool m_portrait; ///< true if portrait, false if landscape
wxPaperSize m_paper_id; ///< wx' style paper id. wxPaperSize m_paper_id; ///< wx' style paper id.

View File

@ -460,9 +460,13 @@ class WORKSHEET_LAYOUT
// will be loaded the first time // will be loaded the first time
// WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList // WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList
// is run (useful mainly for page layout editor) // is run (useful mainly for page layout editor)
double m_leftMargin; // the left page margin in mm
double m_rightMargin; // the right page margin in mm
double m_topMargin; // the top page margin in mm
double m_bottomMargin; // the bottom page margin in mm
public: public:
WORKSHEET_LAYOUT() { m_allowVoidList = false; } WORKSHEET_LAYOUT();
~WORKSHEET_LAYOUT() {ClearList(); } ~WORKSHEET_LAYOUT() {ClearList(); }
/** /**
@ -475,6 +479,17 @@ public:
return wksTheInstance; return wksTheInstance;
} }
// Accessors:
double GetLeftMargin() { return m_leftMargin; }
double GetRightMargin() { return m_rightMargin; }
double GetTopMargin() { return m_topMargin; }
double GetBottomMargin() { return m_bottomMargin; }
void SetLeftMargin( double aMargin );
void SetRightMargin( double aMargin );
void SetTopMargin( double aMargin );
void SetBottomMargin( double aMargin );
/** /**
* In Kicad applications, a page layout description is needed * In Kicad applications, a page layout description is needed
* So if the list is empty, a default description is loaded, * So if the list is empty, a default description is loaded,

View File

@ -63,12 +63,15 @@ public:
*/ */
class PLEDITOR_PREVIEW_FRAME : public wxPreviewFrame class PLEDITOR_PREVIEW_FRAME : public wxPreviewFrame
{ {
PL_EDITOR_FRAME* m_parent;
public: public:
PLEDITOR_PREVIEW_FRAME( wxPrintPreview* aPreview, PL_EDITOR_FRAME* aParent, PLEDITOR_PREVIEW_FRAME( wxPrintPreview* aPreview, PL_EDITOR_FRAME* aParent,
const wxString& aTitle, const wxPoint& aPos = wxDefaultPosition, const wxString& aTitle, const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize ) : const wxSize& aSize = wxDefaultSize ) :
wxPreviewFrame( aPreview, aParent, aTitle, aPos, aSize ) wxPreviewFrame( aPreview, aParent, aTitle, aPos, aSize )
{ {
m_parent = aParent;
} }
bool Show( bool show ) // overload bool Show( bool show ) // overload
@ -79,10 +82,20 @@ public:
// If showing, use previous position and size. // If showing, use previous position and size.
if( show ) if( show )
{ {
ret = wxPreviewFrame::Show( show ); bool centre = false;
if( s_size.x == 0 || s_size.y == 0 )
{
s_size = (m_parent->GetSize() * 3) / 4;
s_pos = wxDefaultPosition;
centre = true;
}
if( s_size.x != 0 && s_size.y != 0 )
SetSize( s_pos.x, s_pos.y, s_size.x, s_size.y, 0 ); SetSize( s_pos.x, s_pos.y, s_size.x, s_size.y, 0 );
if( centre )
Center();
ret = wxPreviewFrame::Show( show );
} }
else else
{ {
@ -191,7 +204,6 @@ void PLEDITOR_PRINTOUT::DrawPage( int aPageNum )
int InvokeDialogPrint( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData, int InvokeDialogPrint( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData,
wxPageSetupDialogData* aPageSetupData ) wxPageSetupDialogData* aPageSetupData )
{ {
PLEDITOR_PRINTOUT dlg( aCaller, _("Print Page Layout") );
int pageCount = 2; int pageCount = 2;
wxPrintDialogData printDialogData( *aPrintData ); wxPrintDialogData printDialogData( *aPrintData );
@ -224,12 +236,11 @@ int InvokeDialogPrintPreview( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData
new PLEDITOR_PRINTOUT( aCaller, title ), new PLEDITOR_PRINTOUT( aCaller, title ),
aPrintData ); aPrintData );
preview->SetZoom( 100 ); preview->SetZoom( 70 );
PLEDITOR_PREVIEW_FRAME* frame = new PLEDITOR_PREVIEW_FRAME( preview, aCaller, title ); PLEDITOR_PREVIEW_FRAME* frame = new PLEDITOR_PREVIEW_FRAME( preview, aCaller, title );
frame->Initialize(); frame->Initialize();
frame->Center();
frame->Show( true ); frame->Show( true );
return 1; return 1;

View File

@ -14,108 +14,25 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerpanel; wxBoxSizer* bSizerpanel;
bSizerpanel = new wxBoxSizer( wxVERTICAL ); bSizerpanel = new wxBoxSizer( wxVERTICAL );
m_scrolledLeftWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_scrolledLeftWindow->SetScrollRate( 5, 5 ); m_swItemProperties = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_swItemProperties->SetScrollRate( 5, 5 );
wxBoxSizer* bSizerMain; wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL ); bSizerMain = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerGeneralOpts;
bSizerGeneralOpts = new wxBoxSizer( wxVERTICAL );
m_staticTextDefVal = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Default Values:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefVal->Wrap( -1 );
bSizerGeneralOpts->Add( m_staticTextDefVal, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerDefTextSize;
bSizerDefTextSize = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerDefTsizeX;
bSizerDefTsizeX = new wxBoxSizer( wxVERTICAL );
m_staticTextDefTsX = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text Size X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefTsX->Wrap( -1 );
bSizerDefTsizeX->Add( m_staticTextDefTsX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultTextSizeX = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTsizeX->Add( m_textCtrlDefaultTextSizeX, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefTextSize->Add( bSizerDefTsizeX, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerDefTsizeY;
bSizerDefTsizeY = new wxBoxSizer( wxVERTICAL );
m_staticTextDefTsY = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text Size Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefTsY->Wrap( -1 );
bSizerDefTsizeY->Add( m_staticTextDefTsY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultTextSizeY = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTsizeY->Add( m_textCtrlDefaultTextSizeY, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefTextSize->Add( bSizerDefTsizeY, 1, wxEXPAND, 5 );
bSizerGeneralOpts->Add( bSizerDefTextSize, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerDefLineWidth;
bSizerDefLineWidth = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer25;
bSizer25 = new wxBoxSizer( wxVERTICAL );
m_staticTextDefLineW = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Line Thickness (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefLineW->Wrap( -1 );
bSizer25->Add( m_staticTextDefLineW, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultLineWidth = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer25->Add( m_textCtrlDefaultLineWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefLineWidth->Add( bSizer25, 1, 0, 5 );
wxBoxSizer* bSizerDefTextThickness;
bSizerDefTextThickness = new wxBoxSizer( wxVERTICAL );
m_staticText22 = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText22->Wrap( -1 );
bSizerDefTextThickness->Add( m_staticText22, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultTextThickness = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTextThickness->Add( m_textCtrlDefaultTextThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefLineWidth->Add( bSizerDefTextThickness, 1, 0, 5 );
bSizerGeneralOpts->Add( bSizerDefLineWidth, 0, wxEXPAND, 5 );
bSizerMain->Add( bSizerGeneralOpts, 0, 0, 5 );
m_staticline7 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline7, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_buttonOK = new wxButton( m_scrolledLeftWindow, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault();
bSizerMain->Add( m_buttonOK, 0, wxALIGN_BOTTOM|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
m_staticline8 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline8, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerButt; wxBoxSizer* bSizerButt;
bSizerButt = new wxBoxSizer( wxHORIZONTAL ); bSizerButt = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerType; wxBoxSizer* bSizerType;
bSizerType = new wxBoxSizer( wxVERTICAL ); bSizerType = new wxBoxSizer( wxVERTICAL );
m_staticTextType = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextType = new wxStaticText( m_swItemProperties, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextType->Wrap( -1 ); m_staticTextType->Wrap( -1 );
m_staticTextType->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); m_staticTextType->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bSizerType->Add( m_staticTextType, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); bSizerType->Add( m_staticTextType, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_textCtrlType = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); m_textCtrlType = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
bSizerType->Add( m_textCtrlType, 0, wxRIGHT|wxLEFT, 5 ); bSizerType->Add( m_textCtrlType, 0, wxRIGHT|wxLEFT, 5 );
@ -124,7 +41,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerPageOpt; wxBoxSizer* bSizerPageOpt;
bSizerPageOpt = new wxBoxSizer( wxVERTICAL ); bSizerPageOpt = new wxBoxSizer( wxVERTICAL );
m_staticTextPageOpt = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Page 1 option"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPageOpt = new wxStaticText( m_swItemProperties, wxID_ANY, _("Page 1 option"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPageOpt->Wrap( -1 ); m_staticTextPageOpt->Wrap( -1 );
m_staticTextPageOpt->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); m_staticTextPageOpt->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
@ -132,7 +49,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxString m_choicePageOptChoices[] = { _("None"), _("Page 1 only"), _("Not on page 1") }; wxString m_choicePageOptChoices[] = { _("None"), _("Page 1 only"), _("Not on page 1") };
int m_choicePageOptNChoices = sizeof( m_choicePageOptChoices ) / sizeof( wxString ); int m_choicePageOptNChoices = sizeof( m_choicePageOptChoices ) / sizeof( wxString );
m_choicePageOpt = new wxChoice( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePageOptNChoices, m_choicePageOptChoices, 0 ); m_choicePageOpt = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePageOptNChoices, m_choicePageOptChoices, 0 );
m_choicePageOpt->SetSelection( 0 ); m_choicePageOpt->SetSelection( 0 );
bSizerPageOpt->Add( m_choicePageOpt, 0, wxRIGHT|wxLEFT, 5 ); bSizerPageOpt->Add( m_choicePageOpt, 0, wxRIGHT|wxLEFT, 5 );
@ -142,16 +59,16 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
bSizerMain->Add( bSizerButt, 0, 0, 5 ); bSizerMain->Add( bSizerButt, 0, 0, 5 );
m_staticline5 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline5 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_SizerTextOptions = new wxBoxSizer( wxVERTICAL ); m_SizerTextOptions = new wxBoxSizer( wxVERTICAL );
m_staticTextText = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextText = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextText->Wrap( -1 ); m_staticTextText->Wrap( -1 );
m_SizerTextOptions->Add( m_staticTextText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_SizerTextOptions->Add( m_staticTextText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlText = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlText = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SizerTextOptions->Add( m_textCtrlText, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_SizerTextOptions->Add( m_textCtrlText, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizerFontOpt; wxBoxSizer* bSizerFontOpt;
@ -160,17 +77,17 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerJustify; wxBoxSizer* bSizerJustify;
bSizerJustify = new wxBoxSizer( wxHORIZONTAL ); bSizerJustify = new wxBoxSizer( wxHORIZONTAL );
m_staticTextHjust = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("H justification"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextHjust = new wxStaticText( m_swItemProperties, wxID_ANY, _("H justification"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextHjust->Wrap( -1 ); m_staticTextHjust->Wrap( -1 );
bSizerJustify->Add( m_staticTextHjust, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); bSizerJustify->Add( m_staticTextHjust, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
wxString m_choiceHjustifyChoices[] = { _("Left"), _("Center"), _("Right") }; wxString m_choiceHjustifyChoices[] = { _("Left"), _("Center"), _("Right") };
int m_choiceHjustifyNChoices = sizeof( m_choiceHjustifyChoices ) / sizeof( wxString ); int m_choiceHjustifyNChoices = sizeof( m_choiceHjustifyChoices ) / sizeof( wxString );
m_choiceHjustify = new wxChoice( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHjustifyNChoices, m_choiceHjustifyChoices, 0 ); m_choiceHjustify = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHjustifyNChoices, m_choiceHjustifyChoices, 0 );
m_choiceHjustify->SetSelection( 0 ); m_choiceHjustify->SetSelection( 0 );
bSizerJustify->Add( m_choiceHjustify, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizerJustify->Add( m_choiceHjustify, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
m_checkBoxBold = new wxCheckBox( m_scrolledLeftWindow, wxID_ANY, _("Bold"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkBoxBold = new wxCheckBox( m_swItemProperties, wxID_ANY, _("Bold"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerJustify->Add( m_checkBoxBold, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bSizerJustify->Add( m_checkBoxBold, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
@ -179,17 +96,17 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerBoldItalic; wxBoxSizer* bSizerBoldItalic;
bSizerBoldItalic = new wxBoxSizer( wxHORIZONTAL ); bSizerBoldItalic = new wxBoxSizer( wxHORIZONTAL );
m_staticTextVjust = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("V justification"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextVjust = new wxStaticText( m_swItemProperties, wxID_ANY, _("V justification"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextVjust->Wrap( -1 ); m_staticTextVjust->Wrap( -1 );
bSizerBoldItalic->Add( m_staticTextVjust, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); bSizerBoldItalic->Add( m_staticTextVjust, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
wxString m_choiceVjustifyChoices[] = { _("Top"), _("Center"), _("Bottom") }; wxString m_choiceVjustifyChoices[] = { _("Top"), _("Center"), _("Bottom") };
int m_choiceVjustifyNChoices = sizeof( m_choiceVjustifyChoices ) / sizeof( wxString ); int m_choiceVjustifyNChoices = sizeof( m_choiceVjustifyChoices ) / sizeof( wxString );
m_choiceVjustify = new wxChoice( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVjustifyNChoices, m_choiceVjustifyChoices, 0 ); m_choiceVjustify = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVjustifyNChoices, m_choiceVjustifyChoices, 0 );
m_choiceVjustify->SetSelection( 1 ); m_choiceVjustify->SetSelection( 1 );
bSizerBoldItalic->Add( m_choiceVjustify, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizerBoldItalic->Add( m_choiceVjustify, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
m_checkBoxItalic = new wxCheckBox( m_scrolledLeftWindow, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, 0 ); m_checkBoxItalic = new wxCheckBox( m_swItemProperties, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerBoldItalic->Add( m_checkBoxItalic, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bSizerBoldItalic->Add( m_checkBoxItalic, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
@ -204,11 +121,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerTsizeX; wxBoxSizer* bSizerTsizeX;
bSizerTsizeX = new wxBoxSizer( wxVERTICAL ); bSizerTsizeX = new wxBoxSizer( wxVERTICAL );
m_staticTexTsizeX = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text Height (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTexTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Height (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTexTsizeX->Wrap( -1 ); m_staticTexTsizeX->Wrap( -1 );
bSizerTsizeX->Add( m_staticTexTsizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerTsizeX->Add( m_staticTexTsizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlTextSizeX = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlTextSizeX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerTsizeX->Add( m_textCtrlTextSizeX, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerTsizeX->Add( m_textCtrlTextSizeX, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -217,11 +134,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerTsizeY; wxBoxSizer* bSizerTsizeY;
bSizerTsizeY = new wxBoxSizer( wxVERTICAL ); bSizerTsizeY = new wxBoxSizer( wxVERTICAL );
m_staticTextTsizeY = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text Width (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Width (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTsizeY->Wrap( -1 ); m_staticTextTsizeY->Wrap( -1 );
bSizerTsizeY->Add( m_staticTextTsizeY, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerTsizeY->Add( m_staticTextTsizeY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlTextSizeY = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlTextSizeY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerTsizeY->Add( m_textCtrlTextSizeY, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerTsizeY->Add( m_textCtrlTextSizeY, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -230,7 +147,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
m_SizerTextOptions->Add( bSizerTextSize, 0, 0, 5 ); m_SizerTextOptions->Add( bSizerTextSize, 0, 0, 5 );
m_staticTextConstraints = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Constraints:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextConstraints = new wxStaticText( m_swItemProperties, wxID_ANY, _("Constraints:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextConstraints->Wrap( -1 ); m_staticTextConstraints->Wrap( -1 );
m_SizerTextOptions->Add( m_staticTextConstraints, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_SizerTextOptions->Add( m_staticTextConstraints, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
@ -240,11 +157,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer42; wxBoxSizer* bSizer42;
bSizer42 = new wxBoxSizer( wxVERTICAL ); bSizer42 = new wxBoxSizer( wxVERTICAL );
m_staticTextConstraintX = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Max Size X (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextConstraintX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max Size X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextConstraintX->Wrap( -1 ); m_staticTextConstraintX->Wrap( -1 );
bSizer42->Add( m_staticTextConstraintX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer42->Add( m_staticTextConstraintX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlConstraintX = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlConstraintX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer42->Add( m_textCtrlConstraintX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer42->Add( m_textCtrlConstraintX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@ -253,11 +170,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer52; wxBoxSizer* bSizer52;
bSizer52 = new wxBoxSizer( wxVERTICAL ); bSizer52 = new wxBoxSizer( wxVERTICAL );
m_staticTextConstraintY = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Max Size Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextConstraintY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max Size Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextConstraintY->Wrap( -1 ); m_staticTextConstraintY->Wrap( -1 );
bSizer52->Add( m_staticTextConstraintY, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer52->Add( m_staticTextConstraintY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlConstraintY = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlConstraintY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer52->Add( m_textCtrlConstraintY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer52->Add( m_textCtrlConstraintY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@ -266,20 +183,27 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
m_SizerTextOptions->Add( bSizerConstraints, 0, 0, 5 ); m_SizerTextOptions->Add( bSizerConstraints, 0, 0, 5 );
m_staticline6 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline6 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_SizerTextOptions->Add( m_staticline6, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_SizerTextOptions->Add( m_staticline6, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( m_SizerTextOptions, 0, wxEXPAND, 5 ); bSizerMain->Add( m_SizerTextOptions, 0, wxEXPAND, 5 );
m_staticTextComment = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Comment"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonOK = new wxButton( m_swItemProperties, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault();
bSizerMain->Add( m_buttonOK, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
m_staticline8 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline8, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextComment = new wxStaticText( m_swItemProperties, wxID_ANY, _("Comment"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment->Wrap( -1 ); m_staticTextComment->Wrap( -1 );
bSizerMain->Add( m_staticTextComment, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_staticTextComment, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlComment = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlComment = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerMain->Add( m_textCtrlComment, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerMain->Add( m_textCtrlComment, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticline2 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline2 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerPos; wxBoxSizer* bSizerPos;
@ -291,11 +215,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer4; wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxVERTICAL ); bSizer4 = new wxBoxSizer( wxVERTICAL );
m_staticTextPosX = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Pos X (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPosX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Pos X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPosX->Wrap( -1 ); m_staticTextPosX->Wrap( -1 );
bSizer4->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer4->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlPosX = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlPosX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer4->Add( m_textCtrlPosX, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer4->Add( m_textCtrlPosX, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@ -304,11 +228,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer5; wxBoxSizer* bSizer5;
bSizer5 = new wxBoxSizer( wxVERTICAL ); bSizer5 = new wxBoxSizer( wxVERTICAL );
m_staticTextPosY = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Pos Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPosY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Pos Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPosY->Wrap( -1 ); m_staticTextPosY->Wrap( -1 );
bSizer5->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 ); bSizer5->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 );
m_textCtrlPosY = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlPosY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer5->Add( m_textCtrlPosY, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bSizer5->Add( m_textCtrlPosY, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
@ -320,11 +244,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer6; wxBoxSizer* bSizer6;
bSizer6 = new wxBoxSizer( wxVERTICAL ); bSizer6 = new wxBoxSizer( wxVERTICAL );
m_staticTextOrgPos = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextOrgPos = new wxStaticText( m_swItemProperties, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOrgPos->Wrap( -1 ); m_staticTextOrgPos->Wrap( -1 );
bSizer6->Add( m_staticTextOrgPos, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer6->Add( m_staticTextOrgPos, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_comboBoxCornerPos = new wxComboBox( m_scrolledLeftWindow, wxID_ANY, _("Lower Right"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_comboBoxCornerPos = new wxComboBox( m_swItemProperties, wxID_ANY, _("Lower Right"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
m_comboBoxCornerPos->Append( _("Upper Right") ); m_comboBoxCornerPos->Append( _("Upper Right") );
m_comboBoxCornerPos->Append( _("Upper Left") ); m_comboBoxCornerPos->Append( _("Upper Left") );
m_comboBoxCornerPos->Append( _("Lower Right") ); m_comboBoxCornerPos->Append( _("Lower Right") );
@ -346,11 +270,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer41; wxBoxSizer* bSizer41;
bSizer41 = new wxBoxSizer( wxVERTICAL ); bSizer41 = new wxBoxSizer( wxVERTICAL );
m_staticTextEndX = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("End X (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextEndX = new wxStaticText( m_swItemProperties, wxID_ANY, _("End X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextEndX->Wrap( -1 ); m_staticTextEndX->Wrap( -1 );
bSizer41->Add( m_staticTextEndX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer41->Add( m_staticTextEndX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlEndX = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlEndX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer41->Add( m_textCtrlEndX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizer41->Add( m_textCtrlEndX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -359,11 +283,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer51; wxBoxSizer* bSizer51;
bSizer51 = new wxBoxSizer( wxVERTICAL ); bSizer51 = new wxBoxSizer( wxVERTICAL );
m_staticTextEndY = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("End Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextEndY = new wxStaticText( m_swItemProperties, wxID_ANY, _("End Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextEndY->Wrap( -1 ); m_staticTextEndY->Wrap( -1 );
bSizer51->Add( m_staticTextEndY, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer51->Add( m_staticTextEndY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlEndY = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlEndY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer51->Add( m_textCtrlEndY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizer51->Add( m_textCtrlEndY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -375,11 +299,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer61; wxBoxSizer* bSizer61;
bSizer61 = new wxBoxSizer( wxVERTICAL ); bSizer61 = new wxBoxSizer( wxVERTICAL );
m_staticTextOrgEnd = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextOrgEnd = new wxStaticText( m_swItemProperties, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOrgEnd->Wrap( -1 ); m_staticTextOrgEnd->Wrap( -1 );
bSizer61->Add( m_staticTextOrgEnd, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer61->Add( m_staticTextOrgEnd, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_comboBoxCornerEnd = new wxComboBox( m_scrolledLeftWindow, wxID_ANY, _("Lower Right"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_comboBoxCornerEnd = new wxComboBox( m_swItemProperties, wxID_ANY, _("Lower Right"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
m_comboBoxCornerEnd->Append( _("Upper Right") ); m_comboBoxCornerEnd->Append( _("Upper Right") );
m_comboBoxCornerEnd->Append( _("Upper Left") ); m_comboBoxCornerEnd->Append( _("Upper Left") );
m_comboBoxCornerEnd->Append( _("Lower Right") ); m_comboBoxCornerEnd->Append( _("Lower Right") );
@ -399,17 +323,17 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizerthickness; wxBoxSizer* bSizerthickness;
bSizerthickness = new wxBoxSizer( wxVERTICAL ); bSizerthickness = new wxBoxSizer( wxVERTICAL );
m_staticTextThickness = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextThickness->Wrap( -1 ); m_staticTextThickness->Wrap( -1 );
bSizerthickness->Add( m_staticTextThickness, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bSizerthickness->Add( m_staticTextThickness, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_textCtrlThickness = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlThickness = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerthickness->Add( m_textCtrlThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerthickness->Add( m_textCtrlThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerLineThickness->Add( bSizerthickness, 0, wxEXPAND, 5 ); bSizerLineThickness->Add( bSizerthickness, 0, wxEXPAND, 5 );
m_staticTextInfoThickness = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Set to 0 to use default"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Set to 0 to use default"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoThickness->Wrap( -1 ); m_staticTextInfoThickness->Wrap( -1 );
bSizerLineThickness->Add( m_staticTextInfoThickness, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); bSizerLineThickness->Add( m_staticTextInfoThickness, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
@ -418,17 +342,17 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
m_SizerRotation = new wxBoxSizer( wxVERTICAL ); m_SizerRotation = new wxBoxSizer( wxVERTICAL );
m_staticline1 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline1 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_SizerRotation->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_SizerRotation->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerRotation; wxBoxSizer* bSizerRotation;
bSizerRotation = new wxBoxSizer( wxHORIZONTAL ); bSizerRotation = new wxBoxSizer( wxHORIZONTAL );
m_staticTextRot = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Rotation"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRot = new wxStaticText( m_swItemProperties, wxID_ANY, _("Rotation"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRot->Wrap( -1 ); m_staticTextRot->Wrap( -1 );
bSizerRotation->Add( m_staticTextRot, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); bSizerRotation->Add( m_staticTextRot, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_textCtrlRotation = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlRotation = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerRotation->Add( m_textCtrlRotation, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); bSizerRotation->Add( m_textCtrlRotation, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
@ -437,10 +361,10 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
bSizerMain->Add( m_SizerRotation, 0, wxEXPAND, 5 ); bSizerMain->Add( m_SizerRotation, 0, wxEXPAND, 5 );
m_staticline4 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline4 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_staticline4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticTextRepeatPrms = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Repeat parameters:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRepeatPrms = new wxStaticText( m_swItemProperties, wxID_ANY, _("Repeat parameters:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRepeatPrms->Wrap( -1 ); m_staticTextRepeatPrms->Wrap( -1 );
bSizerMain->Add( m_staticTextRepeatPrms, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_staticTextRepeatPrms, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
@ -450,11 +374,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer611; wxBoxSizer* bSizer611;
bSizer611 = new wxBoxSizer( wxVERTICAL ); bSizer611 = new wxBoxSizer( wxVERTICAL );
m_staticTextRepeatCnt = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Repeat count"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRepeatCnt = new wxStaticText( m_swItemProperties, wxID_ANY, _("Repeat count"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRepeatCnt->Wrap( -1 ); m_staticTextRepeatCnt->Wrap( -1 );
bSizer611->Add( m_staticTextRepeatCnt, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer611->Add( m_staticTextRepeatCnt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlRepeatCount = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlRepeatCount = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer611->Add( m_textCtrlRepeatCount, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizer611->Add( m_textCtrlRepeatCount, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -462,11 +386,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
m_SizerTextIncrementLabel = new wxBoxSizer( wxVERTICAL ); m_SizerTextIncrementLabel = new wxBoxSizer( wxVERTICAL );
m_staticTextInclabel = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Text Increment"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInclabel = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Increment"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInclabel->Wrap( -1 ); m_staticTextInclabel->Wrap( -1 );
m_SizerTextIncrementLabel->Add( m_staticTextInclabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_SizerTextIncrementLabel->Add( m_staticTextInclabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlTextIncrement = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlTextIncrement = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SizerTextIncrementLabel->Add( m_textCtrlTextIncrement, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_SizerTextIncrementLabel->Add( m_textCtrlTextIncrement, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -481,11 +405,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer411; wxBoxSizer* bSizer411;
bSizer411 = new wxBoxSizer( wxVERTICAL ); bSizer411 = new wxBoxSizer( wxVERTICAL );
m_staticTextStepX = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Step X (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextStepX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Step X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextStepX->Wrap( -1 ); m_staticTextStepX->Wrap( -1 );
bSizer411->Add( m_staticTextStepX, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer411->Add( m_staticTextStepX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlStepX = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlStepX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer411->Add( m_textCtrlStepX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer411->Add( m_textCtrlStepX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@ -494,11 +418,11 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
wxBoxSizer* bSizer511; wxBoxSizer* bSizer511;
bSizer511 = new wxBoxSizer( wxVERTICAL ); bSizer511 = new wxBoxSizer( wxVERTICAL );
m_staticTextStepY = new wxStaticText( m_scrolledLeftWindow, wxID_ANY, _("Step Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextStepY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Step Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextStepY->Wrap( -1 ); m_staticTextStepY->Wrap( -1 );
bSizer511->Add( m_staticTextStepY, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer511->Add( m_staticTextStepY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlStepY = new wxTextCtrl( m_scrolledLeftWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlStepY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer511->Add( m_textCtrlStepY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizer511->Add( m_textCtrlStepY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -507,14 +431,181 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
bSizerMain->Add( bSizerPosY1, 0, 0, 5 ); bSizerMain->Add( bSizerPosY1, 0, 0, 5 );
m_staticline3 = new wxStaticLine( m_scrolledLeftWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_swItemProperties->SetSizer( bSizerMain );
m_swItemProperties->Layout();
bSizerMain->Fit( m_swItemProperties );
m_notebook->AddPage( m_swItemProperties, _("Item Properties"), true );
m_swGeneralOpts = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_swGeneralOpts->SetScrollRate( 5, 5 );
wxBoxSizer* bSizerGeneralOpts;
bSizerGeneralOpts = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerGeneralOpts1;
bSizerGeneralOpts1 = new wxBoxSizer( wxVERTICAL );
m_staticTextDefVal = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Default Values:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefVal->Wrap( -1 );
bSizerGeneralOpts1->Add( m_staticTextDefVal, 0, wxALL, 5 );
wxBoxSizer* bSizerDefTextSize;
bSizerDefTextSize = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerDefTsizeX;
bSizerDefTsizeX = new wxBoxSizer( wxVERTICAL );
m_staticTextDefTsX = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Text Size X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefTsX->Wrap( -1 );
bSizerDefTsizeX->Add( m_staticTextDefTsX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultTextSizeX = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTsizeX->Add( m_textCtrlDefaultTextSizeX, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_scrolledLeftWindow->SetSizer( bSizerMain ); bSizerDefTextSize->Add( bSizerDefTsizeX, 1, wxEXPAND, 5 );
m_scrolledLeftWindow->Layout();
bSizerMain->Fit( m_scrolledLeftWindow ); wxBoxSizer* bSizerDefTsizeY;
bSizerpanel->Add( m_scrolledLeftWindow, 1, wxEXPAND | wxALL, 5 ); bSizerDefTsizeY = new wxBoxSizer( wxVERTICAL );
m_staticTextDefTsY = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Text Size Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefTsY->Wrap( -1 );
bSizerDefTsizeY->Add( m_staticTextDefTsY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultTextSizeY = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTsizeY->Add( m_textCtrlDefaultTextSizeY, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefTextSize->Add( bSizerDefTsizeY, 1, wxEXPAND, 5 );
bSizerGeneralOpts1->Add( bSizerDefTextSize, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerDefLineWidth;
bSizerDefLineWidth = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer25;
bSizer25 = new wxBoxSizer( wxVERTICAL );
m_staticTextDefLineW = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Line Thickness (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefLineW->Wrap( -1 );
bSizer25->Add( m_staticTextDefLineW, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultLineWidth = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer25->Add( m_textCtrlDefaultLineWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefLineWidth->Add( bSizer25, 1, 0, 5 );
wxBoxSizer* bSizerDefTextThickness;
bSizerDefTextThickness = new wxBoxSizer( wxVERTICAL );
m_staticText22 = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Text Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText22->Wrap( -1 );
bSizerDefTextThickness->Add( m_staticText22, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultTextThickness = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTextThickness->Add( m_textCtrlDefaultTextThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefLineWidth->Add( bSizerDefTextThickness, 1, 0, 5 );
bSizerGeneralOpts1->Add( bSizerDefLineWidth, 0, wxEXPAND, 5 );
bSizerGeneralOpts->Add( bSizerGeneralOpts1, 0, 0, 5 );
m_staticline9 = new wxStaticLine( m_swGeneralOpts, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerGeneralOpts->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* bSizerGeneraMargins;
bSizerGeneraMargins = new wxBoxSizer( wxVERTICAL );
m_staticTextMargins = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Page Margins"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextMargins->Wrap( -1 );
bSizerGeneraMargins->Add( m_staticTextMargins, 0, wxALL, 5 );
wxBoxSizer* bSizerDefLRMargins;
bSizerDefLRMargins = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerDefLeftMargin;
bSizerDefLeftMargin = new wxBoxSizer( wxVERTICAL );
m_staticTextLeftMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Left Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextLeftMargin->Wrap( -1 );
bSizerDefLeftMargin->Add( m_staticTextLeftMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlLeftMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefLeftMargin->Add( m_textCtrlLeftMargin, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefLRMargins->Add( bSizerDefLeftMargin, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerDefTsizeY1;
bSizerDefTsizeY1 = new wxBoxSizer( wxVERTICAL );
m_staticTextDefRightMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Right Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDefRightMargin->Wrap( -1 );
bSizerDefTsizeY1->Add( m_staticTextDefRightMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlRightMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefTsizeY1->Add( m_textCtrlRightMargin, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefLRMargins->Add( bSizerDefTsizeY1, 1, wxEXPAND, 5 );
bSizerGeneraMargins->Add( bSizerDefLRMargins, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerDefTBMargins;
bSizerDefTBMargins = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerTopMargin;
bSizerTopMargin = new wxBoxSizer( wxVERTICAL );
m_staticTextTopMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Top Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTopMargin->Wrap( -1 );
bSizerTopMargin->Add( m_staticTextTopMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlTopMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerTopMargin->Add( m_textCtrlTopMargin, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefTBMargins->Add( bSizerTopMargin, 1, 0, 5 );
wxBoxSizer* bSizerDefBottomMargin;
bSizerDefBottomMargin = new wxBoxSizer( wxVERTICAL );
m_staticTextBottomMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Bottom Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBottomMargin->Wrap( -1 );
bSizerDefBottomMargin->Add( m_staticTextBottomMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_textCtrlDefaultBottomMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDefBottomMargin->Add( m_textCtrlDefaultBottomMargin, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerDefTBMargins->Add( bSizerDefBottomMargin, 1, 0, 5 );
bSizerGeneraMargins->Add( bSizerDefTBMargins, 0, wxEXPAND, 5 );
bSizerGeneralOpts->Add( bSizerGeneraMargins, 0, 0, 5 );
m_staticline10 = new wxStaticLine( m_swGeneralOpts, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerGeneralOpts->Add( m_staticline10, 0, wxEXPAND | wxALL, 5 );
m_buttonGeneralOptsOK = new wxButton( m_swGeneralOpts, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonGeneralOptsOK->SetDefault();
bSizerGeneralOpts->Add( m_buttonGeneralOptsOK, 0, wxALL|wxEXPAND, 5 );
m_swGeneralOpts->SetSizer( bSizerGeneralOpts );
m_swGeneralOpts->Layout();
bSizerGeneralOpts->Fit( m_swGeneralOpts );
m_notebook->AddPage( m_swGeneralOpts, _("General Options"), false );
bSizerpanel->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
this->SetSizer( bSizerpanel ); this->SetSizer( bSizerpanel );
@ -522,11 +613,13 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
// Connect Events // Connect Events
m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this ); m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
m_buttonGeneralOptsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
} }
PANEL_PROPERTIES_BASE::~PANEL_PROPERTIES_BASE() PANEL_PROPERTIES_BASE::~PANEL_PROPERTIES_BASE()
{ {
// Disconnect Events // Disconnect Events
m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
m_buttonGeneralOptsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
} }

File diff suppressed because it is too large Load Diff

View File

@ -19,12 +19,16 @@
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/statline.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/combobox.h> #include <wx/combobox.h>
#include <wx/scrolwin.h> #include <wx/scrolwin.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/notebook.h>
#include <wx/panel.h> #include <wx/panel.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@ -37,19 +41,8 @@ class PANEL_PROPERTIES_BASE : public wxPanel
private: private:
protected: protected:
wxScrolledWindow* m_scrolledLeftWindow; wxNotebook* m_notebook;
wxStaticText* m_staticTextDefVal; wxScrolledWindow* m_swItemProperties;
wxStaticText* m_staticTextDefTsX;
wxTextCtrl* m_textCtrlDefaultTextSizeX;
wxStaticText* m_staticTextDefTsY;
wxTextCtrl* m_textCtrlDefaultTextSizeY;
wxStaticText* m_staticTextDefLineW;
wxTextCtrl* m_textCtrlDefaultLineWidth;
wxStaticText* m_staticText22;
wxTextCtrl* m_textCtrlDefaultTextThickness;
wxStaticLine* m_staticline7;
wxButton* m_buttonOK;
wxStaticLine* m_staticline8;
wxStaticText* m_staticTextType; wxStaticText* m_staticTextType;
wxTextCtrl* m_textCtrlType; wxTextCtrl* m_textCtrlType;
wxStaticText* m_staticTextPageOpt; wxStaticText* m_staticTextPageOpt;
@ -74,6 +67,8 @@ class PANEL_PROPERTIES_BASE : public wxPanel
wxStaticText* m_staticTextConstraintY; wxStaticText* m_staticTextConstraintY;
wxTextCtrl* m_textCtrlConstraintY; wxTextCtrl* m_textCtrlConstraintY;
wxStaticLine* m_staticline6; wxStaticLine* m_staticline6;
wxButton* m_buttonOK;
wxStaticLine* m_staticline8;
wxStaticText* m_staticTextComment; wxStaticText* m_staticTextComment;
wxTextCtrl* m_textCtrlComment; wxTextCtrl* m_textCtrlComment;
wxStaticLine* m_staticline2; wxStaticLine* m_staticline2;
@ -108,7 +103,28 @@ class PANEL_PROPERTIES_BASE : public wxPanel
wxTextCtrl* m_textCtrlStepX; wxTextCtrl* m_textCtrlStepX;
wxStaticText* m_staticTextStepY; wxStaticText* m_staticTextStepY;
wxTextCtrl* m_textCtrlStepY; wxTextCtrl* m_textCtrlStepY;
wxStaticLine* m_staticline3; wxScrolledWindow* m_swGeneralOpts;
wxStaticText* m_staticTextDefVal;
wxStaticText* m_staticTextDefTsX;
wxTextCtrl* m_textCtrlDefaultTextSizeX;
wxStaticText* m_staticTextDefTsY;
wxTextCtrl* m_textCtrlDefaultTextSizeY;
wxStaticText* m_staticTextDefLineW;
wxTextCtrl* m_textCtrlDefaultLineWidth;
wxStaticText* m_staticText22;
wxTextCtrl* m_textCtrlDefaultTextThickness;
wxStaticLine* m_staticline9;
wxStaticText* m_staticTextMargins;
wxStaticText* m_staticTextLeftMargin;
wxTextCtrl* m_textCtrlLeftMargin;
wxStaticText* m_staticTextDefRightMargin;
wxTextCtrl* m_textCtrlRightMargin;
wxStaticText* m_staticTextTopMargin;
wxTextCtrl* m_textCtrlTopMargin;
wxStaticText* m_staticTextBottomMargin;
wxTextCtrl* m_textCtrlDefaultBottomMargin;
wxStaticLine* m_staticline10;
wxButton* m_buttonGeneralOptsOK;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnAcceptPrms( wxCommandEvent& event ) { event.Skip(); } virtual void OnAcceptPrms( wxCommandEvent& event ) { event.Skip(); }
@ -116,7 +132,7 @@ class PANEL_PROPERTIES_BASE : public wxPanel
public: public:
PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 315,756 ), long style = wxTAB_TRAVERSAL ); PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 315,739 ), long style = wxTAB_TRAVERSAL );
~PANEL_PROPERTIES_BASE(); ~PANEL_PROPERTIES_BASE();
}; };

View File

@ -49,12 +49,10 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
// menu Preferences // menu Preferences
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END,
PL_EDITOR_FRAME::Process_Config ) PL_EDITOR_FRAME::Process_Config )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EDA_DRAW_FRAME::SetLanguage ) EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EDA_DRAW_FRAME::SetLanguage )
// menu Postprocess
EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR,
EDA_BASE_FRAME::OnSelectPreferredEditor ) EDA_BASE_FRAME::OnSelectPreferredEditor )
EVT_MENU( wxID_PREFERENCES, PL_EDITOR_FRAME::Process_Config )
// Menu Help // Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )

View File

@ -35,6 +35,7 @@
#include <worksheet_shape_builder.h> #include <worksheet_shape_builder.h>
#include <pl_editor_frame.h> #include <pl_editor_frame.h>
#include <properties_frame.h>
#include <pl_editor_id.h> #include <pl_editor_id.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
@ -59,8 +60,8 @@ void PL_EDITOR_FRAME::OnFileHistory( wxCommandEvent& event )
msg.Printf( _("File <%s> loaded"), GetChars( filename ) ); msg.Printf( _("File <%s> loaded"), GetChars( filename ) );
SetStatusText( msg ); SetStatusText( msg );
} }
RebuildDesignTree();
m_canvas->Refresh(); OnNewPageLayout();
} }
} }
@ -95,18 +96,14 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
{ {
case ID_LOAD_DEFAULT_PAGE_LAYOUT: case ID_LOAD_DEFAULT_PAGE_LAYOUT:
pglayout.SetPageLayout(); pglayout.SetPageLayout();
RebuildDesignTree(); OnNewPageLayout();
m_canvas->Refresh();
GetScreen()->ClrModify();
break; break;
case wxID_NEW: case wxID_NEW:
pglayout.AllowVoidList( true ); pglayout.AllowVoidList( true );
SetCurrFileName( wxEmptyString ); SetCurrFileName( wxEmptyString );
pglayout.ClearList(); pglayout.ClearList();
RebuildDesignTree(); OnNewPageLayout();
m_canvas->Refresh();
GetScreen()->ClrModify();
break; break;
case ID_OPEN_POLYGON_DESCR_FILE: case ID_OPEN_POLYGON_DESCR_FILE:
@ -153,8 +150,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
} }
else else
{ {
RebuildDesignTree(); OnNewPageLayout();
m_canvas->Refresh();
msg.Printf( _("File <%s> loaded"), GetChars( filename ) ); msg.Printf( _("File <%s> loaded"), GetChars( filename ) );
SetStatusText( msg ); SetStatusText( msg );
} }

View File

@ -1,6 +1,29 @@
/** /**
* @file gerbview/hotkeys.cpp * @file gerbview/hotkeys.cpp
*/ */
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h> #include <fctsys.h>
#include <common.h> #include <common.h>
@ -16,15 +39,13 @@
* add a new id in the enum hotkey_id_commnand like MY_NEW_ID_FUNCTION. * add a new id in the enum hotkey_id_commnand like MY_NEW_ID_FUNCTION.
* add a new EDA_HOTKEY entry like: * add a new EDA_HOTKEY entry like:
* static EDA_HOTKEY HkMyNewEntry(wxT("Command Label"), MY_NEW_ID_FUNCTION, default key value); * static EDA_HOTKEY HkMyNewEntry(wxT("Command Label"), MY_NEW_ID_FUNCTION, default key value);
* "Command Label" is the name used in hotkey list display, and the identifier in the * 'Command Label' is the name used in hotkey list display, and the identifier in the
* hotkey list file MY_NEW_ID_FUNCTION is an equivalent id function used in the switch * hotkey list file
* in OnHotKey() function. default key value is the default hotkey for this command. * 'MY_NEW_ID_FUNCTION' is the id event function used in the switch in OnHotKey() function.
* Can be overrided by the user hotkey list file add the HkMyNewEntry pointer in the * 'Default key value' is the default hotkey for this command.
* s_board_edit_Hotkey_List list ( or/and the s_module_edit_Hotkey_List list) Add the * Can be overrided by the user hotkey list
* new code in the switch in OnHotKey() function. when the variable PopupOn is true, * Add the 'HkMyNewEntry' pointer in the s_PlEditor_Hotkey_List list
* an item is currently edited. This can be usefull if the new function cannot be * Add the new code in the switch in OnHotKey() function.
* executed while an item is currently being edited
* ( For example, one cannot start a new wire when a component is moving.)
* *
* Note: If an hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX) * Note: If an hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX)
* is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp) * is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp)
@ -41,13 +62,12 @@ static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 ); static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
static EDA_HOTKEY HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' );
// List of common hotkey descriptors // List of common hotkey descriptors
EDA_HOTKEY* s_PlEditor_Hotkey_List[] = { EDA_HOTKEY* s_PlEditor_Hotkey_List[] = {
&HkHelp, &HkHelp,
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
&HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord, &HkZoomAuto, &HkResetLocalCoord,
NULL NULL
}; };
@ -61,16 +81,16 @@ struct EDA_HOTKEY_CONFIG s_PlEditor_Hokeys_Descr[] =
}; };
/* /* OnHotKey.
* Function OnHotKey.
* ** Commands are case insensitive ** * ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor * Some commands are relative to the item under the mouse cursor
* aDC = current device context * aDC = current device context
* aHotkeyCode = hotkey code (ascii or wxWidget code for special keys) * aHotkeyCode = hotkey code (ascii or wxWidget code for special keys)
* aPosition The cursor position in logical (drawing) units. * aPosition The cursor position in logical (drawing) units.
* aItem = NULL or pointer on a EDA_ITEM under the mouse cursor * aItem = NULL or pointer on a EDA_ITEM under the mouse cursor
*/ */
void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem ) void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode,
const wxPoint& aPosition, EDA_ITEM* aItem )
{ {
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetEventObject( this ); cmd.SetEventObject( this );

View File

@ -109,40 +109,34 @@ void PL_EDITOR_FRAME::ReCreateMenuBar( void )
_( "Quit Pl_Editor" ), _( "Quit Pl_Editor" ),
KiBitmap( exit_xpm ) ); KiBitmap( exit_xpm ) );
// Menu for configuration and preferences // Menu for preferences
wxMenu* configMenu = new wxMenu; wxMenu* preferencesMenu = new wxMenu;
// Options (Preferences on WXMAC) // Options (Preferences on WXMAC)
#ifdef __WXMAC__ #ifdef __WXMAC__
configMenu->Append(wxID_PREFERENCES); preferencesMenu->Append(wxID_PREFERENCES);
#else #else
AddMenuItem( configMenu, AddMenuItem( preferencesMenu,
wxID_PREFERENCES, wxID_PREFERENCES,
_( "&Options" ), _( "&Options" ),
_( "Set options to draw items" ), wxEmptyString,
KiBitmap( preference_xpm ) ); KiBitmap( preference_xpm ) );
#endif // __WXMAC__ #endif // __WXMAC__
// Language submenu // Text editor selection
wxGetApp().AddMenuLanguageList( configMenu ); AddMenuItem( preferencesMenu,
// Hotkey submenu
AddHotkeyConfigMenu( configMenu );
// Menu miscellaneous
wxMenu* miscellaneousMenu = new wxMenu;
// Separator
miscellaneousMenu->AppendSeparator();
// Text editor
AddMenuItem( miscellaneousMenu,
ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR,
_( "&Text Editor" ), _( "&Text Editor" ),
_( "Select your preferred text editor" ), _( "Select your preferred text editor" ),
KiBitmap( editor_xpm ) ); KiBitmap( editor_xpm ) );
// Language submenu
wxGetApp().AddMenuLanguageList( preferencesMenu );
// Hotkey submenu
AddHotkeyConfigMenu( preferencesMenu );
// Menu Help // Menu Help
wxMenu* helpMenu = new wxMenu; wxMenu* helpMenu = new wxMenu;
@ -165,8 +159,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar( void )
// Append menus to the menubar // Append menus to the menubar
menuBar->Append( fileMenu, _( "&File" ) ); menuBar->Append( fileMenu, _( "&File" ) );
menuBar->Append( configMenu, _( "&Preferences" ) ); menuBar->Append( preferencesMenu, _( "&Preferences" ) );
menuBar->Append( miscellaneousMenu, _( "&Miscellaneous" ) );
menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Append( helpMenu, _( "&Help" ) );
menuBar->Thaw(); menuBar->Thaw();

View File

@ -179,12 +179,24 @@ void WORKSHEET_LAYOUT_IO::Format( WORKSHEET_LAYOUT* aPageLayout ) const
// Setup // Setup
int nestLevel = 1; int nestLevel = 1;
// Write default values:
m_out->Print( nestLevel, "(%s", getTokenName( T_setup ) ); m_out->Print( nestLevel, "(%s", getTokenName( T_setup ) );
m_out->Print( 0, "(textsize %s %s)", m_out->Print( 0, "(textsize %s %s)",
double2Str( TB_DEFAULT_TEXTSIZE ).c_str(), double2Str( TB_DEFAULT_TEXTSIZE ).c_str(),
double2Str( TB_DEFAULT_TEXTSIZE ).c_str() ); double2Str( TB_DEFAULT_TEXTSIZE ).c_str() );
m_out->Print( 0, "(linewidth %s)", double2Str( 0.15 ).c_str() ); m_out->Print( 0, "(linewidth %s)", double2Str( 0.15 ).c_str() );
m_out->Print( 0, "(textlinewidth %s)", double2Str( 0.15 ).c_str() ); m_out->Print( 0, "(textlinewidth %s)", double2Str( 0.15 ).c_str() );
m_out->Print( 0, "\n" );
// Write margin values
m_out->Print( nestLevel, "(%s %s)", getTokenName( T_left_margin ),
double2Str( aPageLayout->GetLeftMargin() ).c_str() );
m_out->Print( 0, "(%s %s)", getTokenName( T_right_margin ),
double2Str( aPageLayout->GetRightMargin() ).c_str() );
m_out->Print( 0, "(%s %s)", getTokenName( T_top_margin ),
double2Str( aPageLayout->GetTopMargin() ).c_str() );
m_out->Print( 0, "(%s %s)", getTokenName( T_bottom_margin ),
double2Str( aPageLayout->GetBottomMargin() ).c_str() );
m_out->Print( 0, ")\n" ); m_out->Print( 0, ")\n" );
// Save the graphical items on the page layout // Save the graphical items on the page layout

View File

@ -64,7 +64,7 @@ bool EDA_APP::OnInit()
{ {
wxFileName fn; wxFileName fn;
InitEDA_Appl( wxT( "pl_editor" ), APP_GERBVIEW_T ); InitEDA_Appl( wxT( "pl_editor" ), APP_PL_EDITOR_T );
if( m_Checker && m_Checker->IsAnotherRunning() ) if( m_Checker && m_Checker->IsAnotherRunning() )
{ {
@ -87,7 +87,7 @@ bool EDA_APP::OnInit()
PL_EDITOR_FRAME * frame = new PL_EDITOR_FRAME( NULL, wxT( "PlEditorFrame" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) ); PL_EDITOR_FRAME * frame = new PL_EDITOR_FRAME( NULL, wxT( "PlEditorFrame" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) );
//ainframe title: // frame title:
frame->SetTitle( GetTitle() + wxT( " " ) + GetBuildVersion() ); frame->SetTitle( GetTitle() + wxT( " " ) + GetBuildVersion() );
SetTopWindow( frame ); SetTopWindow( frame );
@ -96,6 +96,7 @@ bool EDA_APP::OnInit()
frame->GetScreen()->m_FirstRedraw = false; frame->GetScreen()->m_FirstRedraw = false;
bool descrLoaded = false;
if( argc > 1 ) if( argc > 1 )
{ {
fn = argv[1]; fn = argv[1];
@ -111,10 +112,16 @@ bool EDA_APP::OnInit()
fn.GetFullPath().GetData() ); fn.GetFullPath().GetData() );
wxMessageBox( msg ); wxMessageBox( msg );
} }
else
descrLoaded = true;
} }
} }
frame->RebuildDesignTree(); if( !descrLoaded )
{
WORKSHEET_LAYOUT::GetTheInstance().SetPageLayout();
frame->OnNewPageLayout();
}
return true; return true;
} }

View File

@ -36,6 +36,7 @@
#include <pl_editor_frame.h> #include <pl_editor_frame.h>
#include <hotkeys.h> #include <hotkeys.h>
#include <dialog_hotkeys_editor.h> #include <dialog_hotkeys_editor.h>
#include <pl_editor_id.h>
#define GROUP wxT("/pl_editor") #define GROUP wxT("/pl_editor")
@ -49,6 +50,25 @@ void PL_EDITOR_FRAME::Process_Config( wxCommandEvent& event )
switch( id ) switch( id )
{ {
case wxID_PREFERENCES:
break;
// Standard basic hotkey IDs
case ID_PREFERENCES_HOTKEY_SHOW_EDITOR:
InstallHotkeyFrame( this, s_PlEditor_Hokeys_Descr );
break;
case ID_PREFERENCES_HOTKEY_EXPORT_CONFIG:
ExportHotkeyConfigToFile( s_PlEditor_Hokeys_Descr );
break;
case ID_PREFERENCES_HOTKEY_IMPORT_CONFIG:
ImportHotkeyConfigFromFile( s_PlEditor_Hokeys_Descr );
break;
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
DisplayHotkeyList( this, s_PlEditor_Hokeys_Descr );
break;
default: default:
wxMessageBox( wxT( "PL_EDITOR_FRAME::Process_Config error" ) ); wxMessageBox( wxT( "PL_EDITOR_FRAME::Process_Config error" ) );

View File

@ -464,12 +464,23 @@ void PL_EDITOR_FRAME::PrintPage( wxDC* aDC, LAYER_MSK aPrintMasklayer,
void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg ) void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg )
{ {
GetScreen()-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2; GetScreen()-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2;
if( aEraseBg )
m_canvas->EraseScreen( aDC );
m_canvas->DrawBackGround( aDC ); m_canvas->DrawBackGround( aDC );
const WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance(); const WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
WORKSHEET_DATAITEM* selecteditem = GetSelectedItem(); WORKSHEET_DATAITEM* selecteditem = GetSelectedItem();
// the color to draw selected items
if( g_DrawBgColor == WHITE )
WORKSHEET_DATAITEM::m_SelectedColor = DARKCYAN;
else
WORKSHEET_DATAITEM::m_SelectedColor = YELLOW;
for( unsigned ii = 0; ; ii++ ) for( unsigned ii = 0; ; ii++ )
{ {
WORKSHEET_DATAITEM* item = pglayout.GetItem( ii ); WORKSHEET_DATAITEM* item = pglayout.GetItem( ii );
@ -634,3 +645,14 @@ WORKSHEET_DATAITEM* PL_EDITOR_FRAME::Locate( const wxPoint& aPosition )
return item; return item;
} }
/* Must be called to initialize parameters when a new page layout
* description is loaded
*/
void PL_EDITOR_FRAME::OnNewPageLayout()
{
GetScreen()->ClrModify();
m_propertiesPagelayout->CopyPrmsFromGeneralToPanel();
RebuildDesignTree();
m_canvas->Refresh();
}

View File

@ -102,6 +102,12 @@ public:
void UpdateStatusBar(); // overload EDA_DRAW_FRAME void UpdateStatusBar(); // overload EDA_DRAW_FRAME
/**
* Must be called to initialize parameters when a new page layout
* description is loaded
*/
void OnNewPageLayout();
/** /**
* creates or updates the right vertical toolbar. * creates or updates the right vertical toolbar.
* @note This is currently not used. * @note This is currently not used.

View File

@ -49,23 +49,85 @@ wxSize PROPERTIES_FRAME::GetMinSize() const
return wxSize( 150, -1 ); return wxSize( 150, -1 );
} }
// Data transfert from item to widgets in properties frame
void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem ) // Data transfert from general properties to widgets
void PROPERTIES_FRAME::CopyPrmsFromGeneralToPanel()
{ {
wxString msg; wxString msg;
// Set default parameters // Set default parameters
msg.Printf( wxT("%.3f"), aItem->m_DefaultLineWidth ); msg.Printf( wxT("%.3f"), WORKSHEET_DATAITEM::m_DefaultLineWidth );
m_textCtrlDefaultLineWidth->SetValue( msg ); m_textCtrlDefaultLineWidth->SetValue( msg );
msg.Printf( wxT("%.3f"), aItem->m_DefaultTextSize.x ); msg.Printf( wxT("%.3f"), WORKSHEET_DATAITEM::m_DefaultTextSize.x );
m_textCtrlDefaultTextSizeX->SetValue( msg ); m_textCtrlDefaultTextSizeX->SetValue( msg );
msg.Printf( wxT("%.3f"), aItem->m_DefaultTextSize.y ); msg.Printf( wxT("%.3f"), WORKSHEET_DATAITEM::m_DefaultTextSize.y );
m_textCtrlDefaultTextSizeY->SetValue( msg ); m_textCtrlDefaultTextSizeY->SetValue( msg );
msg.Printf( wxT("%.3f"), aItem->m_DefaultTextThickness ); msg.Printf( wxT("%.3f"), WORKSHEET_DATAITEM::m_DefaultTextThickness );
m_textCtrlDefaultTextThickness->SetValue( msg ); m_textCtrlDefaultTextThickness->SetValue( msg );
// Set page margins values
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
msg.Printf( wxT("%.3f"), pglayout.GetRightMargin() );
m_textCtrlRightMargin->SetValue( msg );
msg.Printf( wxT("%.3f"), pglayout.GetBottomMargin() );
m_textCtrlDefaultBottomMargin->SetValue( msg );
msg.Printf( wxT("%.3f"), pglayout.GetLeftMargin() );
m_textCtrlLeftMargin->SetValue( msg );
msg.Printf( wxT("%.3f"), pglayout.GetTopMargin() );
m_textCtrlTopMargin->SetValue( msg );
}
// Data transfert from widgets to general properties
bool PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral()
{
double dtmp;
wxString msg;
// Import default parameters from widgets
msg = m_textCtrlDefaultLineWidth->GetValue();
msg.ToDouble( &dtmp );
WORKSHEET_DATAITEM::m_DefaultLineWidth = dtmp;
msg = m_textCtrlDefaultTextSizeX->GetValue();
msg.ToDouble( &dtmp );
WORKSHEET_DATAITEM::m_DefaultTextSize.x = dtmp;
msg = m_textCtrlDefaultTextSizeY->GetValue();
msg.ToDouble( &dtmp );
WORKSHEET_DATAITEM::m_DefaultTextSize.y = dtmp;
msg = m_textCtrlDefaultTextThickness->GetValue();
msg.ToDouble( &dtmp );
WORKSHEET_DATAITEM::m_DefaultTextThickness = dtmp;
// Get page margins values
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
msg = m_textCtrlRightMargin->GetValue();
msg.ToDouble( &dtmp );
pglayout.SetRightMargin( dtmp );
msg = m_textCtrlDefaultBottomMargin->GetValue();
msg.ToDouble( &dtmp );
pglayout.SetBottomMargin( dtmp );
// cordinates of the left top corner are the left and top margins
msg = m_textCtrlLeftMargin->GetValue();
msg.ToDouble( &dtmp );
pglayout.SetLeftMargin( dtmp );
msg = m_textCtrlTopMargin->GetValue();
msg.ToDouble( &dtmp );
pglayout.SetTopMargin( dtmp );
return true;
}
// Data transfert from item to widgets in properties frame
void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem )
{
wxString msg;
// Set parameters common to all WORKSHEET_DATAITEM types // Set parameters common to all WORKSHEET_DATAITEM types
m_textCtrlType->SetValue( aItem->GetClassName() ); m_textCtrlType->SetValue( aItem->GetClassName() );
m_textCtrlComment->SetValue( aItem->m_Info ); m_textCtrlComment->SetValue( aItem->m_Info );
@ -210,8 +272,8 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem )
m_textCtrlStepY->SetValue( msg ); m_textCtrlStepY->SetValue( msg );
// The number of widgets was modified // The number of widgets was modified
Layout(); m_swItemProperties->Layout();
Refresh(); m_swItemProperties->Refresh();
} }
// Event function called by clicking on the OK button // Event function called by clicking on the OK button
@ -221,6 +283,8 @@ void PROPERTIES_FRAME::OnAcceptPrms( wxCommandEvent& event )
if( item ) if( item )
CopyPrmsFromPanelToItem( item ); CopyPrmsFromPanelToItem( item );
CopyPrmsFromPanelToGeneral();
m_parent->OnModify(); m_parent->OnModify();
m_parent->GetCanvas()->Refresh(); m_parent->GetCanvas()->Refresh();
} }
@ -234,22 +298,6 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( WORKSHEET_DATAITEM* aItem )
double dtmp; double dtmp;
wxString msg; wxString msg;
// Import default parameters
msg = m_textCtrlDefaultLineWidth->GetValue();
msg.ToDouble( &dtmp );
aItem->m_DefaultLineWidth = dtmp;
msg = m_textCtrlDefaultTextSizeX->GetValue();
msg.ToDouble( &dtmp );
aItem->m_DefaultTextSize.x = dtmp;
msg = m_textCtrlDefaultTextSizeY->GetValue();
msg.ToDouble( &dtmp );
aItem->m_DefaultTextSize.y = dtmp;
msg = m_textCtrlDefaultTextThickness->GetValue();
msg.ToDouble( &dtmp );
aItem->m_DefaultTextThickness = dtmp;
// Import common parameters: // Import common parameters:
aItem->m_Info = m_textCtrlComment->GetValue(); aItem->m_Info = m_textCtrlComment->GetValue();

View File

@ -50,6 +50,12 @@ public:
void OnAcceptPrms( wxCommandEvent& event ); void OnAcceptPrms( wxCommandEvent& event );
// Data transfert from general properties to widgets
void CopyPrmsFromGeneralToPanel();
// Data transfert from widgets to general properties
bool CopyPrmsFromPanelToGeneral();
// Data transfert from item to widgets in properties frame // Data transfert from item to widgets in properties frame
void CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem ); void CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem );

View File

@ -1,34 +0,0 @@
( page_layout
( setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) )
( rect (comment "rect around the title block") (linewidth 0.15) (start 110 34) (end 2 2) )
( rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) )
( line (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50) )
( tbtext "1" (pos 25 1 ltcorner) (font (size 1.3 1.3))(repeat 100) (incrx 50) )
( line (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50) )
( tbtext "1" (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50) )
( line (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50) )
( tbtext "A" (pos 1 25 ltcorner) (font (size 1.3 1.3))
(justify center)(repeat 100) (incry 50) )
( line (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50) )
( tbtext "A" (pos 1 25 rtcorner) (font (size 1.3 1.3))
(justify center) (repeat 100) (incry 50) )
( tbtext "Date: %D" (pos 87 6.9) )
( line (start 110 5.5) end 2 5.5) )
( tbtext "%K" (pos 109 4.1) (comment "Kicad version" ) )
( line (start 110 8.5) end 2 8.5) )
( tbtext "Rev: %R" (pos 24 6.9)(font bold)(justify left) )
( tbtext "Size: %Z" (comment "Paper format name")(pos 109 6.9) )
( tbtext "Id: %S/%N" (comment "Sheet id")(pos 24 4.1) )
( line (start 110 12.5) end 2 12.5) )
( tbtext "Title: %T" (pos 109 10.7)(font bold (size 2 2)) )
( tbtext "File: %F" (pos 109 14.3) )
( line (start 110 18.5) end 2 18.5) )
( tbtext "Sheet: %P" (pos 109 17) )
( tbtext "%Y" (comment "Company name") (pos 109 20)(font bold) )
( tbtext "%C0" (comment "Comment 0") (pos 109 23) )
( tbtext "%C1" (comment "Comment 1") (pos 109 26) )
( tbtext "%C2" (comment "Comment 2") (pos 109 29) )
( tbtext "%C3" (comment "Comment 3") (pos 109 32) )
( line (start 90 8.5) end 90 5.5) )
( line (start 26 8.5) end 26 2) )
)

View File

@ -1,33 +1,34 @@
( page_layout ( page_layout
( setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) ) ( setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) )
(rect (name item1:Rect) (start 110 34) (end 2 2)) ( rect (comment "rect around the title block") (linewidth 0.15) (start 110 34) (end 2 2) )
(rect (name item2:Rect) (start 0 0 ltcorner) (end 0 0) (repeat 2) (incrx 2) (incry 2)) ( rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) )
(line (name item3:Line) (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50)) ( line (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50) )
(tbtext 1 (name item4:Text) (pos 25 1 ltcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50) (incrlabel 0)) ( tbtext "1" (pos 25 1 ltcorner) (font (size 1.3 1.3))(repeat 100) (incrx 50) )
(line (name item5:Line) (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50)) ( line (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50) )
(tbtext 1 (name item6:Text) (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50) (incrlabel 0)) ( tbtext "1" (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50) )
(line (name item7:Line) (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50)) ( line (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50) )
(tbtext A (name item8:Text) (pos 1 25 ltcorner) (font (size 1.3 1.3)) (justify center) (repeat 100) (incry 50) (incrlabel 0)) ( tbtext "A" (pos 1 25 ltcorner) (font (size 1.3 1.3))
(line (name item9:Line) (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50)) (justify center)(repeat 100) (incry 50) )
(tbtext A (name item10:Text) (pos 1 25 rtcorner) (font (size 1.3 1.3)) (justify center) (repeat 100) (incry 50) (incrlabel 0)) ( line (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50) )
(tbtext "Date: %D" (name item11:Text) (pos 87 6.9)) ( tbtext "A" (pos 1 25 rtcorner) (font (size 1.3 1.3))
(line (name item12:Line) (start 110 5.5) (end 2 5.5)) (justify center) (repeat 100) (incry 50) )
(tbtext %K (name item13:Text) (pos 109 4.1)) ( tbtext "Date: %D" (pos 87 6.9) )
(line (name item14:Line) (start 110 8.5) (end 2 8.5)) ( line (start 110 5.5) end 2 5.5) )
(tbtext "Rev: %R" (name item15:Text) (pos 24 6.9) (font bold)) ( tbtext "%K" (pos 109 4.1) (comment "Kicad version" ) )
(tbtext "Size: %Z" (name item16:Text) (pos 109 6.9)) ( line (start 110 8.5) end 2 8.5) )
(tbtext "Id: %S/%N" (name item17:Text) (pos 24 4.1)) ( tbtext "Rev: %R" (pos 24 6.9)(font bold)(justify left) )
(line (name item18:Line) (start 110 12.5) (end 2 12.5)) ( tbtext "Size: %Z" (comment "Paper format name")(pos 109 6.9) )
(tbtext "Title: %T" (name item19:Text) (pos 109 10.7) (font (size 2 2) bold)) ( tbtext "Id: %S/%N" (comment "Sheet id")(pos 24 4.1) )
(tbtext "File: %F" (name item20:Text) (pos 109 14.3)) ( line (start 110 12.5) end 2 12.5) )
(line (name item21:Line) (start 110 18.5) (end 2 18.5)) ( tbtext "Title: %T" (pos 109 10.7)(font bold (size 2 2)) )
(tbtext "Sheet: %P" (name item22:Text) (pos 109 17)) ( tbtext "File: %F" (pos 109 14.3) )
(tbtext %Y (name item23:Text) (pos 109 20) (font bold)) ( line (start 110 18.5) end 2 18.5) )
(tbtext %C0 (name item24:Text) (pos 109 23)) ( tbtext "Sheet: %P" (pos 109 17) )
(tbtext %C1 (name item25:Text) (pos 109 26)) ( tbtext "%Y" (comment "Company name") (pos 109 20)(font bold) )
(tbtext %C2 (name item26:Text) (pos 109 29)) ( tbtext "%C0" (comment "Comment 0") (pos 109 23) )
(tbtext %C3 (name item27:Text) (pos 109 32)) ( tbtext "%C1" (comment "Comment 1") (pos 109 26) )
(line (name item28:Line) (start 90 8.5) (end 90 5.5)) ( tbtext "%C2" (comment "Comment 2") (pos 109 29) )
(line (name item29:Line) (start 26 8.5) (end 26 2)) ( tbtext "%C3" (comment "Comment 3") (pos 109 32) )
(rect (name item30:Rect) (start 157 34) (end 110 2)) ( line (start 90 8.5) end 90 5.5) )
( line (start 26 8.5) end 26 2) )
) )