5#ifndef INCLUDE_FIFECHAN_WIDGETS_CHECKBOX_HPP_
6#define INCLUDE_FIFECHAN_WIDGETS_CHECKBOX_HPP_
13#include "fifechan/platform.hpp"
16#include "fifechan/widgets/imagebutton.hpp"
56 explicit CheckBox(std::string
const & caption,
bool selected =
false);
71 virtual bool isSelected()
const;
79 virtual void setSelected(
bool selected);
85 virtual void toggleSelected();
93 void setBackgroundImage(std::string
const & filename);
101 void setBackgroundImage(
Image const * image);
108 Image const * getBackgroundImage()
const;
115 MarkerStyle getMarkerStyle()
const;
122 void setMarkerStyle(MarkerStyle mode);
126 void adjustSize()
override;
127 void draw(
Graphics* graphics)
override;
131 void keyPressed(
KeyEvent& keyEvent)
override;
132 void keyReleased(
KeyEvent& keyEvent)
override;
136 void mousePressed(
MouseEvent& mouseEvent)
override;
137 void mouseReleased(
MouseEvent& mouseEvent)
override;
138 void mouseClicked(
MouseEvent& mouseEvent)
override;
146 virtual void drawBox(
Graphics* graphics);
157 void adjustSizeImpl()
override;
196 void drawRhombus(
Graphics* graphics);
An implementation of a check box.
MarkerStyle mMode
Holds the marker style of the check box.
Image const * mBackgroundImage
Holds the background image, that includes the caption region.
bool mSelected
True if the check box is selected, false otherwise.
bool mInternalBackgroundImage
True if the background image was loaded internally, false otherwise.
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
Abstract holder for image data.
Represents a mouse event.
Represents a rectangular area (X, Y, Width, Height).
Used replacement tokens by configure_file():