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 (C) 2018 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 {
47
48 if( aShowCloseButton )
50
51 m_infoBar->ShowMessageFor( aErrorMsg, 8000, wxICON_ERROR, aType );
52 }
53
54protected:
57};
58
59
60#endif //DIALOG_EDIT_LIBRARY_TABLES_H
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:75
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
Definition: wx_infobar.cpp:304
void ShowMessageFor(const wxString &aMessage, int aTime, int aFlags=wxICON_INFORMATION, MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the infobar with the provided message and icon for a specific period of time.
Definition: wx_infobar.cpp:140
MESSAGE_TYPE
Sets the type of message for special handling if needed.
Definition: wx_infobar.h:93
@ GENERIC
GENERIC Are messages that do not have special handling.
void AddCloseButton(const wxString &aTooltip=_("Hide this message."))
Add the default close button to the infobar on the right side.
Definition: wx_infobar.cpp:294