OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
backgroundimage.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_MWGUI_BACKGROUNDIMAGE_H
2 #define OPENMW_MWGUI_BACKGROUNDIMAGE_H
3 
4 #include <MyGUI_ImageBox.h>
5 
6 namespace MWGui
7 {
8 
12  class BackgroundImage : public MyGUI::ImageBox
13  {
14  MYGUI_RTTI_DERIVED(BackgroundImage)
15 
16  public:
17  BackgroundImage() : mChild(NULL), mAspect(0) {}
18 
23  void setBackgroundImage (const std::string& image, bool fixedRatio=true, bool stretch=true);
24 
25  virtual void setSize (const MyGUI::IntSize &_value);
26  virtual void setCoord (const MyGUI::IntCoord &_value);
27 
28  private:
29  MyGUI::ImageBox* mChild;
30  double mAspect;
31 
32  void adjustSize();
33  };
34 
35 }
36 
37 #endif
void adjustSize()
Definition: backgroundimage.cpp:37
MyGUI::ImageBox * mChild
Definition: backgroundimage.hpp:29
void setBackgroundImage(const std::string &image, bool fixedRatio=true, bool stretch=true)
Definition: backgroundimage.cpp:8
double mAspect
Definition: backgroundimage.hpp:30
BackgroundImage()
Definition: backgroundimage.hpp:17
virtual void setSize(const MyGUI::IntSize &_value)
Definition: backgroundimage.cpp:50
virtual void setCoord(const MyGUI::IntCoord &_value)
Definition: backgroundimage.cpp:56
A variant of MyGUI::ImageBox with aspect ratio correction using black bars.
Definition: backgroundimage.hpp:12