37#import <Cocoa/Cocoa.h>
49@interface AriaClickTarget : NSObject
50- (instancetype)initWithCallback:(
std::function<
void()>)cb;
51- (void)fire:(
id)sender;
55@interface AriaToggleTarget : NSObject
56- (instancetype)initWithCallback:(
std::function<
void(
bool)>)cb;
57- (void)fire:(
id)sender;
61@interface AriaStepperTarget : NSObject
62- (instancetype)initWithCallback:(
std::function<
void(
int)>)cb;
63- (void)fire:(
id)sender;
67@interface AriaSliderTarget : NSObject
68- (instancetype)initWithCallback:(
std::function<
void(
double)>)cb;
69- (void)fire:(
id)sender;
73@interface AriaTextDelegate : NSObject <NSTextFieldDelegate>
74- (instancetype)initWithCallback:(
std::function<
void(
std::string_view)>)cb;
90 [[
nodiscard]] std::string_view
kind() const noexcept
override {
return "appkit"; }
94 [[
nodiscard]] T*
as()
const {
return static_cast<T*
>(view_); }
97 NSView* __strong view_;
154 std::function<
void(std::string_view)> cb)
override;
160 std::function<
void(
bool)> cb)
override;
166 std::function<
void(
int)> cb)
override;
171 std::function<
void(std::int64_t)> cb)
override;
176 std::function<
void(std::uint64_t)> cb)
override;
181 std::function<
void(
float)> cb)
override;
187 std::function<
void(
double)> cb)
override;
195 std::function<
void()> cb)
override;
199 std::unique_ptr<Impl> p_;
214@compatibility_alias AppKitClickWrapper AriaClickTarget;
::aria::adapters::appkit::AppKitAdapter AppKitAdapter
Definition AppKitAdapter.hpp:210
::aria::adapters::appkit::AppKitView AppKitView
Definition AppKitAdapter.hpp:211
RAII handle to a single subscription.
Definition subscription.hpp:44
Definition AppKitAdapter.hpp:102
void set_int64(::aria::binding::IView &v, std::int64_t value) override
AppKitAdapter(const AppKitAdapter &)=delete
void set_int(::aria::binding::IView &v, int value) override
void set_float(::aria::binding::IView &v, float value) override
::aria::Subscription on_int_changed(::aria::binding::IView &v, std::function< void(int)> cb) override
AppKitAdapter & operator=(const AppKitAdapter &)=delete
int get_int(::aria::binding::IView &v) override
void set_uint64(::aria::binding::IView &v, std::uint64_t value) override
::aria::Subscription on_uint64_changed(::aria::binding::IView &v, std::function< void(std::uint64_t)> cb) override
~AppKitAdapter() override
std::string_view platform_name() const noexcept override
Definition AppKitAdapter.hpp:110
::aria::Subscription on_text_changed(::aria::binding::IView &v, std::function< void(std::string_view)> cb) override
::aria::Subscription on_click(::aria::binding::IView &v, std::function< void()> cb) override
void set_visible(::aria::binding::IView &v, bool visible) override
::aria::Subscription on_int64_changed(::aria::binding::IView &v, std::function< void(std::int64_t)> cb) override
void release_view(NSView *view) noexcept
Drop the cached AppKitView for view, if any.
void set_bool(::aria::binding::IView &v, bool value) override
AppKitView & view_for(NSView *view)
Wrap a native NSView* as an IView owned by this adapter.
void set_double(::aria::binding::IView &v, double value) override
std::uint64_t get_uint64(::aria::binding::IView &v) override
void set_enabled(::aria::binding::IView &v, bool enabled) override
std::string get_text(::aria::binding::IView &v) override
float get_float(::aria::binding::IView &v) override
bool get_bool(::aria::binding::IView &v) override
::aria::Subscription on_float_changed(::aria::binding::IView &v, std::function< void(float)> cb) override
std::int64_t get_int64(::aria::binding::IView &v) override
double get_double(::aria::binding::IView &v) override
void set_text(::aria::binding::IView &v, std::string_view text) override
::aria::Subscription on_bool_changed(::aria::binding::IView &v, std::function< void(bool)> cb) override
::aria::Subscription on_double_changed(::aria::binding::IView &v, std::function< void(double)> cb) override
Definition AppKitAdapter.hpp:81
std::string_view kind() const noexcept override
Definition AppKitAdapter.hpp:90
~AppKitView() override
Definition AppKitAdapter.hpp:84
T * as() const
Definition AppKitAdapter.hpp:94
AppKitView(NSView *view)
Definition AppKitAdapter.hpp:83
NSView * native() const noexcept
Definition AppKitAdapter.hpp:91
Abstract platform adapter — knows how to read/write/observe widgets.
Definition view_adapter.hpp:80
Abstract platform widget reference.
Definition view_adapter.hpp:28
void fire_destroy_() noexcept
Invoked by ~IView() to fan out the notification — this is the last-resort trigger.
Definition AppKitAdapter.hpp:77
Definition validation_key.hpp:110