YAPOG  0.0.1
Yet Another Pokemon Online Game
WidgetBackground.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_WIDGET_BACKGROUND_HPP
2 # define YAPOG_WIDGET_BACKGROUND_HPP
3 
4 # include "YAPOG/Macros.hpp"
9 
10 namespace yap
11 {
13  {
15 
16  public:
17 
19  {
22  : newContent (content)
23  {
24  }
25  };
26 
28  WidgetBackground (String file, bool resize);
29  virtual ~WidgetBackground ();
30 
31  virtual bool IsFocusable () const;
32  void SetBackground (String file, uint width, uint height, bool resize);
33  void SetBackground (Vector2 size);
34  const Texture& GetBackground () const;
36  void SetFixed (bool state);
37  bool GetFixed () const;
38 
39  private:
40  virtual Vector2 HandleGetSize () const;
41 
42  virtual void HandleMove (const Vector2& offset);
43  virtual void HandleScale (const Vector2& factor);
44 
45  virtual void HandleDraw (IDrawingContext& context);
46 
47  virtual void HandleShow (bool isVisible);
48  virtual void HandleChangeColor (const sf::Color& color);
49 
50  virtual void HandleUpdate (const Time& dt);
51 
54  bool resize_;
55  bool isInit;
56  bool fixed_;
57 
58  };
59 } // namespace yap
60 
61 #endif /* YAPOG_WIDGET_BACKGROUND_HPP! */