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#pragma once
25
26#include <embedded_files.h>
28
29#include "grid_tricks.h"
30
31#define NO_MARGINS 0x0001
32
33
35{
36 enum
37 {
39 };
40
41public:
42 explicit EMBEDDED_FILES_GRID_TRICKS( WX_GRID* aGrid );
43
44 ~EMBEDDED_FILES_GRID_TRICKS() override = default;
45
46 void showPopupMenu( wxMenu& menu, wxGridEvent& aEvent ) override;
47 void doPopupSelection( wxCommandEvent& event ) override;
48
49protected:
50 //virtual void optionsEditor( int aRow ) = 0;
51
52 virtual bool supportsVisibilityColumn() { return false; }
53
55};
56
57
59{
60public:
61 PANEL_EMBEDDED_FILES( wxWindow* aParent, EMBEDDED_FILES* aFiles, int aFlags = 0 );
62 ~PANEL_EMBEDDED_FILES() override;
63
64 bool TransferDataFromWindow() override;
65 bool TransferDataToWindow() override;
66 bool GetEmbedFonts() const { return m_cbEmbedFonts->GetValue(); }
67
69 EMBEDDED_FILES::EMBEDDED_FILE* AddEmbeddedFile( const wxString& aFileName );
70 bool RemoveEmbeddedFile( const wxString& aFileName );
71
72protected:
73 void onFontEmbedClick( wxCommandEvent& event ) override;
74 void onAddEmbeddedFiles( wxCommandEvent& event ) override;
75 void onDeleteEmbeddedFile( wxCommandEvent& event ) override;
76 void onExportFiles( wxCommandEvent& event ) override;
77
78private:
81};
~EMBEDDED_FILES_GRID_TRICKS() override=default
void doPopupSelection(wxCommandEvent &event) override
void showPopupMenu(wxMenu &menu, wxGridEvent &aEvent) override
GRID_TRICKS(WX_GRID *aGrid)
PANEL_EMBEDDED_FILES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
bool RemoveEmbeddedFile(const wxString &aFileName)
EMBEDDED_FILES * GetLocalFiles()
void onFontEmbedClick(wxCommandEvent &event) override
void onAddEmbeddedFiles(wxCommandEvent &event) override
PANEL_EMBEDDED_FILES(wxWindow *aParent, EMBEDDED_FILES *aFiles, int aFlags=0)
void onDeleteEmbeddedFile(wxCommandEvent &event) override
bool TransferDataToWindow() 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