Files
Aerofoil/PortabilityLayer/PLCheckboxWidget.h

33 lines
807 B
C
Raw Normal View History

2020-01-05 02:33:03 -05:00
#pragma once
#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();
2020-05-18 02:03:17 -04:00
bool Init(const WidgetBasicState &state, const void *additionalData) override;
void DrawControl(DrawSurface *surface) override;
void SetString(const PLPasStr &str) override;
PLPasStr GetString() const override;
void OnStateChanged() override;
2020-05-18 02:03:17 -04:00
void OnEnabledChanged() override;
int16_t Capture(const Point &pos, WidgetUpdateCallback_t callback) override;
WidgetHandleState_t ProcessEvent(const TimeTaggedVOSEvent &evt);
private:
2020-05-18 02:03:17 -04:00
void DrawControlInternal(DrawSurface *surface, bool inverted);
PascalStr<255> m_text;
bool m_haveMouseDown;
2020-01-05 02:33:03 -05:00
};
}