Clapkit
Loading...
Searching...
No Matches
ckCheckbox.h
Go to the documentation of this file.
1/*
2 *
3 * Clapkit
4 * ----------------------------------------------------------------------
5 * A wrapper for creating a 'generalized' app for Classic MacOS
6 * that (hopefully) can be ported easily to other platforms.
7 *
8 * CKCheckbox
9 * ----------------------------------------------------------------------
10 * Defines a checkbox.
11 *
12 */
13
14#pragma once
15
16#include "ckApp.h"
17#include "ckControlToolbox.h"
19
25
26 public:
27 CKCheckbox(const CKControlInitParams& params);
28 virtual ~CKCheckbox();
29 virtual bool HandleEvent(const CKEvent& evt);
30 virtual void __ReflectToOS();
31
32 // TODO: A better way of doing these?
33
34 virtual void SetValue(const char* value) {
36 this->RaisePropertyChange("value");
37 }
38
39 virtual void SetValue(bool value) {
41 this->RaisePropertyChange("value");
42 }
43
44 virtual void SetValue(void* value) {
46 this->RaisePropertyChange("value");
47 }
48
49 protected:
50 CKCheckbox(const CKControlInitParams& params, CKControlType forcedType);
51};
Defines a checkbox control.
Definition ckCheckbox.h:24
virtual void __ReflectToOS()
Definition ckCheckbox.cpp:40
virtual void SetValue(void *value)
Definition ckCheckbox.h:44
virtual void SetValue(bool value)
Definition ckCheckbox.h:39
virtual ~CKCheckbox()
Definition ckCheckbox.cpp:24
virtual bool HandleEvent(const CKEvent &evt)
Definition ckCheckbox.cpp:27
virtual void SetValue(const char *value)
Definition ckCheckbox.h:34
Defines the base of all UIControls that are managed by Macintosh Toolbox.
Definition ckControlToolbox.h:27
virtual void RaisePropertyChange(const char *propertyName)
Definition ckControlToolbox.cpp:138
A base for controls that have a 'main' boolean or custom property.
Definition ck_pValueContainingControl.h:28
void SetValue(bool value)
Definition ck_pValueContainingControl.h:31
CKControlType
Defines a control type (i.e. PushButton, Checkbox, etc.)
Definition ckTypes.h:51
Initialization parameters for a CKControl.
Definition ckControl.h:27
Defines an event raised by the framework, mostly for user actions.
Definition ckTypes.h:490