KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_edit_library_tables.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 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_EDIT_LIBRARY_TABLES_H
22#define DIALOG_EDIT_LIBRARY_TABLES_H
23
24#include <dialog_shim.h>
25#include <wx/panel.h>
26#include <widgets/wx_infobar.h>
27
28
30{
31public:
34
35public:
36 DIALOG_EDIT_LIBRARY_TABLES( wxWindow* aParent, const wxString& aTitle );
37
38 void InstallPanel( wxPanel* aPanel );
39
40 bool TransferDataToWindow() override;
41 bool TransferDataFromWindow() override;
42
43 void ShowInfoBarError( const wxString& aErrorMsg, bool aShowCloseButton = false,
45 {
46 m_infoBar->RemoveAllButtons();
47
48 if( aShowCloseButton )
49 m_infoBar->AddCloseButton();
50
51 m_infoBar->ShowMessageFor( aErrorMsg, 8000, wxICON_ERROR, aType );
52 }
53
54protected:
57};
58
59
60#endif //DIALOG_EDIT_LIBRARY_TABLES_H
DIALOG_EDIT_LIBRARY_TABLES(wxWindow *aParent, const wxString &aTitle)
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
A modified version of the wxInfoBar class that allows us to:
Definition wx_infobar.h:76
MESSAGE_TYPE
Sets the type of message for special handling if needed.
Definition wx_infobar.h:94
@ GENERIC
GENERIC Are messages that do not have special handling.
Definition wx_infobar.h:95