KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_embedded_files.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 3
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, you may find one here:
18 * http://www.gnu.org/licenses/gpl-3.0.html
19 * or you may search the http://www.gnu.org website for the version 3 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef PANEL_EMBEDDED_FILES_H
25#define PANEL_EMBEDDED_FILES_H
26
28
29#include "grid_tricks.h"
30
31class EMBEDDED_FILES;
32
34{
35 enum
36 {
38 };
39
40public:
41 explicit EMBEDDED_FILES_GRID_TRICKS( WX_GRID* aGrid );
42
43 ~EMBEDDED_FILES_GRID_TRICKS() override = default;
44
45 void showPopupMenu( wxMenu& menu, wxGridEvent& aEvent ) override;
46 void doPopupSelection( wxCommandEvent& event ) override;
47
48protected:
49 //virtual void optionsEditor( int aRow ) = 0;
50
51 virtual bool supportsVisibilityColumn() { return false; }
52
54};
55
57{
58public:
59 PANEL_EMBEDDED_FILES( wxWindow* parent, EMBEDDED_FILES* aFiles );
60 ~PANEL_EMBEDDED_FILES() override;
61
62 bool TransferDataFromWindow() override;
63 bool TransferDataToWindow() override;
64 bool GetEmbedFonts() const { return m_cbEmbedFonts->GetValue(); }
65
66protected:
67 void onFontEmbedClick( wxCommandEvent& event ) override;
68 void onAddEmbeddedFile( wxCommandEvent& event ) override;
69 void onDeleteEmbeddedFile( wxCommandEvent& event ) override;
70 void onExportFiles( wxCommandEvent& event ) override;
71 void onSize( wxSizeEvent& event ) override;
72
73private:
74
75 void resizeGrid();
76
79};
80
81
82#endif // PANEL_EMBEDDED_FILES_H
~EMBEDDED_FILES_GRID_TRICKS() override=default
void doPopupSelection(wxCommandEvent &event) override
void showPopupMenu(wxMenu &menu, wxGridEvent &aEvent) override
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition: grid_tricks.h:61
Class PANEL_EMBEDDED_FILES_BASE.
EMBEDDED_FILES * m_files
void onFontEmbedClick(wxCommandEvent &event) override
void onDeleteEmbeddedFile(wxCommandEvent &event) override
bool TransferDataToWindow() override
void onSize(wxSizeEvent &event) override
EMBEDDED_FILES * m_localFiles
void onExportFiles(wxCommandEvent &event) override
void onAddEmbeddedFile(wxCommandEvent &event) override
bool TransferDataFromWindow() override
@ GRIDTRICKS_FIRST_CLIENT_ID
Definition: grid_tricks.h:48