KiCad PCB EDA Suite
Loading...
Searching...
No Matches
status_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 (C) 2014-2015 CERN
5
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
* Author: Tomasz Wlostowski <
[email protected]
>
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* as published by the Free Software Foundation; either version 2
11
* of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20
*/
21
22
#ifndef __STATUS_POPUP_H_
23
#define __STATUS_POPUP_H_
24
25
26
#include <
math/vector2d.h
>
27
#include <wx/popupwin.h>
28
#include <wx/timer.h>
29
#include <wx/panel.h>
30
#include <wx/stattext.h>
31
#include <wx/sizer.h>
32
#include <wx/statbmp.h>
33
34
class
EDA_DRAW_FRAME
;
35
40
class
STATUS_POPUP
:
public
wxPopupWindow
41
{
42
public
:
43
STATUS_POPUP
( wxWindow* aParent );
44
virtual
~STATUS_POPUP
() { Hide(); }
45
46
virtual
void
Popup
( wxWindow* aFocus =
nullptr
);
47
virtual
void
PopupFor
(
int
aMsecs );
48
virtual
void
Move
(
const
wxPoint& aWhere );
49
virtual
void
Move
(
const
VECTOR2I
& aWhere );
50
56
void
Expire
(
int
aMsecs );
57
58
wxWindow*
GetPanel
() {
return
m_panel
; }
59
60
protected
:
61
void
updateSize
();
62
63
void
onCharHook
( wxKeyEvent& aEvent );
64
66
void
onExpire
( wxTimerEvent& aEvent );
67
68
protected
:
69
wxPanel*
m_panel
;
70
wxBoxSizer*
m_topSizer
;
71
wxTimer
m_expireTimer
;
72
};
73
74
78
class
STATUS_TEXT_POPUP
:
public
STATUS_POPUP
79
{
80
public
:
81
STATUS_TEXT_POPUP
( wxWindow* aParent );
82
virtual
~STATUS_TEXT_POPUP
() {}
83
89
void
SetText
(
const
wxString& aText );
90
96
void
SetTextColor
(
const
wxColour& aColor );
97
98
protected
:
99
wxStaticText*
m_statusLine
;
100
};
101
102
103
#endif
/* __STATUS_POPUP_H_*/
EDA_DRAW_FRAME
The base class for create windows for drawing purpose.
Definition
eda_draw_frame.h:83
STATUS_POPUP::onExpire
void onExpire(wxTimerEvent &aEvent)
Expire timer even handler.
Definition
status_popup.cpp:109
STATUS_POPUP::GetPanel
wxWindow * GetPanel()
Definition
status_popup.h:58
STATUS_POPUP::Expire
void Expire(int aMsecs)
Hide the popup after a specified time.
Definition
status_popup.cpp:96
STATUS_POPUP::PopupFor
virtual void PopupFor(int aMsecs)
Definition
status_popup.cpp:77
STATUS_POPUP::m_topSizer
wxBoxSizer * m_topSizer
Definition
status_popup.h:70
STATUS_POPUP::m_expireTimer
wxTimer m_expireTimer
Definition
status_popup.h:71
STATUS_POPUP::updateSize
void updateSize()
Definition
status_popup.cpp:102
STATUS_POPUP::STATUS_POPUP
STATUS_POPUP(wxWindow *aParent)
Transient mouse following popup window implementation.
Definition
status_popup.cpp:32
STATUS_POPUP::m_panel
wxPanel * m_panel
Definition
status_popup.h:69
STATUS_POPUP::Popup
virtual void Popup(wxWindow *aFocus=nullptr)
Definition
status_popup.cpp:70
STATUS_POPUP::Move
virtual void Move(const wxPoint &aWhere)
Definition
status_popup.cpp:90
STATUS_POPUP::onCharHook
void onCharHook(wxKeyEvent &aEvent)
Definition
status_popup.cpp:54
STATUS_POPUP::~STATUS_POPUP
virtual ~STATUS_POPUP()
Definition
status_popup.h:44
STATUS_TEXT_POPUP::SetTextColor
void SetTextColor(const wxColour &aColor)
Change text color.
Definition
status_popup.cpp:134
STATUS_TEXT_POPUP::SetText
void SetText(const wxString &aText)
Display a text.
Definition
status_popup.cpp:127
STATUS_TEXT_POPUP::~STATUS_TEXT_POPUP
virtual ~STATUS_TEXT_POPUP()
Definition
status_popup.h:82
STATUS_TEXT_POPUP::m_statusLine
wxStaticText * m_statusLine
Definition
status_popup.h:99
STATUS_TEXT_POPUP::STATUS_TEXT_POPUP
STATUS_TEXT_POPUP(wxWindow *aParent)
Definition
status_popup.cpp:115
vector2d.h
VECTOR2I
VECTOR2< int32_t > VECTOR2I
Definition
vector2d.h:683
src
include
status_popup.h
Generated on Fri Jun 26 2026 00:05:37 for KiCad PCB EDA Suite by
1.13.2