home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2240.zip / wxWindows-2.4.0 / contrib / src / xrc / xh_stbox.cpp < prev    next >
C/C++ Source or Header  |  2001-12-29  |  1KB  |  51 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        xh_stbox.cpp
  3. // Purpose:     XRC resource for wxStaticBox
  4. // Author:      Brian Gavin
  5. // Created:     2000/09/09
  6. // RCS-ID:      $Id: xh_stbox.cpp,v 1.4 2001/12/29 16:14:04 VS Exp $
  7. // Copyright:   (c) 2000 Brian Gavin
  8. // Licence:     wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11. #ifdef __GNUG__
  12. #pragma implementation "xh_stbox.h"
  13. #endif
  14.  
  15. // For compilers that support precompilation, includes "wx.h".
  16. #include "wx/wxprec.h"
  17.  
  18. #ifdef __BORLANDC__
  19.     #pragma hdrstop
  20. #endif
  21.  
  22. #include "wx/xrc/xh_stbox.h"
  23. #include "wx/statbox.h"
  24.  
  25. wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() 
  26. : wxXmlResourceHandler() 
  27. {
  28.     AddWindowStyles();
  29. }
  30.  
  31. wxObject *wxStaticBoxXmlHandler::DoCreateResource()
  32.     XRC_MAKE_INSTANCE(box, wxStaticBox)
  33.  
  34.     box->Create(m_parentAsWindow,
  35.                 GetID(),
  36.                 GetText(wxT("label")),
  37.                 GetPosition(), GetSize(),
  38.                 GetStyle(),
  39.                 GetName());
  40.  
  41.     SetupWindow(box);
  42.     
  43.     return box;
  44. }
  45.  
  46. bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
  47. {
  48.     return IsOfClass(node, wxT("wxStaticBox"));
  49. }
  50.