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:
Ingo Weinhold
2013-12-21 02:12:04 +01:00
parent 7bcfb21538
commit df37cd4edd
5 changed files with 88 additions and 22 deletions
+5
View File
@@ -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