touchEditingMenu
Parameters
- self:*TextLayoutWidget
- *TextLayoutWidget
Source
Implementation
pub fn touchEditingMenu(self: *TextLayoutWidget) void {
var hbox = dvui.box(@src(), .{ .dir = .horizontal }, .{
.corners = dvui.ButtonWidget.defaults.cornersGet(),
.background = true,
.border = dvui.Rect.all(1),
});
defer hbox.deinit();
if (dvui.buttonIcon(
@src(),
"select all",
dvui.entypo.swap,
.{},
.{},
.{ .min_size_content = .{ .h = 20 }, .margin = Rect.all(2) },
)) {
self.selection.selectAll();
}
if (dvui.buttonIcon(
@src(),
"copy",
dvui.entypo.copy,
.{},
.{},
.{ .min_size_content = .{ .h = 20 }, .margin = Rect.all(2) },
)) {
self.copy();
}
}