gtk.password_entry
Module for [PasswordEntry] class
Types 3
gtk.password_entry.PasswordEntry is an entry that has been tailored for entering secrets.
It does not show its contents in clear text, does not allow to copy it to the clipboard, and it shows a warning when Caps Lock is engaged. If the underlying platform allows it, gtk.password_entry.PasswordEntry will also place the text in a non-pageable memory area, to avoid it being written out to disk by the operating system.
Optionally, it can offer a way to reveal the contents in clear text.
gtk.password_entry.PasswordEntry provides only minimal API and should be used with the gtk.editable.Editable API.
CSS Nodes
entry.password
╰── text
├── image.caps-lock-indicator
┊gtk.password_entry.PasswordEntry has a single CSS node with name entry that carries a .passwordstyle class. The text Css node below it has a child with name image and style class .caps-lock-indicator for the Caps Lock icon, and possibly other children.
Accessibility
gtk.password_entry.PasswordEntry uses the gtk.types.AccessibleRole.TextBox role.
PasswordEntryGidBuilder builder() static nothrowGet builder for [gtk.password_entry.PasswordEntry] Returns: New builder objectbool activatesDefault() @property nothrowGet `activatesDefault` property. Returns: Whether to activate the default widget when Enter is pressed.void activatesDefault(bool propval) @property nothrowSet `activatesDefault` property. Params: propval = Whether to activate the default widget when Enter is pressed.gio.menu_model.MenuModel extraMenu() @property nothrowGet `extraMenu` property. Returns: A menu model whose contents will be appended to the context menu.void extraMenu(gio.menu_model.MenuModel propval) @property nothrowSet `extraMenu` property. Params: propval = A menu model whose contents will be appended to the context menu.string placeholderText() @property nothrowGet `placeholderText` property. Returns: The text that will be displayed in the [gtk.password_entry.PasswordEntry] when it is empty and unfocused.void placeholderText(string propval) @property nothrowSet `placeholderText` property. Params: propval = The text that will be displayed in the [gtk.password_entry.PasswordEntry] when it is empty and unfocused.bool showPeekIcon() @property nothrowGet `showPeekIcon` property. Returns: Whether to show an icon for revealing the content.void showPeekIcon(bool propval) @property nothrowSet `showPeekIcon` property. Params: propval = Whether to show an icon for revealing the content.gio.menu_model.MenuModel getExtraMenu() nothrowGets the menu model set with [gtk.password_entry.PasswordEntry.setExtraMenu]. Returns: the menu modelbool getShowPeekIcon() nothrowReturns whether the entry is showing an icon to reveal the contents. Returns: true if an icon is shownvoid setExtraMenu(gio.menu_model.MenuModel model = null) nothrowSets a menu model to add when constructing the context menu for entry.void setShowPeekIcon(bool showPeekIcon) nothrowSets whether the entry should have a clickable icon to reveal the contents.gulong connectActivate(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.password_entry.PasswordEntry)))
&& Parameters!T.length < 2) nothrowConnect to `Activate` signal.Fluent builder implementation template for gtk.password_entry.PasswordEntry
T activatesDefault(bool propval) nothrowSet `activatesDefault` property. Params: propval = Whether to activate the default widget when Enter is pressed. Returns: Builder instance for fluent chainingT extraMenu(gio.menu_model.MenuModel propval) nothrowSet `extraMenu` property. Params: propval = A menu model whose contents will be appended to the context menu. Returns: Builder instance for fluent chainingT placeholderText(string propval) nothrowSet `placeholderText` property. Params: propval = The text that will be displayed in the [gtk.password_entry.PasswordEntry] when it is empty and unfocused. Returns: Builder instance for fluent chai...T showPeekIcon(bool propval) nothrowSet `showPeekIcon` property. Params: propval = Whether to show an icon for revealing the content. Returns: Builder instance for fluent chainingFluent builder for gtk.password_entry.PasswordEntry