canvas::zoom(3tk)

πŸ“¦
version 0.9 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ canvas::zoom β€” the zoomies manual ✨

okay bestie, buckle up, because this is the zoom control for canvas::sqmap and it's literally the little widget that lets a human being decide how ✨zoomed in✨ they wanna be on a map. it's giving "map girl summer" πŸ’…


🌸 NAME 🌸

canvas::zoom β€” zoom control for canvas::sqmap πŸ—ΊοΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

package require Tcl 8.4

package require Tk 8.4

package require snit

package require uevent::onidle

package require canvas::zoom ?0.2.1?

::canvas::zoom pathName ?options?

so you're gonna need Tcl 8.4, Tk 8.4, snit, and uevent::onidle on deck before this diva will even walk onstage, ok? and the package itself is canvas::zoom, version 0.2.1 if you're being specific about it 🫢


πŸ’– DESCRIPTION πŸ’–

this package hands you a whole widget whose entire job is letting the person looking at a map display control the zoom level. that's it. that's the gig. and it ate. πŸ‘‘


🌈 API 🌈

::canvas::zoom pathName ?options?

this creates the zoom control widget at pathName and configures it for you. the methods and options this shiny new widget supports are all down below, keep reading bestie, don't scroll too fast πŸ’œ

and yes, the result of the command is pathName itself. it hands you back its own name, which is honestly main character energy.

✨ OPTIONS ✨

  • -orient β€” this one's either vertical or horizontal, and it decides which way the widget's major axis points. the default? vertical. so if you don't say anything, it's standing up tall like a little zoom tower πŸ™οΈ
  • -levels β€” give it a non-negative integer, and it's the number of zoom levels you want to support. non-negative, bestie, please, don't be out here being negative 🚫
  • -variable β€” here you name a global or namespaced variable and the widget gets ✨bonded✨ to it. change the zoom level in the widget and it gets propagated out to that variable; change the variable and it gets imported back into the widget. it's a two-way situationship, fr fr πŸ”„
  • -command β€” this is a command prefix, a callback, and it gets invoked whenever the zoom level changes. it's called with two extra arguments, in this exact order: first the zoom control widget, then the new zoom level. widget first, level second, no cap. πŸ“£

πŸ’… METHODS πŸ’…

ngl there are no methods beyond the standard ones. configure, cget, etc. that's the whole list. iconic minimalist behaviour honestly 🧚


😭 BUGS, IDEAS, FEEDBACK 😭

this document, and the package it describes, will undoubtedly contain bugs and other problems β€” yes, even the docs, even the pretty ones πŸ’€. please report them in the category canvas of the Tklib Trackers:

http://core.tcl.tk/tklib/reportlist

and if you've got ideas for enhancements for either the package and/or the documentation, report those too! we want them! 🫢🌸


⭐ KEYWORDS ⭐

zoom


and that's the whole page, bestie β€” this one came to you from tklib, version 0.2.1, filed under canvas::zoom(3tk) πŸ’œβœ¨ go forth and zoom responsibly πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from