15#include "AViewContainer.h"
16#include <AUI/ASS/Selector/Selected.h>
36 auto checked()
const {
40 &ACheckBox::setChecked,
46 setChecked(!checked());
57 void setChecked(
bool checked =
true) {
59 emit customCssPropertyChanged();
60 emit ACheckBox::mCheckedChanged(checked);
63 void setUnchecked(
bool unchecked =
true) {
64 setChecked(!unchecked);
70 bool selectableIsSelectedImpl()
override;
73 bool mChecked =
false;
95 auto checked()
const {
96 return mCheckBox->checked();
100 setChecked(!checked());
111 void setChecked(
bool checked =
true) {
112 mCheckBox->setChecked(checked);
115 void setUnchecked(
bool unchecked =
true) {
116 setChecked(!unchecked);
120 _<ACheckBox> mCheckBox;
129 return view->checked();
134 return &ACheckBox::checked;
138 return &ACheckBox::setChecked;
147 return view->checked();
152 return &ACheckBoxWrapper::checked;
156 return &ACheckBoxWrapper::setChecked;
160namespace declarative {
165 CheckBox() =
default;
View container with a checkbox.
Definition ACheckBox.h:86
ACheckBoxWrapper(const _< AView > &viewToWrap)
Construct ACheckBoxWrapper with a view.
A check box (without label).
Definition ACheckBox.h:31
bool consumesClick(const glm::ivec2 &pos) override
Determines whether this AView processes this click or passes it thru.
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
Interface to work with ass::Selected selector.
Definition Selected.h:21
ASignal< Args... > emits
A signal declaration.
Definition ASignal.h:572
#define emit
emits the specified signal in context of this object.
Definition AObject.h:343
Defines how View handles properties of FieldType type.
Definition ADataBinding.h:37
static void(View::*)(const FieldType &v) getSetter()
Returns setter for ADataBinding (deprecated)
Definition ADataBinding.h:63
static void setup(const _< View > &view)
Called then view linked with field.
Definition ADataBinding.h:43
static auto property(const _< View > &view)
Returns property definition for FieldType.
Definition ADataBinding.h:49
static ASignal< FieldType >View::* getGetter()
Returns getter for ADataBinding (deprecated)
Definition ADataBinding.h:55
Property implementation to use with custom getter/setter.
Definition AProperty.h:234
Declarative view trait.
Definition Declarative.h:180
CheckBoxWrapper(const _< AView > &viewToWrap)
Construct ACheckBoxWrapper with a view.
Definition ACheckBox.h:176