KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kistatusbar_popup.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 2
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, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef KISTATUSBAR_POPUP_H
21#define KISTATUSBAR_POPUP_H
22
23#include <typeinfo>
24
25#include <wx/popupwin.h>
26
33class KISTATUSBAR_POPUP : public wxPopupTransientWindow
34{
35public:
36 explicit KISTATUSBAR_POPUP( wxWindow* aParent );
37
41 void PopupAt( const wxPoint& aCorner );
42
44 using wxPopupTransientWindow::DismissAndNotify;
45
51 static bool IsDismissingClick( const std::type_info& aPopupType );
52
53protected:
54 void OnDismiss() override;
55
56private:
57 void onCharHook( wxKeyEvent& aEvent );
58
59 static long long s_lastDismissed;
60 static const std::type_info* s_lastDismissedType;
61};
62
63#endif // KISTATUSBAR_POPUP_H
KISTATUSBAR_POPUP(wxWindow *aParent)
void OnDismiss() override
void PopupAt(const wxPoint &aCorner)
Show the popup with its bottom-right corner at aCorner, in screen coordinates.
void onCharHook(wxKeyEvent &aEvent)
static const std::type_info * s_lastDismissedType
static long long s_lastDismissed
static bool IsDismissingClick(const std::type_info &aPopupType)
Return true, once, for a click that arrives just after a popup of type aPopupType was dismissed.