KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema/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 <widgets/unit_binder.h>
25
26
27class SCH_EDIT_FRAME;
28class SCH_TABLE;
29class SCH_TABLECELL;
32
34{
35public:
36 // The dialog can be closed for several reasons.
43
44 DIALOG_TABLECELL_PROPERTIES( SCH_EDIT_FRAME* aParentFrame, std::vector<SCH_TABLECELL*> aCells );
46
49
50private:
51 void getContextualTextVars( const wxString& aCrossRef, wxArrayString* aTokens );
52 void onMultiLineTCLostFocus( wxFocusEvent& event ) override;
53
54 bool TransferDataToWindow() override;
55 bool TransferDataFromWindow() override;
56
57 void onHAlignButton( wxCommandEvent& aEvent );
58 void onVAlignButton( wxCommandEvent& aEvent );
59 void onTextColorPopup( wxCommandEvent& aEvent ) override;
60 void onFillColorPopup( wxCommandEvent& aEvent ) override;
61
62 void onEditTable( wxCommandEvent& aEvent ) override;
63 void OnFormattingHelp( wxHyperlinkEvent& aEvent ) override;
64
65 void OnSystemColourChanged( wxSysColourChangedEvent& event );
66
67 void UpdateTheme( void );
68
69private:
72 std::vector<SCH_TABLECELL*> m_cells;
75
81 wxStyledTextCtrl* m_cellText;
82
83 enum TABLECELL_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
84};
85
86
87#endif // DIALOG_TABLECELL_PROPERTIES_H
DIALOG_TABLECELL_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Table Cell Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnSystemColourChanged(wxSysColourChangedEvent &event)
void onTextColorPopup(wxCommandEvent &aEvent) override
void onFillColorPopup(wxCommandEvent &aEvent) override
DIALOG_TABLECELL_PROPERTIES(SCH_EDIT_FRAME *aParentFrame, std::vector< SCH_TABLECELL * > aCells)
void OnFormattingHelp(wxHyperlinkEvent &aEvent) override
void getContextualTextVars(const wxString &aCrossRef, wxArrayString *aTokens)
Schematic editor (Eeschema) main window.
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.