4#ifndef INCLUDE_FIFECHAN_WIDGETS_ACTIVITYBAR_HPP_
5#define INCLUDE_FIFECHAN_WIDGETS_ACTIVITYBAR_HPP_
8#include "fifechan/platform.hpp"
14#include "fifechan/listeners/actionlistener.hpp"
15#include "fifechan/widgets/container.hpp"
123 unsigned int mSpacing{4};
129 std::list<ActionListener*> mActionListeners;
Represents an action trigger (e.g., button click).
void hideAll()
Hides all panels (toggles all buttons to unselected state).
void showAll()
Shows all panels (toggles all buttons to selected state).
void addActionListener(ActionListener *listener)
Adds an action listener to the activity bar.
void resizeToContent(bool recursion=true) override
Resizes the widget's size to fit the content exactly, calls recursively all childs.
void adjustSize() override
Resizes the widget's size to fit the content exactly.
ActivityBar(int width=48)
Constructor.
void setSpacing(unsigned int spacing)
Sets the spacing between items.
void removeActionListener(ActionListener *listener)
Removes an action listener from the activity bar.
unsigned int getSpacing() const
Gets the spacing between items.
void setWidth(int width) override
Sets the width of the activity bar.
void action(ActionEvent const &event) override
Handles an action event emitted by a widget.
int getWidth() const
Gets the width of the activity bar.
void draw(Graphics *graphics) override
Draws the widget.
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
Used replacement tokens by configure_file():