4#ifndef INCLUDE_FIFECHAN_WIDGETS_ACTIVITYBARITEM_HPP_
5#define INCLUDE_FIFECHAN_WIDGETS_ACTIVITYBARITEM_HPP_
12#include "fifechan/platform.hpp"
15#include "fifechan/listeners/widgetlistener.hpp"
16#include "fifechan/widgets/togglebutton.hpp"
17#include "fifechan/widgets/tooltip.hpp"
40 std::string
const & icon, std::string
const & tooltip =
"",
Widget* panel =
nullptr);
144 void syncButtonToPanel();
149 void syncPanelToButton();
void toggleSelected() override
Toggles the check box between being selected and not being selected.
std::unique_ptr< Tooltip > mTooltipWidget
Tooltip widget instance (lazily created).
void widgetShown(Event const &event) override
Invoked when a widget is shown, i.e it's set to be visible.
Widget * getPanel() const
Gets the target panel that this item controls.
void setPanel(Widget *panel)
Sets the target panel that this item controls.
std::string const & getTooltip() const
Gets the tooltip text for this activity bar item.
std::string mTooltip
Tooltip text for this item.
void setTooltip(std::string const &tooltip)
Sets the tooltip text for this activity bar item.
void setPanelVisible(bool visible)
Sets the panel visibility and updates button state accordingly.
void setSize(int size)
Sets the default size for activity bar items.
void setSelected(bool selected) override
Sets the check box to be selected or not.
int mSize
Default size for items.
int getSize() const
Gets the default size.
void widgetHidden(Event const &event) override
Invoked when a widget is hidden, i.e it's set to be not visible.
ActivityBarItem(std::string const &icon, std::string const &tooltip="", Widget *panel=nullptr)
Constructor.
Widget * mPanel
Panel that this item controls.
void mouseEntered(MouseEvent &mouseEvent) override
Called when the mouse has entered into the widget area.
void mouseExited(MouseEvent &mouseEvent) override
Called when the mouse has exited the widget area.
Base class for all GUI event objects.
Represents a mouse event.
Used replacement tokens by configure_file():