mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
34 lines
748 B
C++
34 lines
748 B
C++
#pragma once
|
|
|
|
#include "PascalStr.h"
|
|
#include "PLWidgets.h"
|
|
|
|
struct Menu;
|
|
|
|
namespace PortabilityLayer
|
|
{
|
|
class PopupMenuWidget final : public WidgetSpec<PopupMenuWidget>
|
|
{
|
|
public:
|
|
explicit PopupMenuWidget(const WidgetBasicState &state);
|
|
|
|
bool Init(const WidgetBasicState &state, const void *additionalData) override;
|
|
|
|
WidgetHandleState_t ProcessEvent(void *captureContext, const TimeTaggedVOSEvent &evt);
|
|
int16_t Capture(void *captureContext, const Point &pos, WidgetUpdateCallback_t callback);
|
|
void DrawControl(DrawSurface *surface) override;
|
|
|
|
void OnStateChanged() override;
|
|
|
|
PLPasStr GetString() const override;
|
|
|
|
const THandle<Menu> &GetMenu() const;
|
|
|
|
protected:
|
|
~PopupMenuWidget();
|
|
|
|
private:
|
|
THandle<Menu> m_menu;
|
|
};
|
|
}
|