5 #include "Pressable.hpp" 6 #include "HaveEnabled.hpp" 7 #include "HaveOutline.hpp" 8 #include "HaveBackground.hpp" 10 #include "CBAssigner.hpp" 11 #include "CBAssignerNeg.hpp" 16 const char*
const changed =
"checkboxStateChanged";
17 const char*
const checked =
"checkboxStateChecked";
18 const char*
const unchecked =
"checkboxStateUnchecked";
19 const char*
const partly =
"checkboxStatePartly";
31 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
override;
32 virtual bool update(sf::Vector2f mp,
bool pressLeft,
bool pressRight,
bool aboveHover)
override;
33 virtual void updateArea()
override;
35 void assign(
bool* var);
36 void assignNegative(
bool* var);
37 CBState getState()
const;
38 void setState(CBState value);
40 void setSymbol(CBState state,
const sf::VertexArray& value);
41 void setSymbol(CBState state,
const sf::String&& symbolName);
42 void setSymbolColor(CBState state, sf::Color color);
43 void setSymbolTransform(CBState state,
const sf::Transform&);
45 void setStateTexture(CBState state, std::shared_ptr<sf::Texture>& texture);
46 void setStateTexture(CBState state, sf::String&& symbolName);
48 void refreshColor(CBState state);
51 void fireAssignerNegative();
59 sf::VertexArray symbol[toId(CBState::Count)];
60 sf::Transform transform[toId(CBState::Count)];
61 sf::Color color[toId(CBState::Count)];
62 std::shared_ptr<sf::Texture> texture[toId(CBState::Count)];
64 void refreshColor(sf::VertexArray& symbol, sf::Color& color);
67 virtual void onSetAction(
const sf::String& type)
override;
71 typedef std::shared_ptr<Checkbox> CheckboxPtr;
74 #endif // CHECKBOX_HPP Definition: HaveBackground.hpp:28
Definition: Checkbox.hpp:13
Definition: HaveEnabled.hpp:15
Definition: CBAssigner.hpp:9
Definition: CBAssignerNeg.hpp:9
Definition: HaveOutline.hpp:15
Definition: Pressable.hpp:42
Definition: Checkbox.hpp:24