Add XRC handler for wxInfoBar

Update the schema and the sample to show it in action.

Closes https://github.com/wxWidgets/wxWidgets/pull/1564
This commit is contained in:
Ilya Sinitsyn
2019-09-26 17:08:31 +07:00
committed by Vadim Zeitlin
parent 68b36aed6d
commit 7f91481294
27 changed files with 404 additions and 3 deletions

View File

@@ -45,6 +45,7 @@
#include "wx/xrc/xh_html.h"
#include "wx/xrc/xh_htmllbox.h"
#include "wx/xrc/xh_hyperlink.h"
#include "wx/xrc/xh_infobar.h"
#include "wx/xrc/xh_listb.h"
#include "wx/xrc/xh_listc.h"
#include "wx/xrc/xh_listbk.h"

View File

@@ -0,0 +1,36 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_infobar.h
// Purpose: XML resource handler for wxInfoBar
// Author: Ilya Sinitsyn
// Created: 2019-09-25
// Copyright: (c) 2019 TT-Solutions SARL
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_INFOBAR_H_
#define _WX_XH_INFOBAR_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_INFOBAR
class WXDLLIMPEXP_XRC wxInfoBarXmlHandler : public wxXmlResourceHandler
{
wxDECLARE_DYNAMIC_CLASS(wxInfoBarXmlHandler);
public:
wxInfoBarXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
wxShowEffect GetShowEffect(wxString const& param);
bool m_insideBar;
wxString m_effectNames[wxSHOW_EFFECT_MAX];
};
#endif // wxUSE_XRC && wxUSE_INFOBAR
#endif // _WX_XH_INFOBAR_H_