1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
use crate::{Buildable, IconSize, Orientation, ReliefStyle, SizeGroup, ToolbarStyle, Widget};
use glib::{prelude::*, translate::*};
use std::fmt;
glib::wrapper! {
#[doc(alias = "GtkToolShell")]
pub struct ToolShell(Interface<ffi::GtkToolShell, ffi::GtkToolShellIface>) @requires Widget, Buildable;
match fn {
type_ => || ffi::gtk_tool_shell_get_type(),
}
}
impl ToolShell {
pub const NONE: Option<&'static ToolShell> = None;
}
pub trait ToolShellExt: 'static {
#[doc(alias = "gtk_tool_shell_get_ellipsize_mode")]
#[doc(alias = "get_ellipsize_mode")]
fn ellipsize_mode(&self) -> pango::EllipsizeMode;
#[doc(alias = "gtk_tool_shell_get_icon_size")]
#[doc(alias = "get_icon_size")]
fn icon_size(&self) -> IconSize;
#[doc(alias = "gtk_tool_shell_get_orientation")]
#[doc(alias = "get_orientation")]
fn orientation(&self) -> Orientation;
#[doc(alias = "gtk_tool_shell_get_relief_style")]
#[doc(alias = "get_relief_style")]
fn relief_style(&self) -> ReliefStyle;
#[doc(alias = "gtk_tool_shell_get_style")]
#[doc(alias = "get_style")]
fn style(&self) -> ToolbarStyle;
#[doc(alias = "gtk_tool_shell_get_text_alignment")]
#[doc(alias = "get_text_alignment")]
fn text_alignment(&self) -> f32;
#[doc(alias = "gtk_tool_shell_get_text_orientation")]
#[doc(alias = "get_text_orientation")]
fn text_orientation(&self) -> Orientation;
#[doc(alias = "gtk_tool_shell_get_text_size_group")]
#[doc(alias = "get_text_size_group")]
fn text_size_group(&self) -> Option<SizeGroup>;
#[doc(alias = "gtk_tool_shell_rebuild_menu")]
fn rebuild_menu(&self);
}
impl<O: IsA<ToolShell>> ToolShellExt for O {
fn ellipsize_mode(&self) -> pango::EllipsizeMode {
unsafe {
from_glib(ffi::gtk_tool_shell_get_ellipsize_mode(
self.as_ref().to_glib_none().0,
))
}
}
fn icon_size(&self) -> IconSize {
unsafe {
from_glib(ffi::gtk_tool_shell_get_icon_size(
self.as_ref().to_glib_none().0,
))
}
}
fn orientation(&self) -> Orientation {
unsafe {
from_glib(ffi::gtk_tool_shell_get_orientation(
self.as_ref().to_glib_none().0,
))
}
}
fn relief_style(&self) -> ReliefStyle {
unsafe {
from_glib(ffi::gtk_tool_shell_get_relief_style(
self.as_ref().to_glib_none().0,
))
}
}
fn style(&self) -> ToolbarStyle {
unsafe {
from_glib(ffi::gtk_tool_shell_get_style(
self.as_ref().to_glib_none().0,
))
}
}
fn text_alignment(&self) -> f32 {
unsafe { ffi::gtk_tool_shell_get_text_alignment(self.as_ref().to_glib_none().0) }
}
fn text_orientation(&self) -> Orientation {
unsafe {
from_glib(ffi::gtk_tool_shell_get_text_orientation(
self.as_ref().to_glib_none().0,
))
}
}
fn text_size_group(&self) -> Option<SizeGroup> {
unsafe {
from_glib_none(ffi::gtk_tool_shell_get_text_size_group(
self.as_ref().to_glib_none().0,
))
}
}
fn rebuild_menu(&self) {
unsafe {
ffi::gtk_tool_shell_rebuild_menu(self.as_ref().to_glib_none().0);
}
}
}
impl fmt::Display for ToolShell {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("ToolShell")
}
}