2020-01-05 02:33:03 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-02 01:38:38 -05:00
|
|
|
#include "PascalStr.h"
|
2020-01-05 02:33:03 -05:00
|
|
|
#include "PLWidgets.h"
|
|
|
|
|
|
|
|
|
|
namespace PortabilityLayer
|
|
|
|
|
{
|
|
|
|
|
class CheckboxWidget final : public WidgetSpec<CheckboxWidget>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CheckboxWidget(const WidgetBasicState &state);
|
|
|
|
|
~CheckboxWidget();
|
|
|
|
|
|
|
|
|
|
bool Init(const WidgetBasicState &state) override;
|
2020-02-02 01:38:38 -05:00
|
|
|
|
|
|
|
|
void DrawControl(DrawSurface *surface) override;
|
|
|
|
|
void SetString(const PLPasStr &str) override;
|
|
|
|
|
PLPasStr GetString() const override;
|
|
|
|
|
|
|
|
|
|
void OnStateChanged() override;
|
|
|
|
|
|
2020-02-16 21:57:02 -05:00
|
|
|
WidgetHandleState_t ProcessEvent(const TimeTaggedVOSEvent &evt);
|
|
|
|
|
|
2020-02-02 01:38:38 -05:00
|
|
|
private:
|
|
|
|
|
PascalStr<255> m_text;
|
2020-02-16 21:57:02 -05:00
|
|
|
bool m_haveMouseDown;
|
2020-01-05 02:33:03 -05:00
|
|
|
};
|
|
|
|
|
}
|