15#include "AViewContainer.h"
16#include <AUI/ASS/Selector/Selected.h>
32 auto checked()
const {
36 &ACheckBox::setChecked,
42 setChecked(!checked());
53 void setChecked(
bool checked =
true) {
55 emit customCssPropertyChanged();
56 emit ACheckBox::mCheckedChanged(checked);
59 void setUnchecked(
bool unchecked =
true) {
60 setChecked(!unchecked);
66 bool selectableIsSelectedImpl()
override;
69 bool mChecked =
false;
78class API_AUI_VIEWS ACheckBoxWrapper:
public AViewContainerBase {
80 explicit ACheckBoxWrapper(
const _<AView>& viewToWrap);
83 auto checked()
const {
84 return mCheckBox->checked();
88 setChecked(!checked());
99 void setChecked(
bool checked =
true) {
100 mCheckBox->setChecked(checked);
103 void setUnchecked(
bool unchecked =
true) {
104 setChecked(!unchecked);
117 return view->checked();
122 return &ACheckBox::checked;
126 return &ACheckBox::setChecked;
135 return view->checked();
140 return &ACheckBoxWrapper::checked;
144 return &ACheckBoxWrapper::setChecked;
148namespace declarative {
View container with a checkbox.
Definition ACheckBox.h:78
A check box (without label).
Definition ACheckBox.h:27
virtual bool consumesClick(const glm::ivec2 &pos)
Determines whether this AView processes this click or passes it thru.
Definition AView.cpp:540
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
Interface to work with ass::Selected selector.
Definition Selected.h:21
ASignal< Args... > emits
A signal declaration.
Definition ASignal.h:348
#define emit
emits the specified signal in context of this object.
Definition AObject.h:310
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:308
Declarative view trait.
Definition Declarative.h:170