Version 1 of Pave, sort of geometry manager

Updated 2019-01-26 08:00:45 by aplsimple

The pave software provides a sort of geometry management for Tcl/Tk.

The pave isn't designed to replace the exiting Tk geometry managers (Tk GMs). Rather it tries to simplify the window layout by using their best.

The Tk GMs have the following drawbacks:

  • The place is good when you need e.g. the overlapping popup messages. Still it is rarely used because of its complexity esp. when you need a resizable window of multiple widgets.
  • The pack is very good for simple layouts. But if your layout is growing in contents and complexity, its packs start being more and more tricky, sometimes even mystic.
  • The grid is best of all. However it is tiresome and tricky at the modifications of existing layouts. The inserting/removing a cell can become a real torment with those recalculations of cells/rows and sticky/weight attributes. The usage of relative (- x ^) grid is restricted with simple layouts of table type.

All of the Tk GMs have the common drawback consisting in that the widgets' creation, configuration and layout are separated in space and time. In practice it means that to modify the layout you need look at the 2-3-4.. places of your code, namely the widgets creation / configuration / geometry management. You are happy if those separated places are spanned by your editor's screen.

The proposed pave allows you to get rid of these drawbacks by means of:

  • uniting the creation of widgets (and often their configuration) with their layout
  • minimizing a coder's efforts at inserting/removing widgets
  • joining the power of grid and pack

The pave is implemented as PaveMe oo::class, so that you can enhance it with your own inherited class.

As an example (and a bonus) you can employ PaveDialog oo::class that allows you:

  • to call the standard dialogs with a checkbox of "Don't show again" type
  • to call the standard dialogs with tagged text
  • to call the input dialog using entry, combobox, text, spinbox, checkbox, radiobutton, file/directory/color pickers

Further details:

http://aplsimple.ucoz.ru/doc/pave.html

Download link:

http://aplsimple.ucoz.ru/misc/pave.rar