gtk.password_entry

Module for [PasswordEntry] class

Types 3

[gtk.password_entry.PasswordEntry] is an entry that has been tailored for entering secrets.

!An example GtkPasswordEntry

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.

Methods
GType _gType() @property
PasswordEntry self()Returns `this`, for use in `with` statements.
PasswordEntryGidBuilder builder()Get builder for [gtk.password_entry.PasswordEntry] Returns: New builder object
bool activatesDefault() @propertyGet `activatesDefault` property. Returns: Whether to activate the default widget when Enter is pressed.
void activatesDefault(bool propval) @propertySet `activatesDefault` property. Params: propval = Whether to activate the default widget when Enter is pressed.
gio.menu_model.MenuModel extraMenu() @propertyGet `extraMenu` property. Returns: A menu model whose contents will be appended to the context menu.
void extraMenu(gio.menu_model.MenuModel propval) @propertySet `extraMenu` property. Params: propval = A menu model whose contents will be appended to the context menu.
string placeholderText() @propertyGet `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) @propertySet `placeholderText` property. Params: propval = The text that will be displayed in the [gtk.password_entry.PasswordEntry] when it is empty and unfocused.
bool showPeekIcon() @propertyGet `showPeekIcon` property. Returns: Whether to show an icon for revealing the content.
void showPeekIcon(bool propval) @propertySet `showPeekIcon` property. Params: propval = Whether to show an icon for revealing the content.
gio.menu_model.MenuModel getExtraMenu()Gets the menu model set with [gtk.password_entry.PasswordEntry.setExtraMenu]. Returns: the menu model
bool getShowPeekIcon()Returns whether the entry is showing an icon to reveal the contents. Returns: true if an icon is shown
void setExtraMenu(gio.menu_model.MenuModel model = null)Sets a menu model to add when constructing the context menu for entry.
void setShowPeekIcon(bool showPeekIcon)Sets 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)Connect to `Activate` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a [gtk.passwordentry.PasswordEntry]. Returns: a new [gtk.passwordentry.PasswordEntry]
Methods
T activatesDefault(bool propval)Set `activatesDefault` property. Params: propval = Whether to activate the default widget when Enter is pressed. Returns: Builder instance for fluent chaining
T extraMenu(gio.menu_model.MenuModel propval)Set `extraMenu` property. Params: propval = A menu model whose contents will be appended to the context menu. Returns: Builder instance for fluent chaining
T placeholderText(string propval)Set `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)Set `showPeekIcon` property. Params: propval = Whether to show an icon for revealing the content. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.password_entry.PasswordEntry]