YAPOG  0.0.1
Yet Another Pokemon Online Game
GridMenu.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_GRIDMENU_HPP
2 # define YAPOG_GRIDMENU_HPP
3 
12 
13 namespace yap
14 {
15  class VerticalLayout;
16  class HorizontalLayout;
17 
18  class YAPOG_LIB GridMenu : public BaseWidget
19  {
21 
22  public:
24 
25  GridMenu (const Vector2& size, Padding ext, Padding in, bool extend);
26  void AddChild (MenuItem& child, LayoutBox::Align align
27  = LayoutBox::Align::CENTER);
28  virtual ~GridMenu ();
29 
30  void SetSelectedBackground (WidgetBackground& background);
31  void SetSelectedBorder (WidgetBorder& border);
32  virtual bool IsFocusable () const;
33  Vector2 GetCurrentSelect () const;
34 
35  protected:
36  virtual Vector2 HandleGetSize () const;
37  virtual void HandleMove (const Vector2& offset);
38  virtual void HandleScale (const Vector2& factor);
39 
40  virtual void HandleDraw (IDrawingContext& context);
41 
42  virtual void HandleShow (bool isVisible);
43  virtual void HandleChangeColor (const sf::Color& color);
44 
45  virtual void HandleUpdate (const Time& dt);
46  bool HandleOnEvent (const GuiEvent& guiEvent);
47 
48  private:
49  void SetFormItem ();
50  void SetUnformItem ();
51 
56 
61  bool isFixed_;
64 
65  };
66 } // namespace yap
67 
68 #endif /* YAPOG_GRIDMENU_HPP! */