KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_plugin_options.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 (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
21#ifndef _DIALOG_PLUGIN_OPTIONS_H_
22#define _DIALOG_PLUGIN_OPTIONS_H_
23
25#include <core/utf8.h>
32{
33public:
34 DIALOG_PLUGIN_OPTIONS( wxWindow* aParent, const wxString& aNickname,
35 const std::map<std::string, UTF8>& aPluginOptions, const wxString& aFormattedOptions,
36 wxString* aResult );
37
38 ~DIALOG_PLUGIN_OPTIONS() override;
39
40 bool TransferDataToWindow() override;
41
42 bool TransferDataFromWindow() override;
43
44private:
45 const wxString& m_callers_options;
46 wxString* m_result;
47 std::map<std::string, UTF8> m_choices;
50
51 int appendRow();
52
53 void appendOption();
54
55 //-----<event handlers>------------------------------------------------------
56 void onListBoxItemSelected( wxCommandEvent& event ) override;
57
58 void onListBoxItemDoubleClicked( wxCommandEvent& event ) override;
59
60 void onAppendOption( wxCommandEvent& ) override;
61
62 void onAppendRow( wxCommandEvent& ) override;
63
64 void onDeleteRow( wxCommandEvent& ) override;
65
66 void onGridCellChange( wxGridEvent& aEvent ) override;
67
68 void onUpdateUI( wxUpdateUIEvent& ) override;
69
70 void onSize( wxSizeEvent& aEvent ) override;
71};
72
73
74#endif // _DIALOG_PLUGIN_OPTIONS_H_
75
Class DIALOG_PLUGIN_OPTIONS_BASE.
DIALOG_PLUGIN_OPTIONS is an options editor in the form of a two column name/value spreadsheet like (t...
void onAppendOption(wxCommandEvent &) override
void onListBoxItemSelected(wxCommandEvent &event) override
void onDeleteRow(wxCommandEvent &) override
bool TransferDataToWindow() override
std::map< std::string, UTF8 > m_choices
const wxString & m_callers_options
void onUpdateUI(wxUpdateUIEvent &) override
void onSize(wxSizeEvent &aEvent) override
bool TransferDataFromWindow() override
void onGridCellChange(wxGridEvent &aEvent) override
void onListBoxItemDoubleClicked(wxCommandEvent &event) override
void onAppendRow(wxCommandEvent &) override