#[macro_export]
macro_rules! for_each_enums {
($macro:ident) => {
$macro![
enum StandardButtonKind {
ok,
cancel,
apply,
close,
reset,
help,
yes,
no,
abort,
retry,
ignore,
}
enum DialogButtonRole {
none,
accept,
reject,
apply,
reset,
action,
help,
}
enum PointerEventKind {
cancel,
down,
up,
}
enum PointerEventButton {
none,
left,
right,
middle,
}
enum MouseCursor {
default,
none,
help,
pointer,
progress,
wait,
crosshair,
text,
alias,
copy,
r#move,
no_drop,
not_allowed,
grab,
grabbing,
col_resize,
row_resize,
n_resize,
e_resize,
s_resize,
w_resize,
ne_resize,
nw_resize,
se_resize,
sw_resize,
ew_resize,
ns_resize,
nesw_resize,
nwse_resize,
}
enum ImageFit {
fill,
contain,
cover,
}
enum ImageRendering {
smooth,
pixelated,
}
enum FillRule {
nonzero,
evenodd,
}
enum InputType {
text,
password,
}
enum TextHorizontalAlignment {
left,
center,
right,
}
enum TextVerticalAlignment {
top,
center,
bottom,
}
enum TextWrap {
no_wrap,
word_wrap,
}
enum TextOverflow {
clip,
elide,
}
enum LayoutAlignment {
stretch,
center,
start,
end,
space_between,
space_around,
}
enum PathEvent {
begin,
line,
quadratic,
cubic,
end_open,
end_closed,
}
enum EventResult {
reject,
accept,
}
enum KeyEventType {
KeyPressed,
KeyReleased,
}
];
};
}
pub fn cpp_escape_keyword(kw: &str) -> &str {
match kw {
"default" => "default_",
other => other,
}
}