YAPOG  0.0.1
Yet Another Pokemon Online Game
WidgetBorder.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_WIDGET_BORDER_HPP
2 # define YAPOG_WIDGET_BORDER_HPP
3 
9 
10 namespace yap
11 {
13  {
15 
16  public:
17 
19  {
22  : newContent (content)
23  {
24  }
25  };
26 
27  WidgetBorder ();
28  WidgetBorder (String file);
29  WidgetBorder (Texture& top,
30  Texture& topRight,
31  Texture& right,
32  Texture& botRight,
33  Texture& bot,
34  Texture& botLeft,
35  Texture& left,
36  Texture& topLeft,
37  bool isScalable);
38 
39  virtual ~WidgetBorder ();
40 
41  virtual bool IsFocusable () const;
43  void SetBorder (Vector2 size, uint width);
44  void SetBorder (Vector2 size);
45  const Texture& GetTexture () const;
46  void SetScalable (bool state);
47  uint GetWidth () const;
48 
49  private:
50  uint GetTextureWidth () const;
51  virtual Vector2 HandleGetSize () const;
52  virtual void HandleMove (const Vector2& offset);
53  virtual void HandleScale (const Vector2& factor);
54 
55  virtual void HandleDraw (IDrawingContext& context);
56 
57  virtual void HandleShow (bool isVisible);
58  virtual void HandleChangeColor (const sf::Color& color);
59 
60  virtual void HandleUpdate (const Time& dt);
61 
64 
72 
73  bool isInit;
74  bool basic_;
76 
77  };
78 } // namespace yap
79 
80 #endif /* YAPOG_WIDGET_BORDER_HPP! */