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
53private:
54 bool TransferDataToWindow() override;
55 bool TransferDataFromWindow() override;
56
57 void onHAlignButton( wxCommandEvent& aEvent );
58 void onVAlignButton( wxCommandEvent& aEvent );
59 void onTextSize( wxCommandEvent& aEvent ) override;
60 void onAutoTextThickness( wxCommandEvent& aEvent ) override;
61 void onBoldToggle( wxCommandEvent& aEvent ) override;
62 void onEditTable( wxCommandEvent& aEvent ) override;
63
64 virtual void onMultiLineTCLostFocus( wxFocusEvent& event ) { event.Skip(); }
65
66 void OnSystemColourChanged( wxSysColourChangedEvent& event );
67 void UpdateTheme( void );
68
69 void onSyntaxHelp( wxHyperlinkEvent& aEvent ) override;
70
71private:
74 std::vector<PCB_TABLECELL*> m_cells;
75
83
84 wxStyledTextCtrl* m_cellText;
86
88
89 enum TABLECELL_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
90};
91
92
93#endif //DIALOG_TABLECELL_PROPERTIES_H
bool TransferDataFromWindow() override
virtual void onMultiLineTCLostFocus(wxFocusEvent &event)
void onBoldToggle(wxCommandEvent &aEvent) override
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.