Font support for drawing sheet editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10306
This commit is contained in:
parent
aa0787f2b4
commit
b55bda8d6f
|
@ -35,6 +35,7 @@ xy
|
|||
maxlen
|
||||
maxheight
|
||||
font
|
||||
face
|
||||
bold
|
||||
italic
|
||||
size
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <drawing_sheet/ds_painter.h>
|
||||
#include <drawing_sheet/drawing_sheet_lexer.h>
|
||||
#include <drawing_sheet/ds_file_versions.h>
|
||||
#include <font/font.h>
|
||||
|
||||
using namespace DRAWINGSHEET_T;
|
||||
|
||||
|
@ -696,6 +697,9 @@ void DRAWING_SHEET_PARSER::parseText( DS_DATA_ITEM_TEXT* aItem )
|
|||
break;
|
||||
|
||||
case T_font:
|
||||
{
|
||||
wxString faceName;
|
||||
|
||||
for( token = NextTok(); token != T_RIGHT && token != EOF; token = NextTok() )
|
||||
{
|
||||
switch( token )
|
||||
|
@ -703,6 +707,12 @@ void DRAWING_SHEET_PARSER::parseText( DS_DATA_ITEM_TEXT* aItem )
|
|||
case T_LEFT:
|
||||
break;
|
||||
|
||||
case T_face:
|
||||
NeedSYMBOL();
|
||||
faceName = FromUTF8();
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
case T_bold:
|
||||
aItem->m_Bold = true;
|
||||
break;
|
||||
|
@ -727,7 +737,12 @@ void DRAWING_SHEET_PARSER::parseText( DS_DATA_ITEM_TEXT* aItem )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( !faceName.IsEmpty() )
|
||||
aItem->m_Font = KIFONT::FONT::GetFont( faceName, aItem->m_Bold, aItem->m_Italic );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case T_justify:
|
||||
for( token = NextTok(); token != T_RIGHT && token != EOF; token = NextTok() )
|
||||
|
|
|
@ -526,6 +526,7 @@ DS_DATA_ITEM_TEXT::DS_DATA_ITEM_TEXT( const wxString& aTextBase ) :
|
|||
m_Vjustify = GR_TEXT_V_ALIGN_CENTER;
|
||||
m_Italic = false;
|
||||
m_Bold = false;
|
||||
m_Font = nullptr;
|
||||
m_Orient = 0.0;
|
||||
m_LineWidth = 0.0; // 0 means use default value
|
||||
}
|
||||
|
@ -583,7 +584,7 @@ void DS_DATA_ITEM_TEXT::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIE
|
|||
continue;
|
||||
|
||||
text = new DS_DRAW_ITEM_TEXT( this, j, m_FullText, GetStartPosUi( j ), textsize, pensize,
|
||||
m_Italic, m_Bold );
|
||||
m_Font, m_Italic, m_Bold );
|
||||
text->SetFlags( itemFlags[ j ] );
|
||||
m_drawItems.push_back( text );
|
||||
|
||||
|
@ -691,8 +692,8 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
|
|||
int linewidth = 0;
|
||||
size_micron.x = KiROUND( m_ConstrainedTextSize.x * FSCALE );
|
||||
size_micron.y = KiROUND( m_ConstrainedTextSize.y * FSCALE );
|
||||
DS_DRAW_ITEM_TEXT dummy( DS_DRAW_ITEM_TEXT( this, 0, m_FullText, VECTOR2I( 0, 0 ),
|
||||
size_micron, linewidth, m_Italic, m_Bold ) );
|
||||
DS_DRAW_ITEM_TEXT dummy( this, 0, m_FullText, VECTOR2I( 0, 0 ), size_micron, linewidth,
|
||||
m_Font, m_Italic, m_Bold );
|
||||
dummy.SetMultilineAllowed( true );
|
||||
dummy.SetHorizJustify( m_Hjustify ) ;
|
||||
dummy.SetVertJustify( m_Vjustify );
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2016 CERN
|
||||
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
*
|
||||
|
@ -33,6 +33,7 @@
|
|||
#include <drawing_sheet/ds_data_model.h>
|
||||
#include <drawing_sheet/drawing_sheet_lexer.h>
|
||||
#include <drawing_sheet/ds_file_versions.h>
|
||||
#include <font/font.h>
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
|
@ -252,6 +253,9 @@ void DS_DATA_MODEL_IO::format( DS_DATA_ITEM_TEXT* aItem, int aNestLevel ) const
|
|||
{
|
||||
m_out->Print( 0, " (font" );
|
||||
|
||||
if( aItem->m_Font && !aItem->m_Font->Name().IsEmpty() )
|
||||
m_out->Print( 0, " (face \"%s\")", aItem->m_Font->NameAsToken() );
|
||||
|
||||
if( write_thickness )
|
||||
m_out->Print( 0, " (linewidth %s)", double2Str( aItem->m_LineWidth ).c_str() );
|
||||
|
||||
|
|
|
@ -184,8 +184,7 @@ bool DS_DRAW_ITEM_TEXT::HitTest( const EDA_RECT& aRect, bool aContains, int aAcc
|
|||
|
||||
wxString DS_DRAW_ITEM_TEXT::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
{
|
||||
return wxString::Format( _( "Text '%s'" ),
|
||||
GetShownText() );
|
||||
return wxString::Format( _( "Text '%s'" ), GetShownText() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -277,11 +277,10 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
{
|
||||
if( text->GetShownText().Matches( wxT( "*${*}*" ) ) )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
ercItem->SetErrorMessage( _( "Unresolved text variable in drawing sheet." ) );
|
||||
std::shared_ptr<ERC_ITEM> erc = ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
erc->SetErrorMessage( _( "Unresolved text variable in drawing sheet." ) );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, text->GetPosition() );
|
||||
SCH_MARKER* marker = new SCH_MARKER( erc, text->GetPosition() );
|
||||
screen->Append( marker );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2022 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
|
||||
|
@ -339,6 +339,7 @@ public:
|
|||
GR_TEXT_V_ALIGN_T m_Vjustify;
|
||||
bool m_Italic;
|
||||
bool m_Bold;
|
||||
KIFONT::FONT* m_Font;
|
||||
VECTOR2D m_TextSize;
|
||||
VECTOR2D m_BoundingBoxSize; // When not null, this is the max size of the
|
||||
// full text. The text size will be modified
|
||||
|
|
|
@ -302,14 +302,15 @@ class DS_DRAW_ITEM_TEXT : public DS_DRAW_ITEM_BASE, public EDA_TEXT
|
|||
{
|
||||
public:
|
||||
DS_DRAW_ITEM_TEXT( DS_DATA_ITEM* aPeer, int aIndex, const wxString& aText, const VECTOR2I& aPos,
|
||||
const VECTOR2I& aSize, int aPenWidth, bool aItalic = false,
|
||||
bool aBold = false ) :
|
||||
const VECTOR2I& aSize, int aPenWidth, KIFONT::FONT* aFont,
|
||||
bool aItalic = false, bool aBold = false ) :
|
||||
DS_DRAW_ITEM_BASE( aPeer, aIndex, WSG_TEXT_T),
|
||||
EDA_TEXT( aText )
|
||||
{
|
||||
SetTextPos( aPos );
|
||||
SetTextSize( (wxSize) aSize );
|
||||
SetTextThickness( aPenWidth );
|
||||
SetFont( aFont );
|
||||
SetItalic( aItalic );
|
||||
SetBold( aBold );
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2021 Mikołaj Wielgus <wielgusmikolaj@gmail.com>
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021-2022 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
|
||||
|
@ -30,4 +30,5 @@
|
|||
* format. Comment the changes to the file format for historical purposes.
|
||||
*/
|
||||
|
||||
#define SEXPR_WORKSHEET_FILE_VERSION 20210606 // Initial version.
|
||||
//#define SEXPR_WORKSHEET_FILE_VERSION 20210606 // Initial version.
|
||||
#define SEXPR_WORKSHEET_FILE_VERSION 20220228 // Font support.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -25,11 +25,14 @@
|
|||
|
||||
#include <project.h>
|
||||
#include <scintilla_tricks.h>
|
||||
#include <widgets/bitmap_button.h>
|
||||
#include <widgets/font_choice.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <drawing_sheet/ds_draw_item.h>
|
||||
#include <drawing_sheet/ds_data_item.h>
|
||||
#include <drawing_sheet/ds_data_model.h>
|
||||
#include <view/view.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include "properties_frame.h"
|
||||
#include "pl_editor_frame.h"
|
||||
|
@ -41,39 +44,25 @@
|
|||
PROPERTIES_FRAME::PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent ) :
|
||||
PANEL_PROPERTIES_BASE( aParent ),
|
||||
m_scintillaTricks( nullptr ),
|
||||
m_textCtrlTextSizeXBinder( aParent, m_staticTextTsizeX, m_textCtrlTextSizeX,
|
||||
m_TextTextSizeXUnits ),
|
||||
m_textCtrlTextSizeYBinder( aParent, m_staticTextTsizeY, m_textCtrlTextSizeY,
|
||||
m_TextTextSizeYUnits ),
|
||||
m_textCtrlConstraintXBinder( aParent, m_staticTextConstraintX, m_textCtrlConstraintX,
|
||||
m_TextConstraintXUnits ),
|
||||
m_textCtrlConstraintYBinder( aParent, m_staticTextConstraintY, m_textCtrlConstraintY,
|
||||
m_TextConstraintYUnits ),
|
||||
m_textCtrlPosXBinder( aParent, m_staticTextPosX, m_textCtrlPosX, m_TextPosXUnits ),
|
||||
m_textCtrlPosYBinder( aParent, m_staticTextPosY, m_textCtrlPosY, m_TextPosYUnits ),
|
||||
m_textCtrlEndXBinder( aParent, m_staticTextEndX, m_textCtrlEndX, m_TextEndXUnits ),
|
||||
m_textCtrlEndYBinder( aParent, m_staticTextEndY, m_textCtrlEndY, m_TextEndYUnits ),
|
||||
m_textCtrlStepXBinder( aParent, m_staticTextStepX, m_textCtrlStepX, m_TextStepXUnits ),
|
||||
m_textCtrlStepYBinder( aParent, m_staticTextStepY, m_textCtrlStepY, m_TextStepYUnits ),
|
||||
m_textCtrlDefaultTextSizeXBinder( aParent, m_staticTextDefTsX, m_textCtrlDefaultTextSizeX,
|
||||
m_TextDefaultTextSizeXUnits ),
|
||||
m_textCtrlDefaultTextSizeYBinder( aParent, m_staticTextDefTsY, m_textCtrlDefaultTextSizeY,
|
||||
m_TextDefaultTextSizeYUnits ),
|
||||
m_textCtrlDefaultLineWidthBinder( aParent, m_staticTextDefLineW,
|
||||
m_textCtrlDefaultLineWidth, m_TextDefaultLineWidthUnits ),
|
||||
m_textCtrlDefaultTextThicknessBinder( aParent, m_staticTextDefTextThickness,
|
||||
m_textCtrlDefaultTextThickness,
|
||||
m_TextDefaultTextThicknessUnits ),
|
||||
m_textCtrlLeftMarginBinder( aParent, m_staticTextLeftMargin, m_textCtrlLeftMargin,
|
||||
m_TextLeftMarginUnits ),
|
||||
m_textCtrlRightMarginBinder( aParent, m_staticTextDefRightMargin, m_textCtrlRightMargin,
|
||||
m_TextRightMarginUnits ),
|
||||
m_textCtrlTopMarginBinder( aParent, m_staticTextTopMargin, m_textCtrlTopMargin,
|
||||
m_TextTopMarginUnits ),
|
||||
m_textCtrlBottomMarginBinder( aParent, m_staticTextBottomMargin, m_textCtrlBottomMargin,
|
||||
m_TextBottomMarginUnits ),
|
||||
m_textCtrlThicknessBinder( aParent, m_staticTextThickness, m_textCtrlThickness,
|
||||
m_TextLineThicknessUnits )
|
||||
m_textSizeX( aParent, m_staticTextTsizeX, m_textCtrlTextSizeX, m_textSizeXUnits ),
|
||||
m_textSizeY( aParent, m_staticTextTsizeY, m_textCtrlTextSizeY, m_textSizeYUnits ),
|
||||
m_constraintX( aParent, m_constraintXLabel, m_constraintXCtrl, m_constraintXUnits ),
|
||||
m_constraintY( aParent, m_constraintYLabel, m_constraintYCtrl, m_constraintYUnits ),
|
||||
m_textPosX( aParent, m_staticTextPosX, m_textCtrlPosX, m_TextPosXUnits ),
|
||||
m_textPosY( aParent, m_staticTextPosY, m_textCtrlPosY, m_TextPosYUnits ),
|
||||
m_textEndX( aParent, m_staticTextEndX, m_textCtrlEndX, m_TextEndXUnits ),
|
||||
m_textEndY( aParent, m_staticTextEndY, m_textCtrlEndY, m_TextEndYUnits ),
|
||||
m_textStepX( aParent, m_staticTextStepX, m_textCtrlStepX, m_TextStepXUnits ),
|
||||
m_textStepY( aParent, m_staticTextStepY, m_textCtrlStepY, m_TextStepYUnits ),
|
||||
m_defaultTextSizeX( aParent, m_staticTextDefTsX, m_textCtrlDefaultTextSizeX, m_defaultTextSizeXUnits ),
|
||||
m_defaultTextSizeY( aParent, m_staticTextDefTsY, m_textCtrlDefaultTextSizeY, m_defaultTextSizeYUnits ),
|
||||
m_defaultLineWidth( aParent, m_defaultLineWidthLabel, m_defaultLineWidthCtrl, m_defaultLineWidthUnits ),
|
||||
m_defaultTextThickness( aParent, m_defaultTextThicknessLabel, m_defaultTextThicknessCtrl, m_defaultTextThicknessUnits ),
|
||||
m_textLeftMargin( aParent, m_leftMarginLabel, m_leftMarginCtrl, m_leftMarginUnits ),
|
||||
m_textRightMargin( aParent, m_rightMarginLabel, m_rightMarginCtrl, m_rightMarginUnits ),
|
||||
m_textTopMargin( aParent, m_topMarginLabel, m_topMarginCtrl, m_topMarginUnits ),
|
||||
m_textBottomMargin( aParent, m_bottomMarginLabel, m_bottomMarginCtrl, m_bottomMarginUnits ),
|
||||
m_lineWidth( aParent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits )
|
||||
{
|
||||
m_parent = aParent;
|
||||
|
||||
|
@ -84,6 +73,32 @@ PROPERTIES_FRAME::PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent ) :
|
|||
|
||||
m_staticTextSizeInfo->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
|
||||
m_separator1->SetIsSeparator();
|
||||
|
||||
m_bold->SetIsCheckButton();
|
||||
m_bold->SetBitmap( KiBitmap( BITMAPS::text_bold ) );
|
||||
m_italic->SetIsCheckButton();
|
||||
m_italic->SetBitmap( KiBitmap( BITMAPS::text_italic ) );
|
||||
|
||||
m_separator2->SetIsSeparator();
|
||||
|
||||
m_alignLeft->SetIsCheckButton();
|
||||
m_alignLeft->SetBitmap( KiBitmap( BITMAPS::text_align_left ) );
|
||||
m_alignCenter->SetIsCheckButton();
|
||||
m_alignCenter->SetBitmap( KiBitmap( BITMAPS::text_align_center ) );
|
||||
m_alignRight->SetIsCheckButton();
|
||||
m_alignRight->SetBitmap( KiBitmap( BITMAPS::text_align_right ) );
|
||||
|
||||
m_separator3->SetIsSeparator();
|
||||
|
||||
m_vAlignTop->SetIsCheckButton();
|
||||
m_vAlignTop->SetBitmap( KiBitmap( BITMAPS::text_valign_top ) );
|
||||
m_vAlignMiddle->SetIsCheckButton();
|
||||
m_vAlignMiddle->SetBitmap( KiBitmap( BITMAPS::text_valign_center ) );
|
||||
m_vAlignBottom->SetIsCheckButton();
|
||||
m_vAlignBottom->SetBitmap( KiBitmap( BITMAPS::text_valign_bottom ) );
|
||||
|
||||
m_separator4->SetIsSeparator();
|
||||
m_buttonOK->SetDefault();
|
||||
|
||||
// ensure sizers are up to date
|
||||
|
@ -92,6 +107,12 @@ PROPERTIES_FRAME::PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent ) :
|
|||
m_swGeneralOpts->Fit();
|
||||
|
||||
m_stcText->Bind( wxEVT_STC_CHARADDED, &PROPERTIES_FRAME::onScintillaCharAdded, this );
|
||||
m_alignLeft->Bind( wxEVT_BUTTON, &PROPERTIES_FRAME::onHAlignButton, this );
|
||||
m_alignCenter->Bind( wxEVT_BUTTON, &PROPERTIES_FRAME::onHAlignButton, this );
|
||||
m_alignRight->Bind( wxEVT_BUTTON, &PROPERTIES_FRAME::onHAlignButton, this );
|
||||
m_vAlignTop->Bind( wxEVT_BUTTON, &PROPERTIES_FRAME::onVAlignButton, this );
|
||||
m_vAlignMiddle->Bind( wxEVT_BUTTON, &PROPERTIES_FRAME::onVAlignButton, this );
|
||||
m_vAlignBottom->Bind( wxEVT_BUTTON, &PROPERTIES_FRAME::onVAlignButton, this );
|
||||
}
|
||||
|
||||
|
||||
|
@ -120,59 +141,40 @@ wxSize PROPERTIES_FRAME::GetMinSize() const
|
|||
|
||||
void PROPERTIES_FRAME::CopyPrmsFromGeneralToPanel()
|
||||
{
|
||||
static EDA_UNITS units = EDA_UNITS::MILLIMETRES;
|
||||
DS_DATA_MODEL& model = DS_DATA_MODEL::GetTheInstance();
|
||||
|
||||
// Set default parameters
|
||||
m_textCtrlDefaultLineWidthBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, model.m_DefaultLineWidth ) );
|
||||
m_defaultLineWidth.SetDoubleValue( From_User_Unit( units, model.m_DefaultLineWidth ) );
|
||||
|
||||
m_textCtrlDefaultTextSizeXBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, model.m_DefaultTextSize.x ) );
|
||||
m_defaultTextSizeX.SetDoubleValue( From_User_Unit( units, model.m_DefaultTextSize.x ) );
|
||||
m_defaultTextSizeY.SetDoubleValue( From_User_Unit( units, model.m_DefaultTextSize.y ) );
|
||||
m_defaultTextThickness.SetDoubleValue( From_User_Unit( units, model.m_DefaultTextThickness ) );
|
||||
|
||||
m_textCtrlDefaultTextSizeYBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, model.m_DefaultTextSize.y ) );
|
||||
|
||||
m_textCtrlDefaultTextThicknessBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, model.m_DefaultTextThickness ) );
|
||||
|
||||
m_textCtrlLeftMarginBinder.SetDoubleValue( From_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
model.GetLeftMargin() ) );
|
||||
m_textCtrlRightMarginBinder.SetDoubleValue( From_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
model.GetRightMargin() ) );
|
||||
m_textCtrlTopMarginBinder.SetDoubleValue( From_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
model.GetTopMargin() ) );
|
||||
m_textCtrlBottomMarginBinder.SetDoubleValue( From_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
model.GetBottomMargin() ) );
|
||||
m_textLeftMargin.SetDoubleValue( From_User_Unit( units, model.GetLeftMargin() ) );
|
||||
m_textRightMargin.SetDoubleValue( From_User_Unit( units, model.GetRightMargin() ) );
|
||||
m_textTopMargin.SetDoubleValue( From_User_Unit( units, model.GetTopMargin() ) );
|
||||
m_textBottomMargin.SetDoubleValue( From_User_Unit( units, model.GetBottomMargin() ) );
|
||||
}
|
||||
|
||||
|
||||
bool PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral()
|
||||
{
|
||||
static EDA_UNITS units = EDA_UNITS::MILLIMETRES;
|
||||
DS_DATA_MODEL& model = DS_DATA_MODEL::GetTheInstance();
|
||||
|
||||
// Import default parameters from widgets
|
||||
model.m_DefaultLineWidth =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlDefaultLineWidthBinder.GetValue() );
|
||||
model.m_DefaultLineWidth = To_User_Unit( units, m_defaultLineWidth.GetValue() );
|
||||
|
||||
model.m_DefaultTextSize.x =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlDefaultTextSizeXBinder.GetValue() );
|
||||
model.m_DefaultTextSize.y =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlDefaultTextSizeYBinder.GetValue() );
|
||||
|
||||
model.m_DefaultTextThickness =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlDefaultTextThicknessBinder.GetValue() );
|
||||
model.m_DefaultTextSize.x = To_User_Unit( units, m_defaultTextSizeX.GetValue() );
|
||||
model.m_DefaultTextSize.y = To_User_Unit( units, m_defaultTextSizeY.GetValue() );
|
||||
model.m_DefaultTextThickness = To_User_Unit( units, m_defaultTextThickness.GetValue() );
|
||||
|
||||
// Get page margins values
|
||||
model.SetRightMargin(
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlRightMarginBinder.GetValue() ) );
|
||||
model.SetBottomMargin(
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlBottomMarginBinder.GetValue() ) );
|
||||
|
||||
// coordinates of the left top corner are the left and top margins
|
||||
model.SetLeftMargin(
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlLeftMarginBinder.GetValue() ) );
|
||||
model.SetTopMargin(
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlTopMarginBinder.GetValue() ) );
|
||||
model.SetRightMargin( To_User_Unit( units, m_textRightMargin.GetValue() ) );
|
||||
model.SetBottomMargin( To_User_Unit( units, m_textBottomMargin.GetValue() ) );
|
||||
model.SetLeftMargin( To_User_Unit( units, m_textLeftMargin.GetValue() ) );
|
||||
model.SetTopMargin( To_User_Unit( units, m_textTopMargin.GetValue() ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -186,6 +188,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
return;
|
||||
}
|
||||
|
||||
static EDA_UNITS units = EDA_UNITS::MILLIMETRES;
|
||||
wxString msg;
|
||||
|
||||
// Set parameters common to all DS_DATA_ITEM types
|
||||
|
@ -201,11 +204,8 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
}
|
||||
|
||||
// Position/ start point
|
||||
m_textCtrlPosXBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_Pos.m_Pos.x ) );
|
||||
|
||||
m_textCtrlPosYBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_Pos.m_Pos.y ) );
|
||||
m_textPosX.SetDoubleValue( From_User_Unit( units, aItem->m_Pos.m_Pos.x ) );
|
||||
m_textPosY.SetDoubleValue( From_User_Unit( units, aItem->m_Pos.m_Pos.y ) );
|
||||
|
||||
switch( aItem->m_Pos.m_Anchor )
|
||||
{
|
||||
|
@ -216,10 +216,8 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
}
|
||||
|
||||
// End point
|
||||
m_textCtrlEndXBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_End.m_Pos.x ) );
|
||||
m_textCtrlEndYBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_End.m_Pos.y ) );
|
||||
m_textEndX.SetDoubleValue( From_User_Unit( units, aItem->m_End.m_Pos.x ) );
|
||||
m_textEndY.SetDoubleValue( From_User_Unit( units, aItem->m_End.m_Pos.y ) );
|
||||
|
||||
switch( aItem->m_End.m_Anchor )
|
||||
{
|
||||
|
@ -229,8 +227,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
case LT_CORNER: m_comboBoxCornerEnd->SetSelection( 1 ); break;
|
||||
}
|
||||
|
||||
m_textCtrlThicknessBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_LineWidth ) );
|
||||
m_lineWidth.SetDoubleValue( From_User_Unit( units, aItem->m_LineWidth ) );
|
||||
|
||||
// Now, set prms more specific to DS_DATA_ITEM types
|
||||
// For a given type, disable widgets which are not relevant,
|
||||
|
@ -244,42 +241,46 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
item->ReplaceAntiSlashSequence();
|
||||
m_stcText->SetValue( item->m_FullText );
|
||||
|
||||
msg.Printf( wxT("%d"), item->m_IncrementLabel );
|
||||
msg.Printf( wxT( "%d" ), item->m_IncrementLabel );
|
||||
m_textCtrlTextIncrement->SetValue( msg );
|
||||
|
||||
// Rotation (poly and text)
|
||||
msg.Printf( wxT("%.3f"), item->m_Orient );
|
||||
msg.Printf( wxT( "%.3f" ), item->m_Orient );
|
||||
m_textCtrlRotation->SetValue( msg );
|
||||
|
||||
// Constraints:
|
||||
m_textCtrlConstraintXBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, item->m_BoundingBoxSize.x ) );
|
||||
m_textCtrlConstraintYBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, item->m_BoundingBoxSize.y ) );
|
||||
m_constraintX.SetDoubleValue( From_User_Unit( units, item->m_BoundingBoxSize.x ) );
|
||||
m_constraintY.SetDoubleValue( From_User_Unit( units, item->m_BoundingBoxSize.y ) );
|
||||
|
||||
// Font Options
|
||||
m_checkBoxBold->SetValue( item->m_Bold );
|
||||
m_checkBoxItalic->SetValue( item->m_Italic );
|
||||
m_fontCtrl->SetFontSelection( item->m_Font );
|
||||
|
||||
m_bold->Check( item->m_Bold );
|
||||
m_italic->Check( item->m_Italic );
|
||||
|
||||
for( BITMAP_BUTTON* btn : { m_alignLeft, m_alignCenter, m_alignRight } )
|
||||
btn->Check( false );
|
||||
|
||||
switch( item->m_Hjustify )
|
||||
{
|
||||
case GR_TEXT_H_ALIGN_LEFT: m_choiceHjustify->SetSelection( 0 ); break;
|
||||
case GR_TEXT_H_ALIGN_CENTER: m_choiceHjustify->SetSelection( 1 ); break;
|
||||
case GR_TEXT_H_ALIGN_RIGHT: m_choiceHjustify->SetSelection( 2 ); break;
|
||||
case GR_TEXT_H_ALIGN_LEFT: m_alignLeft->Check(); break;
|
||||
case GR_TEXT_H_ALIGN_CENTER: m_alignCenter->Check(); break;
|
||||
case GR_TEXT_H_ALIGN_RIGHT: m_alignRight->Check(); break;
|
||||
}
|
||||
|
||||
for( BITMAP_BUTTON* btn : { m_vAlignTop, m_vAlignMiddle, m_vAlignBottom } )
|
||||
btn->Check( false );
|
||||
|
||||
switch( item->m_Vjustify )
|
||||
{
|
||||
case GR_TEXT_V_ALIGN_TOP: m_choiceVjustify->SetSelection( 0 ); break;
|
||||
case GR_TEXT_V_ALIGN_CENTER: m_choiceVjustify->SetSelection( 1 ); break;
|
||||
case GR_TEXT_V_ALIGN_BOTTOM: m_choiceVjustify->SetSelection( 2 ); break;
|
||||
case GR_TEXT_V_ALIGN_TOP: m_vAlignTop->Check(); break;
|
||||
case GR_TEXT_V_ALIGN_CENTER: m_vAlignMiddle->Check(); break;
|
||||
case GR_TEXT_V_ALIGN_BOTTOM: m_vAlignBottom->Check(); break;
|
||||
}
|
||||
|
||||
// Text size
|
||||
m_textCtrlTextSizeXBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, item->m_TextSize.x ) );
|
||||
m_textCtrlTextSizeYBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, item->m_TextSize.y ) );
|
||||
m_textSizeX.SetDoubleValue( From_User_Unit( units, item->m_TextSize.x ) );
|
||||
m_textSizeY.SetDoubleValue( From_User_Unit( units, item->m_TextSize.y ) );
|
||||
}
|
||||
|
||||
if( aItem->GetType() == DS_DATA_ITEM::DS_POLYPOLYGON )
|
||||
|
@ -287,7 +288,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
DS_DATA_ITEM_POLYGONS* item = static_cast<DS_DATA_ITEM_POLYGONS*>( aItem );
|
||||
|
||||
// Rotation (poly and text)
|
||||
msg.Printf( wxT("%.3f"), item->m_Orient.AsDegrees() );
|
||||
msg.Printf( wxT( "%.3f" ), item->m_Orient.AsDegrees() );
|
||||
m_textCtrlRotation->SetValue( msg );
|
||||
}
|
||||
|
||||
|
@ -296,7 +297,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
DS_DATA_ITEM_BITMAP* item = static_cast<DS_DATA_ITEM_BITMAP*>( aItem );
|
||||
|
||||
// select definition in PPI
|
||||
msg.Printf( wxT("%d"), item->GetPPI() );
|
||||
msg.Printf( wxT( "%d" ), item->GetPPI() );
|
||||
m_textCtrlBitmapDPI->SetValue( msg );
|
||||
}
|
||||
|
||||
|
@ -308,7 +309,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
m_sbSizerEndPosition->Show( aItem->GetType() == DS_DATA_ITEM::DS_SEGMENT
|
||||
|| aItem->GetType() == DS_DATA_ITEM::DS_RECT );
|
||||
|
||||
m_textCtrlThicknessBinder.Show( aItem->GetType() != DS_DATA_ITEM::DS_BITMAP );
|
||||
m_lineWidth.Show( aItem->GetType() != DS_DATA_ITEM::DS_BITMAP );
|
||||
|
||||
if( aItem->GetType() == DS_DATA_ITEM::DS_TEXT
|
||||
|| aItem->GetType() == DS_DATA_ITEM::DS_POLYPOLYGON )
|
||||
|
@ -329,14 +330,11 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
m_textCtrlTextIncrement->Show( aItem->GetType() == DS_DATA_ITEM::DS_TEXT );
|
||||
|
||||
// Repeat parameters
|
||||
msg.Printf( wxT("%d"), aItem->m_RepeatCount );
|
||||
msg.Printf( wxT( "%d" ), aItem->m_RepeatCount );
|
||||
m_textCtrlRepeatCount->SetValue( msg );
|
||||
|
||||
m_textCtrlStepXBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_IncrementVector.x ) );
|
||||
|
||||
m_textCtrlStepYBinder.SetDoubleValue(
|
||||
From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_IncrementVector.y ) );
|
||||
m_textStepX.SetDoubleValue( From_User_Unit( units, aItem->m_IncrementVector.x ) );
|
||||
m_textStepY.SetDoubleValue( From_User_Unit( units, aItem->m_IncrementVector.y ) );
|
||||
|
||||
// The number of widgets was modified, so recalculate sizers
|
||||
m_swItemProperties->Layout();
|
||||
|
@ -353,6 +351,26 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( DS_DATA_ITEM* aItem )
|
|||
}
|
||||
|
||||
|
||||
void PROPERTIES_FRAME::onHAlignButton( wxCommandEvent& aEvent )
|
||||
{
|
||||
for( BITMAP_BUTTON* btn : { m_alignLeft, m_alignCenter, m_alignRight } )
|
||||
{
|
||||
if( btn->IsChecked() && btn != aEvent.GetEventObject() )
|
||||
btn->Check( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PROPERTIES_FRAME::onVAlignButton( wxCommandEvent& aEvent )
|
||||
{
|
||||
for( BITMAP_BUTTON* btn : { m_vAlignTop, m_vAlignMiddle, m_vAlignBottom } )
|
||||
{
|
||||
if( btn->IsChecked() && btn != aEvent.GetEventObject() )
|
||||
btn->Check( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PROPERTIES_FRAME::OnAcceptPrms( wxCommandEvent& event )
|
||||
{
|
||||
PL_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<PL_SELECTION_TOOL>();
|
||||
|
@ -407,6 +425,7 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( DS_DATA_ITEM* aItem )
|
|||
if( aItem == nullptr )
|
||||
return false;
|
||||
|
||||
const EDA_UNITS units = EDA_UNITS::MILLIMETRES;
|
||||
wxString msg;
|
||||
|
||||
// Import common parameters:
|
||||
|
@ -421,12 +440,11 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( DS_DATA_ITEM* aItem )
|
|||
}
|
||||
|
||||
// Import thickness
|
||||
aItem->m_LineWidth = To_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
m_textCtrlThicknessBinder.GetValue() );
|
||||
aItem->m_LineWidth = To_User_Unit( units, m_lineWidth.GetValue() );
|
||||
|
||||
// Import Start point
|
||||
aItem->m_Pos.m_Pos.x = To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlPosXBinder.GetValue() );
|
||||
aItem->m_Pos.m_Pos.y = To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlPosYBinder.GetValue() );
|
||||
aItem->m_Pos.m_Pos.x = To_User_Unit( units, m_textPosX.GetValue() );
|
||||
aItem->m_Pos.m_Pos.y = To_User_Unit( units, m_textPosY.GetValue() );
|
||||
|
||||
switch( m_comboBoxCornerPos->GetSelection() )
|
||||
{
|
||||
|
@ -437,8 +455,8 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( DS_DATA_ITEM* aItem )
|
|||
}
|
||||
|
||||
// Import End point
|
||||
aItem->m_End.m_Pos.x = To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlEndXBinder.GetValue() );
|
||||
aItem->m_End.m_Pos.y = To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlEndYBinder.GetValue() );
|
||||
aItem->m_End.m_Pos.x = To_User_Unit( units, m_textEndX.GetValue() );
|
||||
aItem->m_End.m_Pos.y = To_User_Unit( units, m_textEndY.GetValue() );
|
||||
|
||||
switch( m_comboBoxCornerEnd->GetSelection() )
|
||||
{
|
||||
|
@ -454,10 +472,8 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( DS_DATA_ITEM* aItem )
|
|||
msg.ToLong( &itmp );
|
||||
aItem->m_RepeatCount = itmp;
|
||||
|
||||
aItem->m_IncrementVector.x = To_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
m_textCtrlStepXBinder.GetValue() );
|
||||
aItem->m_IncrementVector.y = To_User_Unit( EDA_UNITS::MILLIMETRES,
|
||||
m_textCtrlStepYBinder.GetValue() );
|
||||
aItem->m_IncrementVector.x = To_User_Unit( units, m_textStepX.GetValue() );
|
||||
aItem->m_IncrementVector.y = To_User_Unit( units, m_textStepY.GetValue() );
|
||||
|
||||
if( aItem->GetType() == DS_DATA_ITEM::DS_TEXT )
|
||||
{
|
||||
|
@ -469,37 +485,36 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( DS_DATA_ITEM* aItem )
|
|||
msg.ToLong( &itmp );
|
||||
item->m_IncrementLabel = itmp;
|
||||
|
||||
item->m_Bold = m_checkBoxBold->IsChecked();
|
||||
item->m_Italic = m_checkBoxItalic->IsChecked();
|
||||
item->m_Bold = m_bold->IsChecked();
|
||||
item->m_Italic = m_italic->IsChecked();
|
||||
|
||||
switch( m_choiceHjustify->GetSelection() )
|
||||
{
|
||||
case 0: item->m_Hjustify = GR_TEXT_H_ALIGN_LEFT; break;
|
||||
case 1: item->m_Hjustify = GR_TEXT_H_ALIGN_CENTER; break;
|
||||
case 2: item->m_Hjustify = GR_TEXT_H_ALIGN_RIGHT; break;
|
||||
}
|
||||
if( m_alignLeft->IsChecked() )
|
||||
item->m_Hjustify = GR_TEXT_H_ALIGN_LEFT;
|
||||
else if( m_alignCenter->IsChecked() )
|
||||
item->m_Hjustify = GR_TEXT_H_ALIGN_CENTER;
|
||||
else if( m_alignRight->IsChecked() )
|
||||
item->m_Hjustify = GR_TEXT_H_ALIGN_RIGHT;
|
||||
|
||||
switch( m_choiceVjustify->GetSelection() )
|
||||
{
|
||||
case 0: item->m_Vjustify = GR_TEXT_V_ALIGN_TOP; break;
|
||||
case 1: item->m_Vjustify = GR_TEXT_V_ALIGN_CENTER; break;
|
||||
case 2: item->m_Vjustify = GR_TEXT_V_ALIGN_BOTTOM; break;
|
||||
}
|
||||
if( m_vAlignTop->IsChecked() )
|
||||
item->m_Vjustify = GR_TEXT_V_ALIGN_TOP;
|
||||
else if( m_vAlignMiddle->IsChecked() )
|
||||
item->m_Vjustify = GR_TEXT_V_ALIGN_CENTER;
|
||||
else if( m_vAlignBottom->IsChecked() )
|
||||
item->m_Vjustify = GR_TEXT_V_ALIGN_BOTTOM;
|
||||
|
||||
if( m_fontCtrl->HaveFontSelection() )
|
||||
item->m_Font = m_fontCtrl->GetFontSelection( item->m_Bold, item->m_Italic );
|
||||
|
||||
msg = m_textCtrlRotation->GetValue();
|
||||
item->m_Orient = DoubleValueFromString( EDA_UNITS::UNSCALED, msg );
|
||||
|
||||
// Import text size
|
||||
item->m_TextSize.x =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlTextSizeXBinder.GetValue() );
|
||||
item->m_TextSize.y =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlTextSizeYBinder.GetValue() );
|
||||
item->m_TextSize.x = To_User_Unit( units, m_textSizeX.GetValue() );
|
||||
item->m_TextSize.y = To_User_Unit( units, m_textSizeY.GetValue() );
|
||||
|
||||
// Import constraints:
|
||||
item->m_BoundingBoxSize.x =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlConstraintXBinder.GetValue() );
|
||||
item->m_BoundingBoxSize.y =
|
||||
To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlConstraintYBinder.GetValue() );
|
||||
item->m_BoundingBoxSize.x = To_User_Unit( units, m_constraintX.GetValue() );
|
||||
item->m_BoundingBoxSize.y = To_User_Unit( units, m_constraintY.GetValue() );
|
||||
}
|
||||
|
||||
if( aItem->GetType() == DS_DATA_ITEM::DS_POLYPOLYGON )
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2013-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -45,34 +46,34 @@ class PROPERTIES_FRAME : public PANEL_PROPERTIES_BASE
|
|||
PL_EDITOR_FRAME* m_parent;
|
||||
SCINTILLA_TRICKS* m_scintillaTricks;
|
||||
|
||||
UNIT_BINDER m_textCtrlTextSizeXBinder;
|
||||
UNIT_BINDER m_textCtrlTextSizeYBinder;
|
||||
UNIT_BINDER m_textSizeX;
|
||||
UNIT_BINDER m_textSizeY;
|
||||
|
||||
UNIT_BINDER m_textCtrlConstraintXBinder;
|
||||
UNIT_BINDER m_textCtrlConstraintYBinder;
|
||||
UNIT_BINDER m_constraintX;
|
||||
UNIT_BINDER m_constraintY;
|
||||
|
||||
UNIT_BINDER m_textCtrlPosXBinder;
|
||||
UNIT_BINDER m_textCtrlPosYBinder;
|
||||
UNIT_BINDER m_textPosX;
|
||||
UNIT_BINDER m_textPosY;
|
||||
|
||||
UNIT_BINDER m_textCtrlEndXBinder;
|
||||
UNIT_BINDER m_textCtrlEndYBinder;
|
||||
UNIT_BINDER m_textEndX;
|
||||
UNIT_BINDER m_textEndY;
|
||||
|
||||
UNIT_BINDER m_textCtrlStepXBinder;
|
||||
UNIT_BINDER m_textCtrlStepYBinder;
|
||||
UNIT_BINDER m_textStepX;
|
||||
UNIT_BINDER m_textStepY;
|
||||
|
||||
UNIT_BINDER m_textCtrlDefaultTextSizeXBinder;
|
||||
UNIT_BINDER m_textCtrlDefaultTextSizeYBinder;
|
||||
UNIT_BINDER m_defaultTextSizeX;
|
||||
UNIT_BINDER m_defaultTextSizeY;
|
||||
|
||||
UNIT_BINDER m_textCtrlDefaultLineWidthBinder;
|
||||
UNIT_BINDER m_textCtrlDefaultTextThicknessBinder;
|
||||
UNIT_BINDER m_defaultLineWidth;
|
||||
UNIT_BINDER m_defaultTextThickness;
|
||||
|
||||
UNIT_BINDER m_textCtrlLeftMarginBinder;
|
||||
UNIT_BINDER m_textCtrlRightMarginBinder;
|
||||
UNIT_BINDER m_textLeftMargin;
|
||||
UNIT_BINDER m_textRightMargin;
|
||||
|
||||
UNIT_BINDER m_textCtrlTopMarginBinder;
|
||||
UNIT_BINDER m_textCtrlBottomMarginBinder;
|
||||
UNIT_BINDER m_textTopMargin;
|
||||
UNIT_BINDER m_textBottomMargin;
|
||||
|
||||
UNIT_BINDER m_textCtrlThicknessBinder;
|
||||
UNIT_BINDER m_lineWidth;
|
||||
|
||||
public:
|
||||
PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent );
|
||||
|
@ -84,6 +85,8 @@ public:
|
|||
void OnSetDefaultValues( wxCommandEvent& event ) override;
|
||||
void onScintillaCharAdded( wxStyledTextEvent &aEvent );
|
||||
void onHelp( wxCommandEvent& aEvent ) override;
|
||||
void onHAlignButton( wxCommandEvent &aEvent );
|
||||
void onVAlignButton( wxCommandEvent &aEvent );
|
||||
|
||||
// Data transfer from general properties to widgets
|
||||
void CopyPrmsFromGeneralToPanel();
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "widgets/bitmap_button.h"
|
||||
#include "widgets/font_choice.h"
|
||||
|
||||
#include "properties_frame_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -24,7 +27,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
m_staticTextType = new wxStaticText( m_swItemProperties, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextType->Wrap( -1 );
|
||||
m_staticTextType->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_SLANT, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||
m_staticTextType->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_SLANT, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerButt->Add( m_staticTextType, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 4 );
|
||||
|
||||
|
@ -52,7 +55,6 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_stcText->SetViewWhiteSpace( false );
|
||||
m_stcText->SetMarginWidth( 2, 0 );
|
||||
m_stcText->SetIndentationGuides( false );
|
||||
m_stcText->SetReadOnly( false );
|
||||
m_stcText->SetMarginWidth( 1, 0 );
|
||||
m_stcText->SetMarginWidth( 0, 0 );
|
||||
m_stcText->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
|
||||
|
@ -77,45 +79,127 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
wxBoxSizer* bSizerFontOpt;
|
||||
bSizerFontOpt = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 0, 4, 0, 0 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
wxGridBagSizer* gbSizer11;
|
||||
gbSizer11 = new wxGridBagSizer( 3, 5 );
|
||||
gbSizer11->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextHjust = new wxStaticText( m_swItemProperties, wxID_ANY, _("H align:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextHjust->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextHjust, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
wxBoxSizer* formattingSizer;
|
||||
formattingSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxString m_choiceHjustifyChoices[] = { _("Left"), _("Center"), _("Right") };
|
||||
int m_choiceHjustifyNChoices = sizeof( m_choiceHjustifyChoices ) / sizeof( wxString );
|
||||
m_choiceHjustify = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHjustifyNChoices, m_choiceHjustifyChoices, 0 );
|
||||
m_choiceHjustify->SetSelection( 0 );
|
||||
fgSizer1->Add( m_choiceHjustify, 0, wxEXPAND|wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_separator1 = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
m_separator1->Enable( false );
|
||||
|
||||
formattingSizer->Add( m_separator1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_bold = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
m_bold->SetToolTip( _("Bold") );
|
||||
|
||||
formattingSizer->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_italic = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
m_italic->SetToolTip( _("Italic") );
|
||||
|
||||
formattingSizer->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_separator2 = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
m_separator2->Enable( false );
|
||||
|
||||
formattingSizer->Add( m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_alignLeft = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
formattingSizer->Add( m_alignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_alignCenter = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
formattingSizer->Add( m_alignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_alignRight = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
formattingSizer->Add( m_alignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_separator3 = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
m_separator3->Enable( false );
|
||||
|
||||
formattingSizer->Add( m_separator3, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_vAlignTop = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
formattingSizer->Add( m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_vAlignMiddle = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
formattingSizer->Add( m_vAlignMiddle, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_vAlignBottom = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
formattingSizer->Add( m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_separator4 = new BITMAP_BUTTON( m_swItemProperties, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
||||
m_separator4->Enable( false );
|
||||
|
||||
formattingSizer->Add( m_separator4, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
gbSizer11->Add( formattingSizer, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_checkBoxBold = new wxCheckBox( m_swItemProperties, wxID_ANY, _("Bold"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_checkBoxBold, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
m_fontLabel = new wxStaticText( m_swItemProperties, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_fontLabel->Wrap( -1 );
|
||||
gbSizer11->Add( m_fontLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticTextVjust = new wxStaticText( m_swItemProperties, wxID_ANY, _("V align:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextVjust->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextVjust, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") };
|
||||
int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
|
||||
m_fontCtrl = new FONT_CHOICE( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
|
||||
m_fontCtrl->SetSelection( 0 );
|
||||
gbSizer11->Add( m_fontCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
wxString m_choiceVjustifyChoices[] = { _("Top"), _("Center"), _("Bottom") };
|
||||
int m_choiceVjustifyNChoices = sizeof( m_choiceVjustifyChoices ) / sizeof( wxString );
|
||||
m_choiceVjustify = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVjustifyNChoices, m_choiceVjustifyChoices, 0 );
|
||||
m_choiceVjustify->SetSelection( 1 );
|
||||
fgSizer1->Add( m_choiceVjustify, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_staticTextTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTsizeX->Wrap( -1 );
|
||||
gbSizer11->Add( m_staticTextTsizeX, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlTextSizeX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer11->Add( m_textCtrlTextSizeX, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_textSizeXUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textSizeXUnits->Wrap( -1 );
|
||||
gbSizer11->Add( m_textSizeXUnits, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTsizeY->Wrap( -1 );
|
||||
gbSizer11->Add( m_staticTextTsizeY, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlTextSizeY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer11->Add( m_textCtrlTextSizeY, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_textSizeYUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textSizeYUnits->Wrap( -1 );
|
||||
gbSizer11->Add( m_textSizeYUnits, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_constraintXLabel = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_constraintXLabel->Wrap( -1 );
|
||||
m_constraintXLabel->SetToolTip( _("Set to 0 to disable this constraint") );
|
||||
|
||||
gbSizer11->Add( m_constraintXLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_constraintXCtrl = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer11->Add( m_constraintXCtrl, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_constraintXUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_constraintXUnits->Wrap( -1 );
|
||||
gbSizer11->Add( m_constraintXUnits, wxGBPosition( 4, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_constraintYLabel = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_constraintYLabel->Wrap( -1 );
|
||||
m_constraintYLabel->SetToolTip( _("Set to 0 to disable this constraint") );
|
||||
|
||||
gbSizer11->Add( m_constraintYLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_constraintYCtrl = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer11->Add( m_constraintYCtrl, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_constraintYUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_constraintYUnits->Wrap( -1 );
|
||||
gbSizer11->Add( m_constraintYUnits, wxGBPosition( 5, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
gbSizer11->AddGrowableCol( 2 );
|
||||
|
||||
m_checkBoxItalic = new wxCheckBox( m_swItemProperties, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_checkBoxItalic, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerFontOpt->Add( fgSizer1, 0, wxEXPAND, 5 );
|
||||
bSizerFontOpt->Add( gbSizer11, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_SizerTextOptions->Add( bSizerFontOpt, 0, wxEXPAND|wxBOTTOM, 2 );
|
||||
|
@ -126,54 +210,6 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
fgSizer2->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTsizeX->Wrap( -1 );
|
||||
fgSizer2->Add( m_staticTextTsizeX, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlTextSizeX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer2->Add( m_textCtrlTextSizeX, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_TextTextSizeXUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextTextSizeXUnits->Wrap( -1 );
|
||||
fgSizer2->Add( m_TextTextSizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTsizeY->Wrap( -1 );
|
||||
fgSizer2->Add( m_staticTextTsizeY, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlTextSizeY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer2->Add( m_textCtrlTextSizeY, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_TextTextSizeYUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextTextSizeYUnits->Wrap( -1 );
|
||||
fgSizer2->Add( m_TextTextSizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticTextConstraintX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextConstraintX->Wrap( -1 );
|
||||
m_staticTextConstraintX->SetToolTip( _("Set to 0 to disable this constraint") );
|
||||
|
||||
fgSizer2->Add( m_staticTextConstraintX, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlConstraintX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer2->Add( m_textCtrlConstraintX, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_TextConstraintXUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextConstraintXUnits->Wrap( -1 );
|
||||
fgSizer2->Add( m_TextConstraintXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextConstraintY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextConstraintY->Wrap( -1 );
|
||||
m_staticTextConstraintY->SetToolTip( _("Set to 0 to disable this constraint") );
|
||||
|
||||
fgSizer2->Add( m_staticTextConstraintY, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlConstraintY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer2->Add( m_textCtrlConstraintY, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_TextConstraintYUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextConstraintYUnits->Wrap( -1 );
|
||||
fgSizer2->Add( m_TextConstraintYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_SizerTextOptions->Add( fgSizer2, 0, wxEXPAND|wxBOTTOM, 3 );
|
||||
|
||||
|
@ -305,16 +341,16 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
gbSizer1->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Line width:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_staticTextThickness->Wrap( -1 );
|
||||
gbSizer1->Add( m_staticTextThickness, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
|
||||
m_lineWidthLabel = new wxStaticText( m_swItemProperties, wxID_ANY, _("Line width:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_lineWidthLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_textCtrlThickness = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_textCtrlThickness, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
m_lineWidthCtrl = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_TextLineThicknessUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextLineThicknessUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_TextLineThicknessUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
||||
m_lineWidthUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_lineWidthUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
||||
|
||||
m_staticTextRot = new wxStaticText( m_swItemProperties, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRot->Wrap( -1 );
|
||||
|
@ -435,9 +471,9 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_textCtrlDefaultTextSizeX = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer5->Add( m_textCtrlDefaultTextSizeX, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_TextDefaultTextSizeXUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextDefaultTextSizeXUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_TextDefaultTextSizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
m_defaultTextSizeXUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultTextSizeXUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_defaultTextSizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextDefTsY = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDefTsY->Wrap( -1 );
|
||||
|
@ -449,37 +485,37 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_textCtrlDefaultTextSizeY = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer5->Add( m_textCtrlDefaultTextSizeY, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_TextDefaultTextSizeYUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextDefaultTextSizeYUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_TextDefaultTextSizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
m_defaultTextSizeYUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultTextSizeYUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_defaultTextSizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextDefLineW = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDefLineW->Wrap( -1 );
|
||||
fgSizer5->Add( m_staticTextDefLineW, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
m_defaultLineWidthLabel = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultLineWidthLabel->Wrap( -1 );
|
||||
fgSizer5->Add( m_defaultLineWidthLabel, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_textCtrlDefaultLineWidth = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer5->Add( m_textCtrlDefaultLineWidth, 0, wxEXPAND|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_defaultLineWidthCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer5->Add( m_defaultLineWidthCtrl, 0, wxEXPAND|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_TextDefaultLineWidthUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextDefaultLineWidthUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_TextDefaultLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
m_defaultLineWidthUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultLineWidthUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_defaultLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextDefTextThickness = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Text thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDefTextThickness->Wrap( -1 );
|
||||
fgSizer5->Add( m_staticTextDefTextThickness, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
m_defaultTextThicknessLabel = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Text thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultTextThicknessLabel->Wrap( -1 );
|
||||
fgSizer5->Add( m_defaultTextThicknessLabel, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
fgSizer5->Add( 0, 0, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
m_textCtrlDefaultTextThickness = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer5->Add( m_textCtrlDefaultTextThickness, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
m_defaultTextThicknessCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer5->Add( m_defaultTextThicknessCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_TextDefaultTextThicknessUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextDefaultTextThicknessUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_TextDefaultTextThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
m_defaultTextThicknessUnits = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_defaultTextThicknessUnits->Wrap( -1 );
|
||||
fgSizer5->Add( m_defaultTextThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
@ -502,61 +538,61 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
fgSizer6->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticTextLeftMargin = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Left:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextLeftMargin->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticTextLeftMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_leftMarginLabel = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Left:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_leftMarginLabel->Wrap( -1 );
|
||||
fgSizer6->Add( m_leftMarginLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_textCtrlLeftMargin = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_textCtrlLeftMargin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
m_leftMarginCtrl = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_leftMarginCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_TextLeftMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextLeftMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_TextLeftMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT|wxRIGHT, 5 );
|
||||
m_leftMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_leftMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_leftMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextDefRightMargin = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Right:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDefRightMargin->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticTextDefRightMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_rightMarginLabel = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Right:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rightMarginLabel->Wrap( -1 );
|
||||
fgSizer6->Add( m_rightMarginLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_textCtrlRightMargin = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_textCtrlRightMargin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
m_rightMarginCtrl = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_rightMarginCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_TextRightMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextRightMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_TextRightMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT|wxRIGHT, 5 );
|
||||
m_rightMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rightMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_rightMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextTopMargin = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Top:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextTopMargin->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticTextTopMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_topMarginLabel = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Top:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_topMarginLabel->Wrap( -1 );
|
||||
fgSizer6->Add( m_topMarginLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer6->Add( 0, 0, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
m_textCtrlTopMargin = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_textCtrlTopMargin, 0, wxEXPAND|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_topMarginCtrl = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_topMarginCtrl, 0, wxEXPAND|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_TextTopMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextTopMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_TextTopMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
m_topMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_topMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_topMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextBottomMargin = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextBottomMargin->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticTextBottomMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
m_bottomMarginLabel = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("Bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bottomMarginLabel->Wrap( -1 );
|
||||
fgSizer6->Add( m_bottomMarginLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_textCtrlBottomMargin = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_textCtrlBottomMargin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
m_bottomMarginCtrl = new wxTextCtrl( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer6->Add( m_bottomMarginCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_TextBottomMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextBottomMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_TextBottomMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
m_bottomMarginUnits = new wxStaticText( bSizerGeneraMargins->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bottomMarginUnits->Wrap( -1 );
|
||||
fgSizer6->Add( m_bottomMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerGeneraMargins->Add( fgSizer6, 1, wxEXPAND, 5 );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -10,24 +10,27 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class BITMAP_BUTTON;
|
||||
class FONT_CHOICE;
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stc/stc.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/panel.h>
|
||||
|
@ -50,24 +53,32 @@ class PANEL_PROPERTIES_BASE : public wxPanel
|
|||
wxChoice* m_choicePageOpt;
|
||||
wxBoxSizer* m_SizerTextOptions;
|
||||
wxStyledTextCtrl* m_stcText;
|
||||
wxStaticText* m_staticTextHjust;
|
||||
wxChoice* m_choiceHjustify;
|
||||
wxCheckBox* m_checkBoxBold;
|
||||
wxStaticText* m_staticTextVjust;
|
||||
wxChoice* m_choiceVjustify;
|
||||
wxCheckBox* m_checkBoxItalic;
|
||||
BITMAP_BUTTON* m_separator1;
|
||||
BITMAP_BUTTON* m_bold;
|
||||
BITMAP_BUTTON* m_italic;
|
||||
BITMAP_BUTTON* m_separator2;
|
||||
BITMAP_BUTTON* m_alignLeft;
|
||||
BITMAP_BUTTON* m_alignCenter;
|
||||
BITMAP_BUTTON* m_alignRight;
|
||||
BITMAP_BUTTON* m_separator3;
|
||||
BITMAP_BUTTON* m_vAlignTop;
|
||||
BITMAP_BUTTON* m_vAlignMiddle;
|
||||
BITMAP_BUTTON* m_vAlignBottom;
|
||||
BITMAP_BUTTON* m_separator4;
|
||||
wxStaticText* m_fontLabel;
|
||||
FONT_CHOICE* m_fontCtrl;
|
||||
wxStaticText* m_staticTextTsizeX;
|
||||
wxTextCtrl* m_textCtrlTextSizeX;
|
||||
wxStaticText* m_TextTextSizeXUnits;
|
||||
wxStaticText* m_textSizeXUnits;
|
||||
wxStaticText* m_staticTextTsizeY;
|
||||
wxTextCtrl* m_textCtrlTextSizeY;
|
||||
wxStaticText* m_TextTextSizeYUnits;
|
||||
wxStaticText* m_staticTextConstraintX;
|
||||
wxTextCtrl* m_textCtrlConstraintX;
|
||||
wxStaticText* m_TextConstraintXUnits;
|
||||
wxStaticText* m_staticTextConstraintY;
|
||||
wxTextCtrl* m_textCtrlConstraintY;
|
||||
wxStaticText* m_TextConstraintYUnits;
|
||||
wxStaticText* m_textSizeYUnits;
|
||||
wxStaticText* m_constraintXLabel;
|
||||
wxTextCtrl* m_constraintXCtrl;
|
||||
wxStaticText* m_constraintXUnits;
|
||||
wxStaticText* m_constraintYLabel;
|
||||
wxTextCtrl* m_constraintYCtrl;
|
||||
wxStaticText* m_constraintYUnits;
|
||||
wxStaticText* m_staticTextSizeInfo;
|
||||
wxStaticText* m_staticTextComment;
|
||||
wxTextCtrl* m_textCtrlComment;
|
||||
|
@ -89,9 +100,9 @@ class PANEL_PROPERTIES_BASE : public wxPanel
|
|||
wxStaticText* m_TextEndYUnits;
|
||||
wxStaticText* m_staticTextOrgEnd;
|
||||
wxComboBox* m_comboBoxCornerEnd;
|
||||
wxStaticText* m_staticTextThickness;
|
||||
wxTextCtrl* m_textCtrlThickness;
|
||||
wxStaticText* m_TextLineThicknessUnits;
|
||||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
wxStaticText* m_lineWidthUnits;
|
||||
wxStaticText* m_staticTextRot;
|
||||
wxTextCtrl* m_textCtrlRotation;
|
||||
wxStaticText* m_staticTextBitmapDPI;
|
||||
|
@ -110,32 +121,32 @@ class PANEL_PROPERTIES_BASE : public wxPanel
|
|||
wxScrolledWindow* m_swGeneralOpts;
|
||||
wxStaticText* m_staticTextDefTsX;
|
||||
wxTextCtrl* m_textCtrlDefaultTextSizeX;
|
||||
wxStaticText* m_TextDefaultTextSizeXUnits;
|
||||
wxStaticText* m_defaultTextSizeXUnits;
|
||||
wxStaticText* m_staticTextDefTsY;
|
||||
wxTextCtrl* m_textCtrlDefaultTextSizeY;
|
||||
wxStaticText* m_TextDefaultTextSizeYUnits;
|
||||
wxStaticText* m_staticTextDefLineW;
|
||||
wxTextCtrl* m_textCtrlDefaultLineWidth;
|
||||
wxStaticText* m_TextDefaultLineWidthUnits;
|
||||
wxStaticText* m_staticTextDefTextThickness;
|
||||
wxTextCtrl* m_textCtrlDefaultTextThickness;
|
||||
wxStaticText* m_TextDefaultTextThicknessUnits;
|
||||
wxStaticText* m_defaultTextSizeYUnits;
|
||||
wxStaticText* m_defaultLineWidthLabel;
|
||||
wxTextCtrl* m_defaultLineWidthCtrl;
|
||||
wxStaticText* m_defaultLineWidthUnits;
|
||||
wxStaticText* m_defaultTextThicknessLabel;
|
||||
wxTextCtrl* m_defaultTextThicknessCtrl;
|
||||
wxStaticText* m_defaultTextThicknessUnits;
|
||||
wxButton* m_buttonDefault;
|
||||
wxStaticText* m_staticTextLeftMargin;
|
||||
wxTextCtrl* m_textCtrlLeftMargin;
|
||||
wxStaticText* m_TextLeftMarginUnits;
|
||||
wxStaticText* m_staticTextDefRightMargin;
|
||||
wxTextCtrl* m_textCtrlRightMargin;
|
||||
wxStaticText* m_TextRightMarginUnits;
|
||||
wxStaticText* m_staticTextTopMargin;
|
||||
wxTextCtrl* m_textCtrlTopMargin;
|
||||
wxStaticText* m_TextTopMarginUnits;
|
||||
wxStaticText* m_staticTextBottomMargin;
|
||||
wxTextCtrl* m_textCtrlBottomMargin;
|
||||
wxStaticText* m_TextBottomMarginUnits;
|
||||
wxStaticText* m_leftMarginLabel;
|
||||
wxTextCtrl* m_leftMarginCtrl;
|
||||
wxStaticText* m_leftMarginUnits;
|
||||
wxStaticText* m_rightMarginLabel;
|
||||
wxTextCtrl* m_rightMarginCtrl;
|
||||
wxStaticText* m_rightMarginUnits;
|
||||
wxStaticText* m_topMarginLabel;
|
||||
wxTextCtrl* m_topMarginCtrl;
|
||||
wxStaticText* m_topMarginUnits;
|
||||
wxStaticText* m_bottomMarginLabel;
|
||||
wxTextCtrl* m_bottomMarginCtrl;
|
||||
wxStaticText* m_bottomMarginUnits;
|
||||
wxButton* m_buttonGeneralOptsOK;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnPageChanged( wxNotebookEvent& event ) { event.Skip(); }
|
||||
virtual void onHelp( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnAcceptPrms( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
@ -145,7 +156,6 @@ class PANEL_PROPERTIES_BASE : public wxPanel
|
|||
public:
|
||||
|
||||
PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
|
||||
~PANEL_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue