26 #include <wx/infobar.h> 31 class wxHyperlinkCtrl;
81 WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr =
nullptr, wxWindowID aWinid = wxID_ANY );
111 void AddCloseButton(
const wxString& aTooltip =
_(
"Hide this message." ) );
127 void AddButton( wxHyperlinkCtrl* aHypertextButton );
136 void AddButton( wxWindowID aId,
const wxString& aLabel = wxEmptyString )
override;
163 void ShowMessageFor(
const wxString& aMessage,
int aTime,
int aFlags = wxICON_INFORMATION );
171 void ShowMessage(
const wxString& aMessage,
int aFlags = wxICON_INFORMATION )
override;
200 void QueueShowMessage(
const wxString& aMessage,
int aFlags = wxICON_INFORMATION );
238 void onTimer( wxTimerEvent& aEvent );
240 void onSize( wxSizeEvent& aEvent );
258 DECLARE_EVENT_TABLE()
280 const wxPoint& aPos = wxDefaultPosition,
281 const wxSize& aSize = wxSize( -1,-1 ),
282 long aStyle = wxTAB_TRAVERSAL,
283 const wxString& aName = wxEmptyString );
void ShowMessageFor(const wxString &aMessage, int aTime, int aFlags=wxICON_INFORMATION)
Show the infobar with the provided message and icon for a specific period of time.
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
A wxPanel derived class that hold an infobar and another control.
MESSAGE_TYPE
Sets the type of message for special handling if needed.
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
void onTimer(wxTimerEvent &aEvent)
Event handler for the automatic closing timer.
void onSize(wxSizeEvent &aEvent)
void updateAuiLayout(bool aShow)
Update the AUI pane to show or hide this infobar.
void onCloseButton(wxCommandEvent &aEvent)
Event handler for the close button.
GENERIC Are messages that do not have special handling.
wxTimer * m_showTimer
The timer counting the autoclose period.
void onShowInfoBar(wxCommandEvent &aEvent)
Event handler for showing the infobar using a wxCommandEvent of the type KIEVT_SHOW_INFOBAR.
OPT< std::function< void(void)> > m_callback
Optional callback made when closing infobar.
bool HasCloseButton() const
bool IsLocked()
Returns true if the infobar is being updated.
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
ID for the close button on the frame's infobar.
void SetCallback(std::function< void(void)> aCallback)
Provide a callback to be called when the infobar is dismissed (either by user action or timer).
void AddOtherItem(wxWindow *aOtherItem)
Add the other item to the panel.
WX_INFOBAR(wxWindow *aParent, wxAuiManager *aMgr=nullptr, wxWindowID aWinid=wxID_ANY)
Construct an infobar that can exist inside an AUI managed frame.
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
void QueueShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION)
Send the infobar an event telling it to show a message.
void DismissOutdatedSave()
Dismisses the infobar for outdated save warnings and updates the containing layout and AUI manager (i...
A modified version of the wxInfoBar class that allows us to:
void SetShowTime(int aTime)
Set the time period to show the infobar.
void QueueDismiss()
Send the infobar an event telling it to hide itself.
wxFlexGridSizer * m_mainSizer
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)
wxAuiManager * m_auiManager
The AUI manager that contains this infobar.
OUTDATED_SAVE Messages that should be cleared on save.
void onDismissInfoBar(wxCommandEvent &aEvent)
Event handler for dismissing the infobar using a wxCommandEvent of the type KIEVT_DISMISS_INFOBAR.
bool m_updateLock
True if this infobar requested the UI update.
wxDECLARE_EVENT(KIEVT_SHOW_INFOBAR, wxCommandEvent)
void AddInfoBar(WX_INFOBAR *aInfoBar)
Add the given infobar object to the panel.
MESSAGE_TYPE m_type
The type of message being displayed.
int m_showTime
The time to show the infobar. 0 = don't auto hide.
void AddCloseButton(const wxString &aTooltip=_("Hide this message."))
Add the default close button to the infobar on the right side.