--- /dev/null +++ src/include/xh_ctlcombo.h @@ -0,0 +1,31 @@ +////////////////////////////////////////////////////////////////////////// +// +// pgAdmin III - PostgreSQL Tools +// RCS-ID: $Id: xh_ctlcombo.h,v 1.1 2004/08/11 21:28:49 andreas Exp $ +// Copyright (C) 2002 - 2004, The pgAdmin Development Team +// This software is released under the Artistic Licence +// +// xh_ctlcombo.h - ctlComboBox handler +// +////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_XH_CTLCOMBO_H_ +#define _WX_XH_CTLCOMBO_H_ + + +#include "wx/xrc/xmlres.h" +#include "wx/xrc/xh_combo.h" + +//class WXDLLIMPEXP_XRC +class ctlComboBoxXmlHandler : public wxComboBoxXmlHandler +{ +DECLARE_DYNAMIC_CLASS(ctlComboBoxXmlHandler) +public: + ctlComboBoxXmlHandler() : wxComboBoxXmlHandler() {} + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif --- /dev/null +++ src/ui/xh_ctlcombo.cpp @@ -0,0 +1,31 @@ +////////////////////////////////////////////////////////////////////////// +// +// pgAdmin III - PostgreSQL Tools +// RCS-ID: $Id: xh_ctlcombo.cpp,v 1.1 2004/08/11 21:28:49 andreas Exp $ +// Copyright (C) 2002 - 2004, The pgAdmin Development Team +// This software is released under the Artistic Licence +// +// xh_ctlcombo.cpp - ctlComboBox handler +// +////////////////////////////////////////////////////////////////////////// + +#include "wx/wx.h" +#include "xh_ctlcombo.h" +#include "ctlComboBox.h" + +IMPLEMENT_DYNAMIC_CLASS(ctlComboBoxXmlHandler, wxComboBoxXmlHandler) + + +wxObject *ctlComboBoxXmlHandler::DoCreateResource() +{ + ctlComboBox *ctl=new ctlComboBox(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle()); + + SetupWindow(ctl); + + return ctl; +} + +bool ctlComboBoxXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("ctlComboBox")); +}