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
27#include <embedded_files.h>
29
30#include "grid_tricks.h"
31
33{
34 enum
35 {
37 };
38
39public:
40 explicit EMBEDDED_FILES_GRID_TRICKS( WX_GRID* aGrid );
41
42 ~EMBEDDED_FILES_GRID_TRICKS() override = default;
43
44 void showPopupMenu( wxMenu& menu, wxGridEvent& aEvent ) override;
45 void doPopupSelection( wxCommandEvent& event ) override;
46
47protected:
48 //virtual void optionsEditor( int aRow ) = 0;
49
50 virtual bool supportsVisibilityColumn() { return false; }
51
53};
54
56{
57public:
58 PANEL_EMBEDDED_FILES( wxWindow* parent, EMBEDDED_FILES* aFiles );
59 ~PANEL_EMBEDDED_FILES() override;
60
61 bool TransferDataFromWindow() override;
62 bool TransferDataToWindow() override;
63 bool GetEmbedFonts() const { return m_cbEmbedFonts->GetValue(); }
64
66 EMBEDDED_FILES::EMBEDDED_FILE* AddEmbeddedFile( const wxString& aFileName );
67 bool RemoveEmbeddedFile( const wxString& aFileName );
68
69protected:
70 void onFontEmbedClick( wxCommandEvent& event ) override;
71 void onAddEmbeddedFiles( wxCommandEvent& event ) override;
72 void onDeleteEmbeddedFile( wxCommandEvent& event ) override;
73 void onExportFiles( wxCommandEvent& event ) override;
74 void onSize( wxSizeEvent& event ) override;
75
76private:
77
78 void resizeGrid();
79
82};
83
84
85#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.
bool RemoveEmbeddedFile(const wxString &aFileName)
EMBEDDED_FILES * m_files
EMBEDDED_FILES * GetLocalFiles()
void onFontEmbedClick(wxCommandEvent &event) override
void onAddEmbeddedFiles(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
EMBEDDED_FILES::EMBEDDED_FILE * AddEmbeddedFile(const wxString &aFileName)
bool TransferDataFromWindow() override
@ GRIDTRICKS_FIRST_CLIENT_ID
Definition: grid_tricks.h:48