27#include <wx/infobar.h> 
   85    WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr = 
nullptr, wxWindowID aWinid = wxID_ANY );
 
  119    void AddCloseButton( 
const wxString& aTooltip = 
_( 
"Hide this message." ) );
 
  135    void AddButton( wxHyperlinkCtrl* aHypertextButton );
 
  144    void AddButton( wxWindowID aId, 
const wxString& aLabel = wxEmptyString ) 
override;
 
  173    void ShowMessageFor( 
const wxString& aMessage, 
int aTime, 
int aFlags = wxICON_INFORMATION,
 
  182    void ShowMessage( 
const wxString& aMessage, 
int aFlags = wxICON_INFORMATION ) 
override;
 
  205    void QueueShowMessage( 
const wxString& aMessage, 
int aFlags = wxICON_INFORMATION );
 
  248    void onTimer( wxTimerEvent& aEvent );
 
  250    void onSize( wxSizeEvent& aEvent );
 
  269    DECLARE_EVENT_TABLE()
 
 
  291                       const wxPoint& aPos = wxDefaultPosition,
 
  292                       const wxSize& aSize = wxSize( -1,-1 ),
 
  293                       long aStyle = wxTAB_TRAVERSAL,
 
  294                       const wxString& aName = wxEmptyString );
 
 
EDA_INFOBAR_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
 
wxFlexGridSizer * m_mainSizer
 
void AddInfoBar(WX_INFOBAR *aInfoBar)
Add the given infobar object to the panel.
 
void AddOtherItem(wxWindow *aOtherItem)
Add the other item to the panel.
 
INFOBAR_REPORTER(WX_INFOBAR *aInfoBar)
 
void Finalize()
Update the infobar with the reported text.
 
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
 
std::unique_ptr< wxString > m_message
 
virtual ~INFOBAR_REPORTER()
 
bool HasMessage() const override
Returns true if any messages were reported.
 
A pure virtual class used to derive REPORTER objects from.
 
A modified version of the wxInfoBar class that allows us to:
 
void SetShowTime(int aTime)
Set the time period to show the infobar.
 
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
 
void ShowMessageFor(const wxString &aMessage, int aTime, int aFlags=wxICON_INFORMATION, MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the infobar with the provided message and icon for a specific period of time.
 
bool HasCloseButton() const
 
MESSAGE_TYPE m_type
The type of message being displayed.
 
void updateAuiLayout(bool aShow)
Update the AUI pane to show or hide this infobar.
 
std::optional< std::function< void(void)> > m_callback
Optional callback made when closing infobar.
 
bool IsLocked()
Returns true if the infobar is being updated.
 
wxString m_message
The original message without wrapping.
 
int m_showTime
The time to show the infobar. 0 = don't auto hide.
 
bool m_updateLock
True if this infobar requested the UI update.
 
void onShowInfoBar(wxCommandEvent &aEvent)
Event handler for showing the infobar using a wxCommandEvent of the type KIEVT_SHOW_INFOBAR.
 
void onDismissInfoBar(wxCommandEvent &aEvent)
Event handler for dismissing the infobar using a wxCommandEvent of the type KIEVT_DISMISS_INFOBAR.
 
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
 
MESSAGE_TYPE
Sets the type of message for special handling if needed.
 
@ OUTDATED_SAVE
OUTDATED_SAVE Messages that should be cleared on save.
 
@ GENERIC
GENERIC Are messages that do not have special handling.
 
void QueueShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION)
Send the infobar an event telling it to show a message.
 
WX_INFOBAR(wxWindow *aParent, wxAuiManager *aMgr=nullptr, wxWindowID aWinid=wxID_ANY)
Construct an infobar that can exist inside an AUI managed frame.
 
void onCloseButton(wxCommandEvent &aEvent)
Event handler for the close button.
 
wxBitmapButton * GetCloseButton() const
 
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
 
void onThemeChange(wxSysColourChangedEvent &aEvent)
Event handler for the color theme change event.
 
void AddCloseButton(const wxString &aTooltip=_("Hide this message."))
Add the default close button to the infobar on the right side.
 
MESSAGE_TYPE GetMessageType() const
 
void SetCallback(std::function< void(void)> aCallback)
Provide a callback to be called when the infobar is dismissed (either by user action or timer).
 
wxTimer * m_showTimer
The timer counting the autoclose period.
 
void onTimer(wxTimerEvent &aEvent)
Event handler for the automatic closing timer.
 
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
 
wxAuiManager * m_auiManager
The AUI manager that contains this infobar.
 
void onSize(wxSizeEvent &aEvent)
 
void QueueDismiss()
Send the infobar an event telling it to hide itself.
 
@ ID_CLOSE_INFOBAR
ID for the close button on the frame's infobar.
 
wxDECLARE_EVENT(KIEVT_SHOW_INFOBAR, wxCommandEvent)