30#include <unordered_map>
31#include <wx/statusbr.h>
63 KISTATUSBAR(
int aNumberFields, wxWindow* parent, wxWindowID
id,
115 void AddWarningMessages(
const wxString& aSource,
const std::vector<KI_ERROR>& aMessages );
137 virtual void SetStatusWidths(
int aSize,
const int* aWidths )
override;
140 void onSize( wxSizeEvent& aEvent );
159 std::optional<int> fieldIndex(
FIELD aField )
const;
BITMAP_BUTTON * m_notificationsButton
void AddWarningMessages(const wxString &aSource, const wxString &aMessages)
Add warning/error messages (not thread-safe, use the std::vector<KI_ERROR> variant from other threads...
void onLoadWarningsIconClick(wxCommandEvent &aEvent)
void SetBackgroundStatusText(const wxString &aTxt)
Set the status text that displays next to the progress bar.
BITMAP_BUTTON * m_warningButton
wxString m_backgroundRawText
Unellipsized background status text.
size_t GetLoadWarningCount() const
Get current message count (thread-safe).
void onBackgroundProgressClick(wxMouseEvent &aEvent)
KISTATUSBAR(int aNumberFields, wxWindow *parent, wxWindowID id, STYLE_FLAGS aFlags=DEFAULT_STYLE)
void updateAuxFieldWidths()
std::unordered_map< wxString, std::vector< KI_ERROR > > m_warningMessages
void onSize(wxSizeEvent &aEvent)
void ClearWarningMessages(const wxString &aSource=wxEmptyString)
Clears all warning messages from the given source (or all sources if aSource is empty)
wxString m_savedStatusText
Saved text from adjacent field during background jobs.
std::mutex m_warningMutex
Protects m_warningMessages.
void updateBackgroundText()
void SetBackgroundProgress(int aAmount)
Set the current progress of the progress bar.
wxGauge * m_backgroundProgressBar
wxButton * m_backgroundStopButton
void CloseWarningList()
Close the warning message overlay panel, if it is shown.
void updateWarningUI()
Update warning button visibility and badge (main thread only)
virtual void SetStatusWidths(int aSize, const int *aWidths) override
std::map< wxString, std::vector< KI_ERROR > > GetWarningMessages() const
Get a copy of all stored warning/error messages, grouped by source and sorted by source name for stab...
std::vector< int > m_fieldWidths
void HideBackgroundProgressBar()
Hide the background progress bar.
void onNotificationsIconClick(wxCommandEvent &aEvent)
void SetBackgroundProgressMax(int aAmount)
Set the max progress of the progress bar.
void PositionWarningPanel()
Position the warning message overlay panel above the warning icon.
wxStaticText * m_backgroundTxt
void ShowBackgroundProgressBar(bool aCancellable=false)
Show the background progress bar.
static constexpr auto DEFAULT_STYLE
STATUSBAR_WARNING_LIST * m_warningList
Overlay panel listing the warning messages.
void SetNotificationCount(int aCount)
Set the notification count on the notifications button.
PCB_VIA::VIA_PARAMETER_ERROR::FIELD FIELD