Aether
SDL2 based UI Framework for NX
ListHeadingHelp.hpp
1 #ifndef AETHER_LISTHEADINGHELP_HPP
2 #define AETHER_LISTHEADINGHELP_HPP
3 
4 #include "Aether/base/Container.hpp"
5 #include "Aether/horizon/button/HelpButton.hpp"
6 #include "Aether/horizon/list/ListHeading.hpp"
7 
8 namespace Aether {
12  class ListHeadingHelp : public Container {
13  private:
15  ListHeading * heading;
17  HelpButton * help;
18 
22  void positionElements();
23 
24  public:
32  ListHeadingHelp(std::string s, std::function<void()> f);
33 
40 
46  void setHelpColour(Colour c);
47 
54 
60  void setRectColour(Colour c);
61 
68 
74  void setTextColour(Colour c);
75 
81  void onHelpPressed(std::function<void()> f);
82 
89  void setW(int w);
90 
97  void setH(int h);
98  };
99 };
100 
101 #endif
void onHelpPressed(std::function< void()> f)
Sets the function to invoke when the help button is pressed.
A ListHeading is a small rectangle with text alongside, usually used in a list.
Definition: ListHeading.hpp:12
void setRectColour(Colour c)
Set the rectangle colour.
void setH(int h)
Adjusts the list heading height. Repositions elements as necessary.
A container is an element that contains other elements. It implements the required behaviour to navig...
Definition: Container.hpp:16
void setTextColour(Colour c)
Set the text colour.
Colour getTextColour()
Get the text colour.
HelpButton is a round button displaying a question mark as seen in Horizon.
Definition: HelpButton.hpp:11
void setW(int w)
Adjusts the list heading width. Repositions elements as necessary.
A ListHeading but with a help icon that&#39;s right aligned.
Definition: ListHeadingHelp.hpp:12
int w()
Returns width of element.
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition: Colour.hpp:9
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
Colour getRectColour()
Get the rectangle colour.
void setHelpColour(Colour c)
Set the help colour.
ListHeadingHelp(std::string s, std::function< void()> f)
Construct a new List Heading Help object. Auto positions elements when instantiated.
Colour getHelpColour()
Get the help colour.