4#ifndef INCLUDE_FIFECHAN_WIDGETS_MENUITEM_HPP_
5#define INCLUDE_FIFECHAN_WIDGETS_MENUITEM_HPP_
12#include "fifechan/platform.hpp"
15#include "fifechan/image.hpp"
16#include "fifechan/listeners/actionlistener.hpp"
17#include "fifechan/widgets/button.hpp"
147 explicit MenuItem(std::string
const & text);
162 void setType(Type type);
170 Type getType()
const;
194 void setShortcut(std::string
const & shortcut);
202 std::string
const & getShortcut()
const;
207 void setText(std::string
const & text);
211 std::string
const & getText()
const;
216 void setIcon(
Image const * image);
222 Image const * getIcon()
const;
228 void setIconGlyph(std::string
const & glyph,
Font* font =
nullptr);
232 std::string
const & getIconGlyph()
const;
237 void setIconGlyphFont(
Font* font);
242 Font* getIconGlyphFont()
const;
250 void setChecked(
bool checked);
258 bool isChecked()
const;
267 void setEnabled(
bool enabled);
276 bool isEnabled()
const;
279 void draw(
Graphics* graphics)
override;
Abstract interface for font rendering.
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
Abstract holder for image data.
Used replacement tokens by configure_file():
Column layout specification passed to items for rendering.
int xArrow
X position of arrow column.
int xCaption
X position of caption column.
int xShortcut
X position of shortcut column.
MenuColumns cols
Column widths aggregated across items.
int xIcon
X position of icon column.
Aggregated column metrics for all items in a menu.
int shortcutW
Maximum shortcut width across all items.
int arrowW
Maximum arrow width across all items.
int iconW
Maximum icon width across all items.
int captionW
Maximum caption width across all items.