1 // This file was generated by gir (https://github.com/gtk-rs/gir)
2 // from gir-files (https://github.com/gtk-rs/gir-files)
3 // DO NOT EDIT
4 
5 use crate::Actionable;
6 use crate::Align;
7 use crate::Bin;
8 use crate::Buildable;
9 use crate::Button;
10 use crate::Container;
11 use crate::PositionType;
12 use crate::ReliefStyle;
13 use crate::ResizeMode;
14 use crate::Widget;
15 use glib::object::Cast;
16 use glib::object::IsA;
17 use glib::signal::connect_raw;
18 use glib::signal::SignalHandlerId;
19 use glib::translate::*;
20 use glib::StaticType;
21 use glib::ToValue;
22 use std::boxed::Box as Box_;
23 use std::fmt;
24 use std::mem::transmute;
25 
26 glib::wrapper! {
27     #[doc(alias = "GtkLinkButton")]
28     pub struct LinkButton(Object<ffi::GtkLinkButton, ffi::GtkLinkButtonClass>) @extends Button, Bin, Container, Widget, @implements Buildable, Actionable;
29 
30     match fn {
31         type_ => || ffi::gtk_link_button_get_type(),
32     }
33 }
34 
35 impl LinkButton {
36     #[doc(alias = "gtk_link_button_new")]
new(uri: &str) -> LinkButton37     pub fn new(uri: &str) -> LinkButton {
38         assert_initialized_main_thread!();
39         unsafe {
40             Widget::from_glib_none(ffi::gtk_link_button_new(uri.to_glib_none().0)).unsafe_cast()
41         }
42     }
43 
44     #[doc(alias = "gtk_link_button_new_with_label")]
45     #[doc(alias = "new_with_label")]
with_label(uri: &str, label: &str) -> LinkButton46     pub fn with_label(uri: &str, label: &str) -> LinkButton {
47         assert_initialized_main_thread!();
48         unsafe {
49             Widget::from_glib_none(ffi::gtk_link_button_new_with_label(
50                 uri.to_glib_none().0,
51                 label.to_glib_none().0,
52             ))
53             .unsafe_cast()
54         }
55     }
56 
57     // rustdoc-stripper-ignore-next
58     /// Creates a new builder-pattern struct instance to construct [`LinkButton`] objects.
59     ///
60     /// This method returns an instance of [`LinkButtonBuilder`] which can be used to create [`LinkButton`] objects.
builder() -> LinkButtonBuilder61     pub fn builder() -> LinkButtonBuilder {
62         LinkButtonBuilder::default()
63     }
64 }
65 
66 #[derive(Clone, Default)]
67 // rustdoc-stripper-ignore-next
68 /// A [builder-pattern] type to construct [`LinkButton`] objects.
69 ///
70 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
71 pub struct LinkButtonBuilder {
72     uri: Option<String>,
73     visited: Option<bool>,
74     always_show_image: Option<bool>,
75     image: Option<Widget>,
76     image_position: Option<PositionType>,
77     label: Option<String>,
78     relief: Option<ReliefStyle>,
79     use_underline: Option<bool>,
80     border_width: Option<u32>,
81     child: Option<Widget>,
82     resize_mode: Option<ResizeMode>,
83     app_paintable: Option<bool>,
84     can_default: Option<bool>,
85     can_focus: Option<bool>,
86     events: Option<gdk::EventMask>,
87     expand: Option<bool>,
88     #[cfg(any(feature = "v3_20", feature = "dox"))]
89     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
90     focus_on_click: Option<bool>,
91     halign: Option<Align>,
92     has_default: Option<bool>,
93     has_focus: Option<bool>,
94     has_tooltip: Option<bool>,
95     height_request: Option<i32>,
96     hexpand: Option<bool>,
97     hexpand_set: Option<bool>,
98     is_focus: Option<bool>,
99     margin: Option<i32>,
100     margin_bottom: Option<i32>,
101     margin_end: Option<i32>,
102     margin_start: Option<i32>,
103     margin_top: Option<i32>,
104     name: Option<String>,
105     no_show_all: Option<bool>,
106     opacity: Option<f64>,
107     parent: Option<Container>,
108     receives_default: Option<bool>,
109     sensitive: Option<bool>,
110     tooltip_markup: Option<String>,
111     tooltip_text: Option<String>,
112     valign: Option<Align>,
113     vexpand: Option<bool>,
114     vexpand_set: Option<bool>,
115     visible: Option<bool>,
116     width_request: Option<i32>,
117     action_name: Option<String>,
118     action_target: Option<glib::Variant>,
119 }
120 
121 impl LinkButtonBuilder {
122     // rustdoc-stripper-ignore-next
123     /// Create a new [`LinkButtonBuilder`].
new() -> Self124     pub fn new() -> Self {
125         Self::default()
126     }
127 
128     // rustdoc-stripper-ignore-next
129     /// Build the [`LinkButton`].
build(self) -> LinkButton130     pub fn build(self) -> LinkButton {
131         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
132         if let Some(ref uri) = self.uri {
133             properties.push(("uri", uri));
134         }
135         if let Some(ref visited) = self.visited {
136             properties.push(("visited", visited));
137         }
138         if let Some(ref always_show_image) = self.always_show_image {
139             properties.push(("always-show-image", always_show_image));
140         }
141         if let Some(ref image) = self.image {
142             properties.push(("image", image));
143         }
144         if let Some(ref image_position) = self.image_position {
145             properties.push(("image-position", image_position));
146         }
147         if let Some(ref label) = self.label {
148             properties.push(("label", label));
149         }
150         if let Some(ref relief) = self.relief {
151             properties.push(("relief", relief));
152         }
153         if let Some(ref use_underline) = self.use_underline {
154             properties.push(("use-underline", use_underline));
155         }
156         if let Some(ref border_width) = self.border_width {
157             properties.push(("border-width", border_width));
158         }
159         if let Some(ref child) = self.child {
160             properties.push(("child", child));
161         }
162         if let Some(ref resize_mode) = self.resize_mode {
163             properties.push(("resize-mode", resize_mode));
164         }
165         if let Some(ref app_paintable) = self.app_paintable {
166             properties.push(("app-paintable", app_paintable));
167         }
168         if let Some(ref can_default) = self.can_default {
169             properties.push(("can-default", can_default));
170         }
171         if let Some(ref can_focus) = self.can_focus {
172             properties.push(("can-focus", can_focus));
173         }
174         if let Some(ref events) = self.events {
175             properties.push(("events", events));
176         }
177         if let Some(ref expand) = self.expand {
178             properties.push(("expand", expand));
179         }
180         #[cfg(any(feature = "v3_20", feature = "dox"))]
181         if let Some(ref focus_on_click) = self.focus_on_click {
182             properties.push(("focus-on-click", focus_on_click));
183         }
184         if let Some(ref halign) = self.halign {
185             properties.push(("halign", halign));
186         }
187         if let Some(ref has_default) = self.has_default {
188             properties.push(("has-default", has_default));
189         }
190         if let Some(ref has_focus) = self.has_focus {
191             properties.push(("has-focus", has_focus));
192         }
193         if let Some(ref has_tooltip) = self.has_tooltip {
194             properties.push(("has-tooltip", has_tooltip));
195         }
196         if let Some(ref height_request) = self.height_request {
197             properties.push(("height-request", height_request));
198         }
199         if let Some(ref hexpand) = self.hexpand {
200             properties.push(("hexpand", hexpand));
201         }
202         if let Some(ref hexpand_set) = self.hexpand_set {
203             properties.push(("hexpand-set", hexpand_set));
204         }
205         if let Some(ref is_focus) = self.is_focus {
206             properties.push(("is-focus", is_focus));
207         }
208         if let Some(ref margin) = self.margin {
209             properties.push(("margin", margin));
210         }
211         if let Some(ref margin_bottom) = self.margin_bottom {
212             properties.push(("margin-bottom", margin_bottom));
213         }
214         if let Some(ref margin_end) = self.margin_end {
215             properties.push(("margin-end", margin_end));
216         }
217         if let Some(ref margin_start) = self.margin_start {
218             properties.push(("margin-start", margin_start));
219         }
220         if let Some(ref margin_top) = self.margin_top {
221             properties.push(("margin-top", margin_top));
222         }
223         if let Some(ref name) = self.name {
224             properties.push(("name", name));
225         }
226         if let Some(ref no_show_all) = self.no_show_all {
227             properties.push(("no-show-all", no_show_all));
228         }
229         if let Some(ref opacity) = self.opacity {
230             properties.push(("opacity", opacity));
231         }
232         if let Some(ref parent) = self.parent {
233             properties.push(("parent", parent));
234         }
235         if let Some(ref receives_default) = self.receives_default {
236             properties.push(("receives-default", receives_default));
237         }
238         if let Some(ref sensitive) = self.sensitive {
239             properties.push(("sensitive", sensitive));
240         }
241         if let Some(ref tooltip_markup) = self.tooltip_markup {
242             properties.push(("tooltip-markup", tooltip_markup));
243         }
244         if let Some(ref tooltip_text) = self.tooltip_text {
245             properties.push(("tooltip-text", tooltip_text));
246         }
247         if let Some(ref valign) = self.valign {
248             properties.push(("valign", valign));
249         }
250         if let Some(ref vexpand) = self.vexpand {
251             properties.push(("vexpand", vexpand));
252         }
253         if let Some(ref vexpand_set) = self.vexpand_set {
254             properties.push(("vexpand-set", vexpand_set));
255         }
256         if let Some(ref visible) = self.visible {
257             properties.push(("visible", visible));
258         }
259         if let Some(ref width_request) = self.width_request {
260             properties.push(("width-request", width_request));
261         }
262         if let Some(ref action_name) = self.action_name {
263             properties.push(("action-name", action_name));
264         }
265         if let Some(ref action_target) = self.action_target {
266             properties.push(("action-target", action_target));
267         }
268         glib::Object::new::<LinkButton>(&properties)
269             .expect("Failed to create an instance of LinkButton")
270     }
271 
uri(mut self, uri: &str) -> Self272     pub fn uri(mut self, uri: &str) -> Self {
273         self.uri = Some(uri.to_string());
274         self
275     }
276 
visited(mut self, visited: bool) -> Self277     pub fn visited(mut self, visited: bool) -> Self {
278         self.visited = Some(visited);
279         self
280     }
281 
always_show_image(mut self, always_show_image: bool) -> Self282     pub fn always_show_image(mut self, always_show_image: bool) -> Self {
283         self.always_show_image = Some(always_show_image);
284         self
285     }
286 
image<P: IsA<Widget>>(mut self, image: &P) -> Self287     pub fn image<P: IsA<Widget>>(mut self, image: &P) -> Self {
288         self.image = Some(image.clone().upcast());
289         self
290     }
291 
image_position(mut self, image_position: PositionType) -> Self292     pub fn image_position(mut self, image_position: PositionType) -> Self {
293         self.image_position = Some(image_position);
294         self
295     }
296 
label(mut self, label: &str) -> Self297     pub fn label(mut self, label: &str) -> Self {
298         self.label = Some(label.to_string());
299         self
300     }
301 
relief(mut self, relief: ReliefStyle) -> Self302     pub fn relief(mut self, relief: ReliefStyle) -> Self {
303         self.relief = Some(relief);
304         self
305     }
306 
use_underline(mut self, use_underline: bool) -> Self307     pub fn use_underline(mut self, use_underline: bool) -> Self {
308         self.use_underline = Some(use_underline);
309         self
310     }
311 
border_width(mut self, border_width: u32) -> Self312     pub fn border_width(mut self, border_width: u32) -> Self {
313         self.border_width = Some(border_width);
314         self
315     }
316 
child<P: IsA<Widget>>(mut self, child: &P) -> Self317     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
318         self.child = Some(child.clone().upcast());
319         self
320     }
321 
resize_mode(mut self, resize_mode: ResizeMode) -> Self322     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
323         self.resize_mode = Some(resize_mode);
324         self
325     }
326 
app_paintable(mut self, app_paintable: bool) -> Self327     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
328         self.app_paintable = Some(app_paintable);
329         self
330     }
331 
can_default(mut self, can_default: bool) -> Self332     pub fn can_default(mut self, can_default: bool) -> Self {
333         self.can_default = Some(can_default);
334         self
335     }
336 
can_focus(mut self, can_focus: bool) -> Self337     pub fn can_focus(mut self, can_focus: bool) -> Self {
338         self.can_focus = Some(can_focus);
339         self
340     }
341 
events(mut self, events: gdk::EventMask) -> Self342     pub fn events(mut self, events: gdk::EventMask) -> Self {
343         self.events = Some(events);
344         self
345     }
346 
expand(mut self, expand: bool) -> Self347     pub fn expand(mut self, expand: bool) -> Self {
348         self.expand = Some(expand);
349         self
350     }
351 
352     #[cfg(any(feature = "v3_20", feature = "dox"))]
353     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
focus_on_click(mut self, focus_on_click: bool) -> Self354     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
355         self.focus_on_click = Some(focus_on_click);
356         self
357     }
358 
halign(mut self, halign: Align) -> Self359     pub fn halign(mut self, halign: Align) -> Self {
360         self.halign = Some(halign);
361         self
362     }
363 
has_default(mut self, has_default: bool) -> Self364     pub fn has_default(mut self, has_default: bool) -> Self {
365         self.has_default = Some(has_default);
366         self
367     }
368 
has_focus(mut self, has_focus: bool) -> Self369     pub fn has_focus(mut self, has_focus: bool) -> Self {
370         self.has_focus = Some(has_focus);
371         self
372     }
373 
has_tooltip(mut self, has_tooltip: bool) -> Self374     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
375         self.has_tooltip = Some(has_tooltip);
376         self
377     }
378 
height_request(mut self, height_request: i32) -> Self379     pub fn height_request(mut self, height_request: i32) -> Self {
380         self.height_request = Some(height_request);
381         self
382     }
383 
hexpand(mut self, hexpand: bool) -> Self384     pub fn hexpand(mut self, hexpand: bool) -> Self {
385         self.hexpand = Some(hexpand);
386         self
387     }
388 
hexpand_set(mut self, hexpand_set: bool) -> Self389     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
390         self.hexpand_set = Some(hexpand_set);
391         self
392     }
393 
is_focus(mut self, is_focus: bool) -> Self394     pub fn is_focus(mut self, is_focus: bool) -> Self {
395         self.is_focus = Some(is_focus);
396         self
397     }
398 
margin(mut self, margin: i32) -> Self399     pub fn margin(mut self, margin: i32) -> Self {
400         self.margin = Some(margin);
401         self
402     }
403 
margin_bottom(mut self, margin_bottom: i32) -> Self404     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
405         self.margin_bottom = Some(margin_bottom);
406         self
407     }
408 
margin_end(mut self, margin_end: i32) -> Self409     pub fn margin_end(mut self, margin_end: i32) -> Self {
410         self.margin_end = Some(margin_end);
411         self
412     }
413 
margin_start(mut self, margin_start: i32) -> Self414     pub fn margin_start(mut self, margin_start: i32) -> Self {
415         self.margin_start = Some(margin_start);
416         self
417     }
418 
margin_top(mut self, margin_top: i32) -> Self419     pub fn margin_top(mut self, margin_top: i32) -> Self {
420         self.margin_top = Some(margin_top);
421         self
422     }
423 
name(mut self, name: &str) -> Self424     pub fn name(mut self, name: &str) -> Self {
425         self.name = Some(name.to_string());
426         self
427     }
428 
no_show_all(mut self, no_show_all: bool) -> Self429     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
430         self.no_show_all = Some(no_show_all);
431         self
432     }
433 
opacity(mut self, opacity: f64) -> Self434     pub fn opacity(mut self, opacity: f64) -> Self {
435         self.opacity = Some(opacity);
436         self
437     }
438 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self439     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
440         self.parent = Some(parent.clone().upcast());
441         self
442     }
443 
receives_default(mut self, receives_default: bool) -> Self444     pub fn receives_default(mut self, receives_default: bool) -> Self {
445         self.receives_default = Some(receives_default);
446         self
447     }
448 
sensitive(mut self, sensitive: bool) -> Self449     pub fn sensitive(mut self, sensitive: bool) -> Self {
450         self.sensitive = Some(sensitive);
451         self
452     }
453 
tooltip_markup(mut self, tooltip_markup: &str) -> Self454     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
455         self.tooltip_markup = Some(tooltip_markup.to_string());
456         self
457     }
458 
tooltip_text(mut self, tooltip_text: &str) -> Self459     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
460         self.tooltip_text = Some(tooltip_text.to_string());
461         self
462     }
463 
valign(mut self, valign: Align) -> Self464     pub fn valign(mut self, valign: Align) -> Self {
465         self.valign = Some(valign);
466         self
467     }
468 
vexpand(mut self, vexpand: bool) -> Self469     pub fn vexpand(mut self, vexpand: bool) -> Self {
470         self.vexpand = Some(vexpand);
471         self
472     }
473 
vexpand_set(mut self, vexpand_set: bool) -> Self474     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
475         self.vexpand_set = Some(vexpand_set);
476         self
477     }
478 
visible(mut self, visible: bool) -> Self479     pub fn visible(mut self, visible: bool) -> Self {
480         self.visible = Some(visible);
481         self
482     }
483 
width_request(mut self, width_request: i32) -> Self484     pub fn width_request(mut self, width_request: i32) -> Self {
485         self.width_request = Some(width_request);
486         self
487     }
488 
action_name(mut self, action_name: &str) -> Self489     pub fn action_name(mut self, action_name: &str) -> Self {
490         self.action_name = Some(action_name.to_string());
491         self
492     }
493 
action_target(mut self, action_target: &glib::Variant) -> Self494     pub fn action_target(mut self, action_target: &glib::Variant) -> Self {
495         self.action_target = Some(action_target.clone());
496         self
497     }
498 }
499 
500 pub const NONE_LINK_BUTTON: Option<&LinkButton> = None;
501 
502 pub trait LinkButtonExt: 'static {
503     #[doc(alias = "gtk_link_button_get_uri")]
504     #[doc(alias = "get_uri")]
uri(&self) -> Option<glib::GString>505     fn uri(&self) -> Option<glib::GString>;
506 
507     #[doc(alias = "gtk_link_button_get_visited")]
508     #[doc(alias = "get_visited")]
is_visited(&self) -> bool509     fn is_visited(&self) -> bool;
510 
511     #[doc(alias = "gtk_link_button_set_uri")]
set_uri(&self, uri: &str)512     fn set_uri(&self, uri: &str);
513 
514     #[doc(alias = "gtk_link_button_set_visited")]
set_visited(&self, visited: bool)515     fn set_visited(&self, visited: bool);
516 
517     #[doc(alias = "activate-link")]
connect_activate_link<F: Fn(&Self) -> glib::signal::Inhibit + 'static>( &self, f: F, ) -> SignalHandlerId518     fn connect_activate_link<F: Fn(&Self) -> glib::signal::Inhibit + 'static>(
519         &self,
520         f: F,
521     ) -> SignalHandlerId;
522 
523     #[doc(alias = "uri")]
connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId524     fn connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
525 
526     #[doc(alias = "visited")]
connect_visited_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId527     fn connect_visited_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
528 }
529 
530 impl<O: IsA<LinkButton>> LinkButtonExt for O {
uri(&self) -> Option<glib::GString>531     fn uri(&self) -> Option<glib::GString> {
532         unsafe { from_glib_none(ffi::gtk_link_button_get_uri(self.as_ref().to_glib_none().0)) }
533     }
534 
is_visited(&self) -> bool535     fn is_visited(&self) -> bool {
536         unsafe {
537             from_glib(ffi::gtk_link_button_get_visited(
538                 self.as_ref().to_glib_none().0,
539             ))
540         }
541     }
542 
set_uri(&self, uri: &str)543     fn set_uri(&self, uri: &str) {
544         unsafe {
545             ffi::gtk_link_button_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0);
546         }
547     }
548 
set_visited(&self, visited: bool)549     fn set_visited(&self, visited: bool) {
550         unsafe {
551             ffi::gtk_link_button_set_visited(self.as_ref().to_glib_none().0, visited.into_glib());
552         }
553     }
554 
connect_activate_link<F: Fn(&Self) -> glib::signal::Inhibit + 'static>( &self, f: F, ) -> SignalHandlerId555     fn connect_activate_link<F: Fn(&Self) -> glib::signal::Inhibit + 'static>(
556         &self,
557         f: F,
558     ) -> SignalHandlerId {
559         unsafe extern "C" fn activate_link_trampoline<
560             P: IsA<LinkButton>,
561             F: Fn(&P) -> glib::signal::Inhibit + 'static,
562         >(
563             this: *mut ffi::GtkLinkButton,
564             f: glib::ffi::gpointer,
565         ) -> glib::ffi::gboolean {
566             let f: &F = &*(f as *const F);
567             f(LinkButton::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
568         }
569         unsafe {
570             let f: Box_<F> = Box_::new(f);
571             connect_raw(
572                 self.as_ptr() as *mut _,
573                 b"activate-link\0".as_ptr() as *const _,
574                 Some(transmute::<_, unsafe extern "C" fn()>(
575                     activate_link_trampoline::<Self, F> as *const (),
576                 )),
577                 Box_::into_raw(f),
578             )
579         }
580     }
581 
connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId582     fn connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
583         unsafe extern "C" fn notify_uri_trampoline<P: IsA<LinkButton>, F: Fn(&P) + 'static>(
584             this: *mut ffi::GtkLinkButton,
585             _param_spec: glib::ffi::gpointer,
586             f: glib::ffi::gpointer,
587         ) {
588             let f: &F = &*(f as *const F);
589             f(LinkButton::from_glib_borrow(this).unsafe_cast_ref())
590         }
591         unsafe {
592             let f: Box_<F> = Box_::new(f);
593             connect_raw(
594                 self.as_ptr() as *mut _,
595                 b"notify::uri\0".as_ptr() as *const _,
596                 Some(transmute::<_, unsafe extern "C" fn()>(
597                     notify_uri_trampoline::<Self, F> as *const (),
598                 )),
599                 Box_::into_raw(f),
600             )
601         }
602     }
603 
connect_visited_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId604     fn connect_visited_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
605         unsafe extern "C" fn notify_visited_trampoline<P: IsA<LinkButton>, F: Fn(&P) + 'static>(
606             this: *mut ffi::GtkLinkButton,
607             _param_spec: glib::ffi::gpointer,
608             f: glib::ffi::gpointer,
609         ) {
610             let f: &F = &*(f as *const F);
611             f(LinkButton::from_glib_borrow(this).unsafe_cast_ref())
612         }
613         unsafe {
614             let f: Box_<F> = Box_::new(f);
615             connect_raw(
616                 self.as_ptr() as *mut _,
617                 b"notify::visited\0".as_ptr() as *const _,
618                 Some(transmute::<_, unsafe extern "C" fn()>(
619                     notify_visited_trampoline::<Self, F> as *const (),
620                 )),
621                 Box_::into_raw(f),
622             )
623         }
624     }
625 }
626 
627 impl fmt::Display for LinkButton {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result628     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
629         f.write_str("LinkButton")
630     }
631 }
632