43#include <wx/wupdlock.h>
50#define DLG_MIN_TEXTSIZE 0.01
51#define DLG_MAX_TEXTSIZE 100.0
84 m_stcText->SetUseVerticalScrollBar(
false );
85 m_stcText->SetUseHorizontalScrollBar(
false );
92 m_stcText->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
99 m_bold->SetIsCheckButton();
128 [
this]( wxCommandEvent& event )
158 return FromDIP( wxSize( 150, -1 ) );
234 wxWindowUpdateLocker noUpdates(
this );
293 msg.Printf( wxT(
"%.3f" ), item->
m_Orient );
349 msg.Printf( wxT(
"%d" ), item->
GetPPI() );
408 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
420 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
445 m_parent->GetCanvas()->GetView()->Update( drawItem );
458 m_parent->GetCanvas()->DisplayDrawingSheet();
503 m_parent->GetCanvas()->DisplayDrawingSheet();
510 if( aItem ==
nullptr )
564 msg.Printf( wxT(
"%ld" ), itmp );
635 if( msg.ToLong( &value ) )
636 item->
SetPPI( (
int)value );
645 wxArrayString autocompleteTokens;
647 int start =
m_stcText->WordStartPosition( pos,
true );
651 &&
m_stcText->GetCharAt( start-2 ) ==
'$'
652 &&
m_stcText->GetCharAt( start-1 ) ==
'{' )
656 partial =
m_stcText->GetTextRange( start, pos );
658 for( std::pair<wxString, wxString> entry :
m_parent->Prj().GetTextVars() )
659 autocompleteTokens.push_back( entry.first );
681 message <<
_(
"Texts can include keywords." ) <<
"<br>";
682 message <<
_(
"Keyword notation is ${keyword}" ) <<
"<br>";
683 message <<
_(
"Each keyword is replaced by its value" ) <<
"<br><br>";
684 message <<
_(
"These build-in keywords are always available:" ) <<
"<br><br>";
687 message =
"KICAD_VERSION\n";
688 message <<
"# " <<
_(
"(sheet number)" ) <<
"\n";
689 message <<
"## " <<
_(
"(sheet count)" ) <<
"\n";
690 message <<
"COMMENT1 thru COMMENT9\n";
691 message <<
"COMPANY\n";
692 message <<
"FILENAME\n";
693 message <<
"ISSUE_DATE\n";
694 message <<
"LAYER\n";
695 message <<
"PAPER " <<
_(
"(paper size)" ) <<
"\n";
696 message <<
"REVISION\n";
697 message <<
"SHEETNAME\n";
698 message <<
"SHEETPATH\n";
699 message <<
"TITLE\n";
constexpr EDA_IU_SCALE drawSheetIUScale
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
void SetPPI(int aBitmapPPI)
bool ReplaceAntiSlashSequence()
Replace the '\''n' sequence by EOL and the sequence '\''\' by only one '\' inside m_FullText.
GR_TEXT_H_ALIGN_T m_Hjustify
KIGFX::COLOR4D m_TextColor
VECTOR2D m_BoundingBoxSize
GR_TEXT_V_ALIGN_T m_Vjustify
Drawing sheet structure type definitions.
PAGE_OPTION GetPage1Option() const
void SetPage1Option(PAGE_OPTION aChoice)
DS_ITEM_TYPE GetType() const
const wxString GetClassName() const
VECTOR2D m_IncrementVector
Handle the graphic items list to draw/plot the frame and title block.
void SetBottomMargin(double aMargin)
VECTOR2D m_DefaultTextSize
static DS_DATA_MODEL & GetTheInstance()
Return the instance of DS_DATA_MODEL used in the application.
void SetRightMargin(double aMargin)
double m_DefaultLineWidth
void SetLeftMargin(double aMargin)
double m_DefaultTextThickness
void SetTopMargin(double aMargin)
Base class to handle basic graphic items.
DS_DATA_ITEM * GetPeer() const
static void GetTextVars(wxArrayString *aVars)
virtual COLOR4D GetDrawBgColor() const
void AddHTML_Text(const wxString &message)
Add HTML text (without any change) to message list.
void ListSet(const wxString &aList)
Add a list of items.
wxStaticText * m_bottomMarginUnits
wxTextCtrl * m_constraintXCtrl
wxTextCtrl * m_textCtrlRepeatCount
BITMAP_BUTTON * m_separator2
wxStaticText * m_lineWidthLabel
wxTextCtrl * m_rightMarginCtrl
wxScrolledWindow * m_swItemProperties
wxTextCtrl * m_leftMarginCtrl
wxStaticBoxSizer * m_sbSizerEndPosition
wxTextCtrl * m_textCtrlPosY
wxStaticText * m_staticTextType
wxStaticText * m_staticTextEndY
wxStaticText * m_leftMarginLabel
wxStaticText * m_leftMarginUnits
wxTextCtrl * m_textCtrlEndX
wxStaticText * m_constraintYUnits
wxStaticText * m_topMarginLabel
wxTextCtrl * m_textCtrlComment
wxBoxSizer * m_SizerTextOptions
wxStaticText * m_TextStepXUnits
wxComboBox * m_comboBoxCornerPos
wxStaticText * m_constraintXLabel
wxStaticText * m_staticTextTsizeX
wxStaticText * m_lineWidthUnits
wxStyledTextCtrl * m_stcText
wxTextCtrl * m_constraintYCtrl
wxScrolledWindow * m_swGeneralOpts
BITMAP_BUTTON * m_alignCenter
wxStaticText * m_staticTextTsizeY
wxTextCtrl * m_defaultLineWidthCtrl
wxStaticText * m_staticTextDefTsY
wxTextCtrl * m_defaultTextThicknessCtrl
wxStaticText * m_staticTextInclabel
wxStaticText * m_constraintYLabel
wxStaticText * m_TextPosXUnits
BITMAP_BUTTON * m_separator3
wxStaticText * m_TextStepYUnits
wxTextCtrl * m_textCtrlRotation
wxTextCtrl * m_textCtrlDefaultTextSizeY
wxStaticText * m_staticTextPosY
wxStaticText * m_staticTextDefTsX
BITMAP_BUTTON * m_separator4
wxStaticText * m_topMarginUnits
wxTextCtrl * m_textCtrlStepX
wxTextCtrl * m_textCtrlTextSizeX
wxTextCtrl * m_textCtrlEndY
wxStaticText * m_rightMarginUnits
wxTextCtrl * m_textCtrlBitmapDPI
wxComboBox * m_comboBoxCornerEnd
wxStaticText * m_TextEndYUnits
wxStaticText * m_staticTextEndX
wxStaticText * m_staticTextStepY
wxTextCtrl * m_textCtrlTextSizeY
wxStaticText * m_staticTextBitmapDPI
wxBoxSizer * m_SizerItemProperties
wxStaticText * m_defaultLineWidthUnits
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)
wxTextCtrl * m_textCtrlPosX
COLOR_SWATCH * m_textColorSwatch
BITMAP_BUTTON * m_alignRight
wxStaticText * m_defaultTextSizeXUnits
BITMAP_BUTTON * m_vAlignMiddle
wxStaticText * m_bottomMarginLabel
wxStaticText * m_staticTextPosX
wxStaticText * m_TextPosYUnits
wxStaticText * m_staticTextSizeInfo
wxTextCtrl * m_textCtrlStepY
wxTextCtrl * m_textCtrlDefaultTextSizeX
wxTextCtrl * m_bottomMarginCtrl
wxStaticText * m_defaultLineWidthLabel
wxTextCtrl * m_lineWidthCtrl
wxStaticText * m_TextEndXUnits
wxStaticText * m_defaultTextThicknessLabel
wxTextCtrl * m_textCtrlTextIncrement
wxHyperlinkCtrl * m_syntaxHelpLink
wxTextCtrl * m_topMarginCtrl
wxStaticText * m_defaultTextThicknessUnits
wxStaticText * m_rightMarginLabel
wxStaticText * m_staticTextRot
BITMAP_BUTTON * m_vAlignTop
wxStaticText * m_constraintXUnits
BITMAP_BUTTON * m_vAlignBottom
BITMAP_BUTTON * m_alignLeft
wxStaticText * m_textSizeYUnits
wxStaticText * m_staticTextStepX
wxChoice * m_choicePageOpt
wxStaticText * m_defaultTextSizeYUnits
wxStaticText * m_textSizeXUnits
The main window used in the drawing sheet editor.
void onModify(wxCommandEvent &aEvent) override
UNIT_BINDER m_defaultTextSizeX
void onScintillaFocusLost(wxFocusEvent &aEvent) override
PROPERTIES_FRAME(PL_EDITOR_FRAME *aParent)
UNIT_BINDER m_constraintX
UNIT_BINDER m_defaultLineWidth
UNIT_BINDER m_textBottomMargin
PL_EDITOR_FRAME * m_parent
UNIT_BINDER m_textLeftMargin
UNIT_BINDER m_defaultTextThickness
void onScintillaCharAdded(wxStyledTextEvent &aEvent)
void OnSetDefaultValues(wxCommandEvent &event) override
void onTextFocusLost(wxFocusEvent &aEvent) override
void CopyPrmsFromItemToPanel(DS_DATA_ITEM *aItem)
void OnUpdateUI(wxUpdateUIEvent &aEvent) override
void onHAlignButton(wxCommandEvent &aEvent)
void CopyPrmsFromGeneralToPanel()
void onHelp(wxHyperlinkEvent &aEvent) override
bool CopyPrmsFromPanelToItem(DS_DATA_ITEM *aItem)
wxSize GetMinSize() const override
void onVAlignButton(wxCommandEvent &aEvent)
UNIT_BINDER m_constraintY
UNIT_BINDER m_defaultTextSizeY
UNIT_BINDER m_textTopMargin
UNIT_BINDER m_textRightMargin
SCINTILLA_TRICKS * m_scintillaTricks
bool CopyPrmsFromPanelToGeneral()
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
Validate the control against the given range, informing the user of any errors found.
#define TB_DEFAULT_TEXTSIZE
KICOMMON_API double FromUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Return in internal units the value aValue given in a real unit such as "in", "mm",...
KICOMMON_API double DoubleValueFromString(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Convert aTextValue to a double.
KICOMMON_API double ToUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Convert aValue in internal units to the appropriate user units defined by aUnit.
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
double fromMM(double aMMValue)
double toMM(double aIUValue)
#define DLG_MIN_TEXTSIZE
Minimum drawing sheet text default size in millmeters from PROPERTIES_FRAME.
bool validateMM(UNIT_BINDER &aUnitBinder, double aMin, double aMax)
#define DLG_MAX_TEXTSIZE
Maximum drawing sheet text size in mm from PROPERTIES_FRAME.
@ GR_TEXT_H_ALIGN_INDETERMINATE
@ GR_TEXT_V_ALIGN_INDETERMINATE
VECTOR2< double > VECTOR2D