custombgwin.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/univ/custombgwin.h
  3. // Purpose: wxUniv implementation of wxCustomBackgroundWindow.
  4. // Author: Vadim Zeitlin
  5. // Created: 2011-10-10
  6. // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_UNIV_CUSTOMBGWIN_H_
  10. #define _WX_UNIV_CUSTOMBGWIN_H_
  11. // ----------------------------------------------------------------------------
  12. // wxCustomBackgroundWindow
  13. // ----------------------------------------------------------------------------
  14. template <class W>
  15. class wxCustomBackgroundWindow : public W,
  16. public wxCustomBackgroundWindowBase
  17. {
  18. public:
  19. typedef W BaseWindowClass;
  20. wxCustomBackgroundWindow() { }
  21. protected:
  22. virtual void DoSetBackgroundBitmap(const wxBitmap& bmp)
  23. {
  24. // We have support for background bitmap even at the base class level.
  25. BaseWindowClass::SetBackground(bmp, wxALIGN_NOT, wxTILE);
  26. }
  27. wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W);
  28. };
  29. #endif // _WX_UNIV_CUSTOMBGWIN_H_