51 const std::string&
label()
const {
return label_; }
81 bool hovered_ =
false;
82 bool pressed_ =
false;
99 const std::string&
text()
const {
return text_; }
102 const std::string&
url()
const {
return url_; }
113 bool hovered_ =
false;
171 bool hovered_ =
false;
172 bool pressed_ =
false;
195 std::string normal_path_;
196 std::string hover_path_;
197 std::string pressed_path_;
198 bool hovered_ =
false;
199 bool pressed_ =
false;
221 float drag_start_x_ = 0;
222 float drag_start_y_ = 0;
223 float movement_x_ = 0;
224 float movement_y_ = 0;
225 bool native_drag_pending_ =
false;
Definition canvas.hpp:240
void on_mouse_event(const MouseEvent &event) override
Mouse down with full event context.
ResizableCorner()
Definition buttons.hpp:207
float intrinsic_height() const override
Definition buttons.hpp:218
void paint(canvas::Canvas &canvas) override
void on_mouse_down(Point pos) override
std::function< void(float dx, float dy)> on_resize
Called during drag with (dx, dy) delta from the drag start.
Definition buttons.hpp:210
void on_mouse_drag(Point pos) override
bool wants_mouse_input() const override
True if this widget handles mouse down/drag through virtual methods even when it does not expose JS p...
Definition buttons.hpp:216
void on_mouse_enter() override
bool is_enabled() const
Definition buttons.hpp:57
void on_mouse_down(Point pos) override
TextButton(std::string label)
Definition buttons.hpp:43
bool is_pressed() const
Definition buttons.hpp:69
bool wants_mouse_input() const override
True if this widget handles mouse down/drag through virtual methods even when it does not expose JS p...
Definition buttons.hpp:67
void paint_label(canvas::Canvas &canvas)
The stock label rendering, split out of paint() so a delegate that skins only the button FACE still g...
Style style() const
Definition buttons.hpp:54
Style
Definition buttons.hpp:23
@ secondary
Definition buttons.hpp:23
@ primary
Definition buttons.hpp:23
@ ghost
Definition buttons.hpp:23
void paint(canvas::Canvas &canvas) override
float intrinsic_height() const override
Definition buttons.hpp:71
std::function< void()> on_click
Called when the button is clicked.
Definition buttons.hpp:60
void on_mouse_leave() override
void set_style(Style s)
Definition buttons.hpp:53
void on_mouse_up(Point pos) override
void set_enabled(bool e)
Definition buttons.hpp:56
TextButton()
Definition buttons.hpp:38
const std::string & label() const
Definition buttons.hpp:51
void set_label(std::string text)
Definition buttons.hpp:50
void set_pointer_events(PointerEvents p)
Definition view.hpp:732
@ link
Definition view.hpp:990
@ button
Definition view.hpp:990
@ box_only
Definition view.hpp:731
void set_derived_access_label(std::string label)
The CONTENT-DERIVED accessible name: a widget's visible text (Label::set_text, Knob/Fader/Toggleset_l...
Definition view.hpp:1020
@ text
Definition view.hpp:2742
void set_access_role(AccessRole role)
Definition view.hpp:995
void set_focusable(bool f)
Definition view.hpp:669
Definition affine_transform.hpp:24
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
ArrowDirection
Definition buttons.hpp:119
@ up
Definition buttons.hpp:119
@ down
Definition buttons.hpp:119
@ right
Definition buttons.hpp:119
@ path
Definition anchor_strategy.hpp:42
@ right
Definition border_style.hpp:31
@ left
Definition border_style.hpp:31
@ pressed
Definition widgets.hpp:1731
@ hovered
Definition widgets.hpp:1731
@ s
Definition input_events.hpp:41
@ e
Definition input_events.hpp:39
@ height
Definition css_animation.hpp:128
@ width
Definition css_animation.hpp:127
Rich mouse/pointer event with position, modifiers, button state, pointer ID, and stylus properties.
Definition input_events.hpp:104
Definition geometry.hpp:20