43 std::vector<PCB_TABLECELL*> aCells ) :
48 m_textHeight( aFrame, m_SizeYLabel, m_SizeYCtrl, m_SizeYUnits ),
49 m_textWidth( aFrame, m_SizeXLabel, m_SizeXCtrl, m_SizeXUnits ),
50 m_textThickness( aFrame, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnits ),
51 m_marginLeft( aFrame, nullptr, m_marginLeftCtrl, nullptr ),
52 m_marginTop( aFrame, nullptr, m_marginTopCtrl, m_marginTopUnits ),
53 m_marginRight( aFrame, nullptr, m_marginRightCtrl, nullptr ),
54 m_marginBottom( aFrame, nullptr, m_marginBottomCtrl, nullptr ),
55 m_returnValue( TABLECELL_PROPS_CANCEL )
92 if( !wxDialog::TransferDataToWindow() )
95 bool firstCell =
true;
108 m_bold->Set3StateValue( cell->IsBold() ? wxCHK_CHECKED : wxCHK_UNCHECKED );
109 m_italic->Set3StateValue( cell->IsItalic() ? wxCHK_CHECKED : wxCHK_UNCHECKED );
111 hAlign = cell->GetHorizJustify();
112 vAlign = cell->GetVertJustify();
135 wxCheckBoxState bold = cell->IsBold() ? wxCHK_CHECKED : wxCHK_UNCHECKED;
137 if( bold !=
m_bold->Get3StateValue() )
138 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
140 wxCheckBoxState italic = cell->IsItalic() ? wxCHK_CHECKED : wxCHK_UNCHECKED;
142 if( italic !=
m_italic->Get3StateValue() )
143 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
145 if( cell->GetHorizJustify() != hAlign )
148 if( cell->GetVertJustify() != vAlign )
189 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
199 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
207 if( !wxDialog::TransferDataFromWindow() )
224 if(
m_bold->Get3StateValue() == wxCHK_CHECKED )
225 cell->SetBold(
true );
226 else if(
m_bold->Get3StateValue() == wxCHK_UNCHECKED )
227 cell->SetBold(
false );
229 if(
m_italic->Get3StateValue() == wxCHK_CHECKED )
230 cell->SetItalic(
true );
231 else if(
m_italic->Get3StateValue() == wxCHK_UNCHECKED )
232 cell->SetItalic(
false );
273 if( !commit.Empty() )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
#define SKIP_CONNECTIVITY
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Class DIALOG_TABLECELL_PROPERTIES_BASE.
BITMAP_BUTTON * m_vAlignTop
BITMAP_BUTTON * m_vAlignCenter
BITMAP_BUTTON * m_hAlignRight
BITMAP_BUTTON * m_hAlignCenter
BITMAP_BUTTON * m_vAlignBottom
BITMAP_BUTTON * m_hAlignLeft
UNIT_BINDER m_textThickness
bool TransferDataFromWindow() override
std::vector< SCH_TABLECELL * > m_cells
@ TABLECELL_PROPS_EDIT_TABLE
void onHAlignButton(wxCommandEvent &aEvent)
void onEditTable(wxCommandEvent &aEvent) override
enum TABLECELL_PROPS_RETVALUE m_returnValue
DIALOG_TABLECELL_PROPERTIES(SCH_EDIT_FRAME *aParentFrame, std::vector< SCH_TABLECELL * > aCells)
UNIT_BINDER m_marginBottom
bool TransferDataToWindow() override
UNIT_BINDER m_marginRight
void onVAlignButton(wxCommandEvent &aEvent)
EDA_ITEM_FLAGS GetEditFlags() const
void SetFlags(EDA_ITEM_FLAGS aMask)
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic, bool aForDrawingSheet=false) const
bool HaveFontSelection() const
void SetFontSelection(KIFONT::FONT *aFont)
Common, abstract interface for edit frames.
virtual long long int GetValue()
Return the current value in Internal Units.
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
This file is part of the common library.
#define IN_EDIT
Item currently edited.
@ GR_TEXT_H_ALIGN_INDETERMINATE
@ GR_TEXT_V_ALIGN_INDETERMINATE
#define INDETERMINATE_STATE
Used for holding indeterminate values, such as with multiple selections holding different values or c...