50#define DLG_MIN_TEXTSIZE 0.01
51#define DLG_MAX_TEXTSIZE 100.0
56 m_scintillaTricks( nullptr ),
57 m_textSizeX( aParent, m_staticTextTsizeX, m_textCtrlTextSizeX, m_textSizeXUnits ),
58 m_textSizeY( aParent, m_staticTextTsizeY, m_textCtrlTextSizeY, m_textSizeYUnits ),
59 m_constraintX( aParent, m_constraintXLabel, m_constraintXCtrl, m_constraintXUnits ),
60 m_constraintY( aParent, m_constraintYLabel, m_constraintYCtrl, m_constraintYUnits ),
61 m_textPosX( aParent, m_staticTextPosX, m_textCtrlPosX, m_TextPosXUnits ),
62 m_textPosY( aParent, m_staticTextPosY, m_textCtrlPosY, m_TextPosYUnits ),
63 m_textEndX( aParent, m_staticTextEndX, m_textCtrlEndX, m_TextEndXUnits ),
64 m_textEndY( aParent, m_staticTextEndY, m_textCtrlEndY, m_TextEndYUnits ),
65 m_textStepX( aParent, m_staticTextStepX, m_textCtrlStepX, m_TextStepXUnits ),
66 m_textStepY( aParent, m_staticTextStepY, m_textCtrlStepY, m_TextStepYUnits ),
67 m_defaultTextSizeX( aParent, m_staticTextDefTsX, m_textCtrlDefaultTextSizeX,
68 m_defaultTextSizeXUnits ),
69 m_defaultTextSizeY( aParent, m_staticTextDefTsY, m_textCtrlDefaultTextSizeY,
70 m_defaultTextSizeYUnits ),
71 m_defaultLineWidth( aParent, m_defaultLineWidthLabel, m_defaultLineWidthCtrl,
72 m_defaultLineWidthUnits ),
73 m_defaultTextThickness( aParent, m_defaultTextThicknessLabel, m_defaultTextThicknessCtrl,
74 m_defaultTextThicknessUnits ),
75 m_textLeftMargin( aParent, m_leftMarginLabel, m_leftMarginCtrl, m_leftMarginUnits ),
76 m_textRightMargin( aParent, m_rightMarginLabel, m_rightMarginCtrl, m_rightMarginUnits ),
77 m_textTopMargin( aParent, m_topMarginLabel, m_topMarginCtrl, m_topMarginUnits ),
78 m_textBottomMargin( aParent, m_bottomMarginLabel, m_bottomMarginCtrl, m_bottomMarginUnits ),
79 m_lineWidth( aParent, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits )
83 m_stcText->SetUseVerticalScrollBar(
false );
84 m_stcText->SetUseHorizontalScrollBar(
false );
91 m_stcText->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
153 if( event.GetSelection() == 0 )
164 return wxSize( 150, -1 );
170 static EDA_UNITS units = EDA_UNITS::MILLIMETRES;
197 static EDA_UNITS units = EDA_UNITS::MILLIMETRES;
208 EDA_UNITS::MILLIMETRES );
214 EDA_UNITS::MILLIMETRES );
248 static EDA_UNITS units = EDA_UNITS::MILLIMETRES;
311 msg.Printf( wxT(
"%.3f" ), item->
m_Orient );
369 msg.Printf( wxT(
"%d" ), item->
GetPPI() );
430 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
440 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
497 if( aItem ==
nullptr )
500 const EDA_UNITS units = EDA_UNITS::MILLIMETRES;
559 msg.Printf( wxT(
"%ld" ), itmp );
603 EDA_UNITS::UNSCALED, msg );
641 if( msg.ToLong( &value ) )
642 item->
SetPPI( (
int)value );
651 wxArrayString autocompleteTokens;
653 int start =
m_stcText->WordStartPosition( pos,
true );
657 &&
m_stcText->GetCharAt( start-2 ) ==
'$'
658 &&
m_stcText->GetCharAt( start-1 ) ==
'{' )
662 partial =
m_stcText->GetTextRange( start, pos );
665 autocompleteTokens.push_back( entry.first );
679 message <<
_(
"Texts can include keywords." ) <<
"<br>";
680 message <<
_(
"Keyword notation is ${keyword}" ) <<
"<br>";
681 message <<
_(
"Each keyword is replaced by its value" ) <<
"<br><br>";
682 message <<
_(
"These build-in keywords are always available:" ) <<
"<br><br>";
685 message =
"KICAD_VERSION\n";
686 message <<
"# " <<
_(
"(sheet number)" ) <<
"\n";
687 message <<
"## " <<
_(
"(sheet count)" ) <<
"\n";
688 message <<
"COMMENT1 thru COMMENT9\n";
689 message <<
"COMPANY\n";
690 message <<
"FILENAME\n";
691 message <<
"ISSUE_DATE\n";
692 message <<
"LAYER\n";
693 message <<
"PAPER " <<
_(
"(paper size)" ) <<
"\n";
694 message <<
"REVISION\n";
695 message <<
"SHEETNAME\n";
696 message <<
"SHEETPATH\n";
697 message <<
"TITLE\n";
constexpr EDA_IU_SCALE drawSheetIUScale
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.
KIGFX::COLOR4D GetSwatchColor() const
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
void SetSwatchBackground(const KIGFX::COLOR4D &aBackground)
Set the swatch background color.
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()
static function: returns 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
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
bool HaveFontSelection() const
void SetFontSelection(KIFONT::FONT *aFont)
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic) 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.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
Class PANEL_PROPERTIES_BASE.
wxTextCtrl * m_textCtrlRepeatCount
BITMAP_BUTTON * m_separator2
wxScrolledWindow * m_swItemProperties
wxStaticBoxSizer * m_sbSizerEndPosition
wxStaticText * m_staticTextType
wxTextCtrl * m_textCtrlComment
wxBoxSizer * m_SizerTextOptions
wxButton * m_buttonGeneralOptsOK
wxComboBox * m_comboBoxCornerPos
wxStyledTextCtrl * m_stcText
wxScrolledWindow * m_swGeneralOpts
BITMAP_BUTTON * m_alignCenter
wxStaticText * m_staticTextInclabel
BITMAP_BUTTON * m_separator3
wxTextCtrl * m_textCtrlRotation
BITMAP_BUTTON * m_separator4
wxTextCtrl * m_textCtrlBitmapDPI
wxComboBox * m_comboBoxCornerEnd
wxStaticText * m_staticTextBitmapDPI
wxBoxSizer * m_SizerItemProperties
COLOR_SWATCH * m_textColorSwatch
BITMAP_BUTTON * m_alignRight
BITMAP_BUTTON * m_vAlignMiddle
wxStaticText * m_staticTextSizeInfo
wxTextCtrl * m_textCtrlTextIncrement
wxStaticText * m_staticTextRot
BITMAP_BUTTON * m_vAlignTop
BITMAP_BUTTON * m_vAlignBottom
BITMAP_BUTTON * m_alignLeft
wxChoice * m_choicePageOpt
void DisplayDrawingSheet()
Build and update the list of WS_DRAW_ITEM_xxx showing the frame layout.
The main window used in the drawing sheet editor.
void OnModify() override
Must be called after a change in order to set the "modify" flag.
void SaveCopyInUndoList()
Save a copy of the description (in a S expr string) for Undo/redo commands.
PL_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual std::map< wxString, wxString > & GetTextVars() const
UNIT_BINDER m_defaultTextSizeX
PROPERTIES_FRAME(PL_EDITOR_FRAME *aParent)
void OnAcceptPrms(wxCommandEvent &event) override
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 onHelp(wxCommandEvent &aEvent) override
void OnSetDefaultValues(wxCommandEvent &event) override
void CopyPrmsFromItemToPanel(DS_DATA_ITEM *aItem)
void onHAlignButton(wxCommandEvent &aEvent)
void CopyPrmsFromGeneralToPanel()
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()
void OnPageChanged(wxNotebookEvent &event) override
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
void DoAutocomplete(const wxString &aPartial, const wxArrayString &aTokens)
virtual long long int GetValue()
Return the current value in Internal Units.
virtual void SetDoubleValue(double aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
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.
void Show(bool aShow, bool aResize=false)
Show/hide the label, widget and units label.
#define TB_DEFAULT_TEXTSIZE
KICOMMON_API double FromUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Return in internal units the value "val" given in a real unit such as "in", "mm" or "deg".
KICOMMON_API double DoubleValueFromString(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function DoubleValueFromString converts aTextValue to a double.
KICOMMON_API double ToUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
wxFont GetInfoFont(wxWindow *aWindow)
#define DLG_MIN_TEXTSIZE
Minimum drawing sheet text default size in millmeters from PROPERTIES_FRAME.
#define DLG_MAX_TEXTSIZE
Maximum drawing sheet text size in mm from PROPERTIES_FRAME.
VECTOR2< double > VECTOR2D