ipentry(n)

πŸ“¦
version 0.7 Β· 3 versions
, in alpine 3.24

🌈 NAME 🌈

Okay so this is ipentry(n), the manual page for ipentry β€” literally an IP address entry widget, and the package is giving β€œput an IP in a slick little entry field” main character energy. No cap, that’s the name.


πŸ›°οΈ SYNOPSIS πŸ›°οΈ

Here’s the exact spellbook, bestie, characters preserved and all:

package require Tcl  8.4

package require Tk  8.4

package require ipentry  ?0.3?

::ipentry::ipentry pathName ?option value...?

::ipentry::ipentry6 pathName ?option value...?

pathName complete

pathName get

pathName insert iplist

pathName icursor index

pathName configure option value...

pathName cget option

πŸ’– DESCRIPTION πŸ’–

This package provides a widget for entering an IP address. It’s literally that. πŸ’…

  • ::ipentry::ipentry pathName ?option value...? β€” creates a new IPv4 ipentry widget and configures it with the given options and their values. Slay.
  • ::ipentry::ipentry6 pathName ?option value...? β€” creates a new ipentry widget for entering an IPv6 address. All options are the same as the IPv4 widget. Obsessed with consistency.

Each widget created with the commands above supports the following methods:

  • pathName complete β€” returns a boolean value. True indicates that the entry contains a complete IP address, meaning all fields have a value. In some cases IPv6 addresses are valid when fields are missing, so you’ll need to do your own validation to detect that. Lowkey important.
  • pathName get β€” returns the contents of the entry as a list consisting of 4 or 8 elements. Exactly that.
  • pathName insert iplist β€” okay so this one has two flavors:
    • IPv4: takes a list of 4 elements and inserts one into each quad of the entry, in order. All values in the list must be empty or integers. Values outside the range 0 to 255 are modified to be within the range.
    • IPv6: takes a list of 8 elements and inserts one into each quad of the entry, in order. All values in the list must be empty or 1 to 4 hex digits.
  • pathName icursor index β€” sets the position of the widget’s insertion cursor. Only integer values between 0 and 15 are valid for ipentry and 0 to 31 for ipentry6. Setting the icursor will only have an effect if the widget already has the input focus. Focus matters, bestie.
  • pathName configure option value... β€” modifies the configuration of the widget. For options and their meaning see the widget options section.
  • pathName cget option β€” returns information about the current configuration of the widget, for the specified option. For options and their meaning see the widget options section.

πŸŽ€ WIDGET OPTIONS πŸŽ€

Options time. Each one has a Command-Line Switch, Database Name, and Database Class, and we are keeping every single one. No skipping, periodt.

  • -textvariable β€” Command-Line Switch: -textvariable; Database Name: textvariable; Database Class: Variable. The name of a variable which holds the value of the IP address. The value must be a string of the form NNN.NNN.NNN.NNN for IPv4 or HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH for IPv6 where H is a hex digit. The variable will be modified to represent a valid IP address if it is not already.
  • -state β€” Command-Line Switch: -state; Database Name: state; Database Class: State. Specifies one of three states for the entry: normal, disabled, or readonly.

And now the standard widget options, bestie. They all get the same treatment:

  • -font β€” Command-Line Switch: -font; Database Name: font; Database Class: Font.
  • -bd β€” Command-Line Switch: -bd; Database Name: borderWidth; Database Class: BorderWidth.
  • -fg β€” Command-Line Switch: -fg; Database Name: foreground; Database Class: Foreground.
  • -bg β€” Command-Line Switch: -bg; Database Name: background; Database Class: Background.
  • -relief β€” Command-Line Switch: -relief; Database Name: relief; Database Class: Relief.
  • -highlightthickness β€” Command-Line Switch: -highlightthickness; Database Name: highlightThickness; Database Class: HighlightThickness.
  • -highlightcolor β€” Command-Line Switch: -highlightcolor; Database Name: highlightColor; Database Class: HighlightColor.
  • -highlightbackground β€” Command-Line Switch: -highlightbackground; Database Name: highlightBackground; Database Class: HighlightBackground.
  • -selectbackground β€” Command-Line Switch: -selectbackground; Database Name: selectBackground; Database Class: Background.
  • -selectforeground β€” Command-Line Switch: -selectforeground; Database Name: selectForeground; Database Class: Foreground.
  • -selectborderwidth β€” Command-Line Switch: -selectborderwidth; Database Name: selectBorderWidth; Database Class: BorderWidth.
  • -disabledbackground β€” Command-Line Switch: -disabledbackground; Database Name: disabledBackground; Database Class: DisabledBackground.
  • -disabledforeground β€” Command-Line Switch: -disabledforeground; Database Name: disabledForeground; Database Class: DisabledForeground.
  • -readonlybackground β€” Command-Line Switch: -readonlybackground; Database Name: readonlyBackground; Database Class: ReadonlyBackground.
  • -insertbackground β€” Command-Line Switch: -insertbackground; Database Name: insertBackground; Database Class: Background.

These are all standard widget options. See options for a description of their meanings and values.


πŸ› BUGS, IDEAS, FEEDBACK πŸ›

Real talk: this document, and the package it describes, will undoubtedly contain bugs and other problems. Not me being dramatic β€” that’s literally what the page says. Please report such in the category ipentry of the Tklib Trackers at http://core.tcl.tk/tklib/reportlist. Please also report any ideas for enhancements you may have for either package and/or documentation. We love feedback, fr fr. 🫢


πŸ”‘ KEYWORDS πŸ”‘

  • entry
  • ip address
  • network

🌈 CATEGORY 🌈

Widget β€” that’s the category, bestie. Iconic.


πŸ’– That’s the whole page β€” source tklib, version 0.3, and ipentry(n) chilling in the footer date spot. Now go forth and enter those IPs, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from