5#ifndef INCLUDE_FIFECHAN_WIDGETS_CHECKBOX_HPP_
6#define INCLUDE_FIFECHAN_WIDGETS_CHECKBOX_HPP_
11#include "fifechan/platform.hpp"
12#include "fifechan/widgets/imagebutton.hpp"
50 explicit CheckBox(std::string
const & caption,
bool selected =
false);
65 virtual bool isSelected()
const;
73 virtual void setSelected(
bool selected);
79 virtual void toggleSelected();
87 void setBackgroundImage(std::string
const & filename);
95 void setBackgroundImage(
Image const * image);
102 Image const * getBackgroundImage()
const;
109 MarkerStyle getMarkerStyle()
const;
116 void setMarkerStyle(MarkerStyle mode);
120 void adjustSize()
override;
121 void draw(
Graphics* graphics)
override;
125 void keyPressed(
KeyEvent& keyEvent)
override;
126 void keyReleased(
KeyEvent& keyEvent)
override;
130 void mousePressed(
MouseEvent& mouseEvent)
override;
131 void mouseReleased(
MouseEvent& mouseEvent)
override;
132 void mouseClicked(
MouseEvent& mouseEvent)
override;
140 virtual void drawBox(
Graphics* graphics);
151 void adjustSizeImpl()
override;
190 void drawRhombus(
Graphics* graphics);
An implementation of a check box where a user can select or deselect the check box and where the stat...
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.
std::string mCaption
Holds the caption of the button.
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).