kicad/include/widgets/kistatusbar.h

83 lines
2.5 KiB
C
Raw Normal View History

/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef KISTATUSBAR_H
#define KISTATUSBAR_H
class wxGauge;
class wxButton;
class wxStaticText;
class BITMAP_BUTTON;
class KISTATUSBAR : public wxStatusBar
{
public:
KISTATUSBAR( int aNumberFields, wxWindow* parent, wxWindowID id );
public:
/**
* Shows the background progress bar
*/
void ShowBackgroundProgressBar( bool aCancellable = false );
/**
* Hides the background progress bar
*/
void HideBackgroundProgressBar();
/**
* Sets the current progress of the progress bar
*/
void SetBackgroundProgress( int aAmount );
/**
* Sets the maX progress of the progress bar
*/
void SetBackgroundProgressMax( int aAmount );
/**
* Sets the status text that displays next to the progress bar
*/
void SetBackgroundStatusText( const wxString& aTxt );
/**
* Sets the notification count on the notifications button
* A value of 0 will hide the count
*/
void SetNotificationCount( int aCount );
private:
2023-08-05 02:12:52 +00:00
void onSize( wxSizeEvent& aEvent );
void onBackgroundProgressClick( wxMouseEvent& aEvent );
void onNotificationsIconClick( wxCommandEvent& aEvent );
private:
wxGauge* m_backgroundProgressBar;
wxButton* m_backgroundStopButton;
wxStaticText* m_backgroundTxt;
BITMAP_BUTTON* m_notificationsButton;
int m_normalFieldsCount;
};
#endif