KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew/dialogs/dialog_tablecell_properties.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef DIALOG_TABLECELL_PROPERTIES_H
21#define DIALOG_TABLECELL_PROPERTIES_H
22
23#include <wx/hyperlink.h>
24#include <widgets/unit_binder.h>
25#include <wx/valnum.h>
26
28
29
31class PCB_TABLE;
32class PCB_TABLECELL;
35class wxHyperlinkCtrl;
36
38{
39public:
40 // The dialog can be closed for several reasons.
47
48 DIALOG_TABLECELL_PROPERTIES( PCB_BASE_EDIT_FRAME* aParentFrame, std::vector<PCB_TABLECELL*> aCells );
52
53 bool TransferDataToWindow() override;
54 bool TransferDataFromWindow() override;
55
56private:
57 void onBold( wxCommandEvent& aEvent ) override;
58 void onItalic( wxCommandEvent& aEvent ) override;
59 void onHAlignButton( wxCommandEvent& aEvent );
60 void onVAlignButton( wxCommandEvent& aEvent );
61 void onTextSize( wxCommandEvent& aEvent ) override;
62 void onAutoTextThickness( wxCommandEvent& aEvent ) override;
63 void onEditTable( wxCommandEvent& aEvent ) override;
64
65 virtual void onMultiLineTCLostFocus( wxFocusEvent& event ) { event.Skip(); }
66
67 void OnSystemColourChanged( wxSysColourChangedEvent& event );
68 void UpdateTheme( void );
69
70 void onSyntaxHelp( wxHyperlinkEvent& aEvent ) override;
71
72private:
75 std::vector<PCB_TABLECELL*> m_cells;
76
84
87
88 wxStyledTextCtrl* m_cellText;
90
95
97
98 TABLECELL_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
99};
100
101
102#endif //DIALOG_TABLECELL_PROPERTIES_H
bool TransferDataFromWindow() override
virtual void onMultiLineTCLostFocus(wxFocusEvent &event)
bool m_cellTextIsGenerated
Generated cell text, shown so the user can read it but not theirs to change.
void OnSystemColourChanged(wxSysColourChangedEvent &event)
void onHAlignButton(wxCommandEvent &aEvent)
void onAutoTextThickness(wxCommandEvent &aEvent) override
void onEditTable(wxCommandEvent &aEvent) override
DIALOG_TABLECELL_PROPERTIES(SCH_EDIT_FRAME *aParentFrame, std::vector< SCH_TABLECELL * > aCells)
bool TransferDataToWindow() override
void onSyntaxHelp(wxHyperlinkEvent &aEvent) override
void onVAlignButton(wxCommandEvent &aEvent)
Common, abstract interface for edit frames.
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.