home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2233.zip / wxOS2-2_3_3.zip / wxWindows-2.3.3 / contrib / src / xrc / xh_stbmp.cpp < prev    next >
C/C++ Source or Header  |  2002-08-21  |  1KB  |  51 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        xh_stbmp.cpp
  3. // Purpose:     XRC resource for wxStaticBitmap
  4. // Author:      Vaclav Slavik
  5. // Created:     2000/04/22
  6. // RCS-ID:      $Id: xh_stbmp.cpp,v 1.5 2002/08/20 22:28:15 VS Exp $
  7. // Copyright:   (c) 2000 Vaclav Slavik
  8. // Licence:     wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11. #ifdef __GNUG__
  12. #pragma implementation "xh_stbmp.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_stbmp.h"
  23. #include "wx/statbmp.h"
  24.  
  25. wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
  26. : wxXmlResourceHandler() 
  27. {
  28.     AddWindowStyles();
  29. }
  30.  
  31. wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
  32.     XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
  33.  
  34.     bmp->Create(m_parentAsWindow,
  35.                 GetID(),
  36.                 GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
  37.                 GetPosition(), GetSize(),
  38.                 GetStyle(),
  39.                 GetName());
  40.  
  41.     SetupWindow(bmp);
  42.     
  43.     return bmp;
  44. }
  45.  
  46. bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
  47. {
  48.     return IsOfClass(node, wxT("wxStaticBitmap"));
  49. }
  50.