KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kistatusbar.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) 2023 Mark Roszko <[email protected]>
5 * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef KISTATUSBAR_H
26#define KISTATUSBAR_H
27
28class wxGauge;
29class wxButton;
30class wxStaticText;
31class BITMAP_BUTTON;
32
42class KISTATUSBAR : public wxStatusBar
43{
44public:
45 KISTATUSBAR( int aNumberFields, wxWindow* parent, wxWindowID id );
46
47public:
53 void SetEllipsedTextField( const wxString& aText, int aFieldId );
54
58 void ShowBackgroundProgressBar( bool aCancellable = false );
59
64
68 void SetBackgroundProgress( int aAmount );
69
73 void SetBackgroundProgressMax( int aAmount );
74
78 void SetBackgroundStatusText( const wxString& aTxt );
79
84 void SetNotificationCount( int aCount );
85
86private:
87 void onSize( wxSizeEvent& aEvent );
88 void onBackgroundProgressClick( wxMouseEvent& aEvent );
89 void onNotificationsIconClick( wxCommandEvent& aEvent );
90
91private:
94 wxStaticText* m_backgroundTxt;
97};
98
99#endif
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:41
KISTATUSBAR is a wxStatusBar suitable for Kicad manager.
Definition: kistatusbar.h:43
BITMAP_BUTTON * m_notificationsButton
Definition: kistatusbar.h:95
void SetBackgroundStatusText(const wxString &aTxt)
Sets the status text that displays next to the progress bar.
void onBackgroundProgressClick(wxMouseEvent &aEvent)
void onSize(wxSizeEvent &aEvent)
int m_normalFieldsCount
Definition: kistatusbar.h:96
void SetBackgroundProgress(int aAmount)
Sets the current progress of the progress bar.
wxGauge * m_backgroundProgressBar
Definition: kistatusbar.h:92
wxButton * m_backgroundStopButton
Definition: kistatusbar.h:93
void SetEllipsedTextField(const wxString &aText, int aFieldId)
Set the text in a field using wxELLIPSIZE_MIDDLE option to adjust the text size to the field size (un...
void HideBackgroundProgressBar()
Hides the background progress bar.
void onNotificationsIconClick(wxCommandEvent &aEvent)
void SetBackgroundProgressMax(int aAmount)
Sets the maX progress of the progress bar.
wxStaticText * m_backgroundTxt
Definition: kistatusbar.h:94
void ShowBackgroundProgressBar(bool aCancellable=false)
Shows the background progress bar.
void SetNotificationCount(int aCount)
Sets the notification count on the notifications button A value of 0 will hide the count.