BCheckBox: Add tri-state support
* Add possible control state B_CONTROL_PARTIALLY_ON and support it in BCheckBox and BControlLook. * BCheckBox: Add partialStateToOff property defining whether the partial state should transition to off. Defaults to false (i.e. partial to on).
This commit is contained in:
@@ -69,6 +69,9 @@ public:
|
||||
|
||||
virtual status_t Perform(perform_code code, void* data);
|
||||
|
||||
bool IsPartialStateToOff() const;
|
||||
void SetPartialStateToOff(bool partialToOff);
|
||||
|
||||
protected:
|
||||
virtual void LayoutInvalidated(bool descendants = false);
|
||||
|
||||
@@ -81,6 +84,7 @@ private:
|
||||
private:
|
||||
BRect _CheckBoxFrame() const;
|
||||
BSize _ValidatePreferredSize();
|
||||
int32 _NextState() const;
|
||||
|
||||
private:
|
||||
// Forbidden
|
||||
@@ -89,6 +93,7 @@ private:
|
||||
private:
|
||||
BSize fPreferredSize;
|
||||
bool fOutlined;
|
||||
bool fPartialToOff;
|
||||
};
|
||||
|
||||
#endif // _CHECK_BOX_H
|
||||
|
||||
Reference in New Issue
Block a user