1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169
|
<html>
<head>
<meta name="description" content="Pmw - a toolkit for building high-level compound widgets in Python">
<meta name="content" content="python, megawidget, mega widget, compound widget, gui, tkinter">
<title>Pmw todo list</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ee"
vlink="551a8b" alink="ff0000">
<h1 ALIGN="CENTER">Pmw todo list</h1>
<p>
<p>
This is a long list of suggestions and enhancements for Pmw. If
you are interested in doing any of these, please let me
(<em>gregm@iname.com</em>) know.</p>
<p><strong>New Pmw megawidgets</strong></p>
<ul><li><p>Multicolumn listbox.</p>
<p> Useful features - smooth scrolling, embedded images, different
fonts and colours, text correctly masked when it is longer than
its column width, interactive resizing of columns.</p>
<p> Probably should be implemented as canvas widget rather than by
using multiple frames or multiple listboxes. There would be a
lot of work needed to position all the elements - you can't just
pack or grid them.</p>
<li><p>File dialog.</p>
<li><p>Main window class (App class), with menu bar, information line
with status boxes and an about box. (See iwidgets' mainwindow
class for example.) This should handle creation of multiple main
windows, recycling of unused main windows and should exit if
last open main window is closed.</p>
<li><p>Searchable text megawidget.</p>
<li><p>Tree browser.</p>
<li><p>Check out Doug Hellmann's contributed megawidgets at
<http://www.mindspring.com/~doughellmann/Projects/PmwContribD> or
<http://members.home.net/doughellmann/PmwContribD/>
and integrate into Pmw.</p>
</ul>
<p><strong>Changes to current megawidgets</strong></p>
<p> MegaToplevel</p>
<ul><li><p>Modify activate() geometry argument to allow window positioning
relative to the pointer, another window or the screen and
allow the centering of the window relative to the
positioning point or by a specified offset. Also add the
ability to position the window so that the mouse is over a
particular widget in the toplevel.</p>
<p> Should handle all combinations of</p>
<dl><dd><pre> when (always/first)
where (center/geometry/mouse)
parent (screen/window)
and None (don't position)</pre></dl>
<p> Check Tix4.1.0/library/DialogS.tcl center method for how to
center over another window</p>
<p> Check iwidget's shell.itk for code to center widget over
screen or another widget.</p>
<p> See Pmw.Balloon code for how to position over pointer.</p>
<p> Tcl code to center over another (parent) window:</p>
<dl><dd><pre> # center client relative to master (default xoff, yoff = -1)
set geomaster [split [wm geometry $master] "x+"]
set geoclient [split [wm geometry $client] "x+"]
if {$xoff == -1} {
set xoff [expr (
([lindex $geomaster 0] - [lindex $geoclient 0]) / 2)]
}
set newxpos [expr [lindex $geomaster 2] + $xoff]
if {$yoff == -1} {
set yoff [expr (
([lindex $geomaster 1] - [lindex $geoclient 1]) / 2)]
}
set newypos [expr [lindex $geomaster 3] + $yoff]
wm geometry $client +$newxpos+$newypos</pre></dl>
<p> More tcl code to center dialog over another (parent) window:</p>
<dl><dd><pre> (args: parent dlg)
# First, display the dialog offscreen to get dimensions.
set screenW [winfo screenwidth $parent]
set screenH [winfo screenheight $parent]
set w [expr $screenW + 1]
wm geometry $dlg +$w+0
update
# Get relative center of parent.
set w [winfo width $parent]
set h [winfo height $parent]
set w [expr $w/2]
set h [expr $h/2]
# Get and add screen offset of parent.
set w [expr $w + [winfo rootx $parent]]
set h [expr $h + [winfo rooty $parent]]
# Get dimensions of dialog.
set dlgW [winfo width $dlg]
set dlgH [winfo height $dlg]
# Make adjustments for actual dimensions of dialog.
set w [expr $w - $dlgW / 2]
set h [expr $h - $dlgH / 2]
# Let's keep the entire dialog onscreen at all times.
# Center in screen if things are awry.
set recenter 0
if { $w < 0 } { set recenter 1 }
if { $h < 0 } { set recenter 1 }
if { [expr $w + $dlgW] > $screenW } { set recenter 1 }
if { [expr $h + $dlgH] > $screenH } { set recenter 1 }
if { $recenter } {
set w [expr ($screenW -$dlgW) / 2]
set h [expr ($screenH - $dlgH) / 2]
}
wm geometry $dlg +$w+$h</pre></dl>
<li><p>Add geometry argument to show() (same as activate() above).</p>
</ul>
<p> Dialog</p>
<ul><li><p>Add label (header?) to Dialog class. May not be necessary, or
too complicated.</p>
</ul>
<p> ButtonBox</p>
<ul><li><p>When a horizontal ButtonBox is stretched, the left button
stays anchored to the left edge and there is too much space
between the last button and the right edge.</p>
<li><p>Add an option to either evenly space the buttons across the
button box, or to keep them together and justify them to the
left, right or center. Check that deleting buttons works
correctly.</p>
</ul>
<p> ComboBox</p>
<ul><li><p>Remove arrowrelief option from ComboBox and do what counter
does: gets value of arrow's relief just before sinking it,
then restores it later.</p>
<li><p>Change bindings: remove all bindings from arrow key and remove
arrow key from <tab> focus sequence; only implement these
bindings on the entry widget:</p>
<dl><dd><pre> Up popup dropdown list, scroll up if already displayed
Down popup dropdown list, scroll down if already displayed
Esc popdown dropdown list, return entry to previous value
Enter popdown dropdown list, execute current selection</pre></dl>
<p> Remove bindings from listbox and scrollbar(s), so that all
bindings are via the entry widget?</p>
<li><p>When entering keys when list is displayed, scroll list to
first entry beginning with entered keys. If no match,
scroll list to top.</p>
<li><p>Remove many of the arrow bindings from Pmw.ComboBox - there
are just too many key bindings on the arrow button. There
is no need for it to respond to keys such as the up/down
keys when the adjacent Entry widget already does so. I
propose to remove all Pmw.ComboBox arrow button key bindings
except for <space>, which can be used to bring up the
dropdown list. The Entry widget behaviour would remain
unchanged: when it has focus, you can use the up/down keys
to go to the next/previous entries and then use <Return> to
invoke the selection command.</p>
<p> Alternatively, make the bindings the same as the MS-Windows
combobox. (Use the url entry field in Navigator or IE as an
example of MS-Windows behaviour). These have been reported
to be:</p>
<ul><li><p>All mouse actions are exclusively triggered by the left
button.</p>
<li><p>Right button displays "Direkthilfe" on my german system
("Direct Help"). This is a floating button, that
triggers display of a tool tip like the |?| button that
appears next to the |x| at the right end of the title
bar of some native windows dialogs.</p>
<li><p>The arrow is very slim (acutally flat: width/height is
about 2/1)</p>
<li><p>Entry and popup have the same color ("window color")</p>
<li><p>The popup has a 1 pixel dark border, no spacing between
popup and scrollbar.</p>
<li><p>If the box has the focus, the full entry is displayed in
"selected" style.</p>
<li><p>If the box has the focus, up and left keys rotate items
up, down and right keys rotate items down, all with
immediate effect.</p>
<li><p>If the box has the focus, keys a-z (not case sensitive)
rotate through the items with same first character, with
immediate effect.</p>
<li><p>No separate focus for the arrowbutton</p>
<li><p>Discussing how the combobox behaves with arrow keys when
it has the focus: "The concept is almost identical to
what you already have, just gives more visual feedback.
In your current implementation you allow to rotate
through the values with the up and down arrow keys,
showing the strings in the entryfield, and accepting the
values when the user presses the spacebar (hmmm, how can
I exit this without moving back to the original value
manually?). On Windows, the choice is not shown in the
entryfield, but the popup opens when you press the up or
down arrow keys, as if you clicked on the arrowbutton,
and you then navigate the values in the listbox. This
avoids the display of not finally selected values in the
entryfield and is a lot more obvious and less confusing.
The current behaviour certainly confused me, which is
why I first proposed the changes to the moveup/down
methods." (Georg Mischler)</p>
</ul>
<p> Also, check bindings on other megawidgets for consistency.</p>
<li><p>Modify Pmw.ComboBox so that the width of the entry widget is
forced to be the same as the width of the dropdown listbox.
If the "width" option to the standard listbox is 0, Tk sets
the requested width of the listbox to be just large enough
to hold the widest element in the listbox. Using this
option, I can see that listbox.winfo_reqwidth() is changing
as I insert items into an unmapped listbox. The question
is, how do I get notified of these events so that I can set
the width of the entry?</p>
<p> The problem is that the listbox is in another toplevel which
has not yet been displayed, so I can't bind to <Configure>
to determine its width.</p>
<p> One suggestion is to override the insert and delete methods
of the Listbox class. The problem with this is what if the
font changed, or the borderwidth, etc? You would need to
override and check many more methods.</p>
</ul>
<p> Counter</p>
<ul><li><p>Add option for different increment/decrement behaviour. For
example, assuming increment is 1:</p>
<ol><li><p>Current behaviour - move to the next multiple of the
increment, eg: 1.0 -> 2.0, 1.234 -> 2.0</p>
<li><p>Add or subtract the increment to whatever is displayed,
eg: 1.0 -> 2.0, 1.234 -> 2.234</p>
<li><p>Move to the next multiple of the increment, offset by some value.
eg: (if offset is 0.5) 0.5 -> 1.5, 1.234 -> 1.5, 1.678 -> 2.5</p>
</ol>
<li><p>Add wrap option (to wrap around at limits) (then don't need
time24 arg to <strong>'time'</strong> datatype).</p>
<li><p>Add a state option to disable Counter.</p>
<li><p>Add option to Counter to allow the buttons to be on the same
side, one on top of the other, like Tix, Itcl, Motif,
Windows 95, etc. There should probably also be an option to
lay the current large buttons on the same side of the entry
field, next to each other.</p>
<li><p>Redo TimeCounter using vertical Counter, add limitcommand
option to Counter to allow overflow from seconds to minutes
to hours</p>
</ul>
<p> Arrowed megawidgets (Counter, ComboBox, TimeCounter)</p>
<ul><li><p>Potential construction speed up if Canvas arrows are replaced
by Label with Bitmap or BitmapImage. The hard part would be
to make the bitmap change size depending on size of Label.</p>
<li><p>Pmw.drawarrow should draw arrows which look like Tk cascade
menu arrows.</p>
</ul>
<p> EntryField</p>
<ul><li><p>Can it be modified to change all entered characters to upper
or lower case automatically? Or first-upper or
first-of-each-word-upper?</p>
<li><p>If the validity of the currently displayed text is ERROR,
allow any changes, even those which result in invalid text.
This is useful when invalid data has been given to the
<strong>value</strong> option and the user is trying to correct it.</p>
</ul>
<p> LabeledWidget</p>
<ul><li><p>Add tix-style border.</p>
</ul>
<p> MenuBar</p>
<ul><li><p>Maybe Pmw.MenuBar should also have (optional) balloon help
for menu items as well as menu buttons. I am not sure
whether users would find this useful.</p>
<li><p>The status help hints do not appear when using F10/arrow
keys.</p>
<li><p>Look at the Tk8.0 menu demo and check the help bindings for
ideas, in particular, how can you get help when using
keyboard bindings.</p>
<li><p>Check the new menu features in Tk8.0 for creating "native"
menu bars and the special ".help" menu.</p>
<li><p>Add index() method.</p>
<li><p>Add a <strong>'position'</strong> option to addmenu and deletemenu methods.
This option should accept an index number, a menuName or
<strong>Pmw.END</strong>.</p>
<li><p>Look at itcl menubar for ideas.</p>
</ul>
<p> Balloon</p>
<ul><li><p>Positioning of the balloon with respect to the target
widget or canvas item: There are a number of ways that
Pmw.Balloon could be improved. For example, currently the
the top left corner of the balloon is positioned relative to
the bottom left corner of the target, offset by the
[xy]offset options. These options apply to all targets -
they can not be set differently for different targets.</p>
<p> To make it more configurable, the user should be able to
specify, for each target:</p>
<ul><li><p>the base position in the target relative to which the
balloon should be placed (n, s, e, w, nw, sw, ne, se, c)
(Currently sw)</p>
<li><p>the x and y offsets (Default (20, 1))</p>
<li><p>the position in the balloon that should be placed at the
offset position (n, s, e, w, nw, sw, ne, se, c)
(Currently nw)</p>
<p> Note, if this is anything other than nw,
update_idletasks() will need to be called to get the
size of the balloon before it is positioned - there is a
possibility that this may cause weird ugly flashing.</p>
<li><p>whether either the base x or y position should be taken
relative to the current mouse position rather than as
one of the corners of the target. This would be useful
for large targets, such as text widgets, or strange
shaped canvas items. This could be specified using
special base positions, such as (nm, sm, em, wm). For
example, for <strong>'sm'</strong>, the x base position is the mouse x
position and y base position is the bottom (south) edge
of the target.</p>
</ul>
<p> The user should be able to specify global defaults for all
of these, as well as be able to override them for each
target. The Pmw.Balloon options and their defaults could
be:</p>
<dl><dd><pre> basepoint sw # Position on target.
anchor nw # Position on the balloon
xoffset 20 # x distance between basepoint and anchor
yoffset 1 # y distance between basepoint and anchor</pre></dl>
<p> To be able to override these, the bind() and tagbind()
methods would have to accept these as additional arguments.
Each would default to None, in which case the default values
at the time the balloon is deiconified would be used.</p>
<p> I'm not sure about how to handle the case when the balloon
is configured to come up under the mouse. When this happens
the balloon flashes on and off continuously. This can
happen now if you set the yoffset to a negative number.
Should the balloon widget detect this and do something about
it?</p>
<li><p>Add showballoon(x, y, text) method to Balloon and use in
balloon help for a listbox:</p>
<p> On 3 Dec, Michael Lackhoff wrote:</p>
<dl><dd><pre> And another question:
Is it possible to create a balloon-help for the entries
in the listbox? Not all the information is in the
listbox and it would be nice if a balloon help could
give addtional information.</pre></dl>
<p> Rather than popup a balloon help window as the mouse moves
over items in the listbox, I think it would be better if it
pops up after you clicked on an item (or a short time
afterwards). Pmw.Balloon displays the balloon help a short
time after the mouse enters a widget, so is not directly
usable in this case. However, a method could be added to
Pmw.Balloon to request it to popup the balloon at a
particular x,y position. This method could be called from
the listbox_focus method above. Something like:</p>
<dl><dd><pre> def listbox_focus(self, event):
self.indexlist.component('listbox').focus_set()</pre></dl>
<dl><dd><pre> text = self.indexlist.getcurselection()
# expand text to whatever you want:
text = 'This is ' + text
self.balloon.showballoon(x, y, text)</pre></dl>
<p> The Pmw.Balloon showballoon() method would have to set a
timer which sometime later calls another method which
displays the text. You would also need to bind
<ButtonRelease-1> to a hideballoon() method which withdraws
the popup.</p>
<li><p>The balloon can be displayed off-screen if the window is
near the edge of the screen. Add a fix so that the balloon
always stays on the screen (but does not popup under the
mouse, otherwise it will immediately pop down).</p>
<li><p>Add a fix so that the balloon does not disappear if the
mouse enters it. Could do this by setting a short timer on
the Leave event before withdrawing the balloon and if there
is an Enter event on the balloon itself, do not withdraw it.</p>
<li><p>For tagged items in text widgets, the balloon is placed
relative to the character in the tagged item closest to the
mouse. This is not consistent: in the other cases
(including canvas), the balloon is placed relative to the
bottom left corner of the widget or canvas item. This
should also be the case for text items.</p>
<li><p>Is the new (in Tk8) "<<MenuSelect>>" event useful for
balloon and/or status help.</p>
</ul>
<p> MessageBar</p>
<ul><li><p>Finish logmessage functionality.</p>
<li><p>Add colours and fonts to MessageBar message types. For
example, systemerror message types could have bold font on a
red background.</p>
<li><p>Add message logging history view (like the ddd debugger).</p>
</ul>
<p> NoteBook</p>
<ul><li><p>Notebook should recalculate layout if the requested size of a tab
changes (eg font size, text, etc).</p>
<li><p>The tabpos option should accept <em>s</em>, <em>e</em> and <em>w</em> as well as <em>n</em>.</p>
<li><p>Possible new options (borrowed from iwidgets):</p>
<ul><li><p><strong>equaltabs</strong></p>
<p> If set to true, causes horizontal tabs to be equal in
in width and vertical tabs to equal in height.</p>
<p> Specifies whether to force tabs to be equal sized or
not. A value of true means constrain tabs to be equal
sized. A value of false allows each tab to size based
on the text label size. The value may have any of the
forms accepted by the Tcl_GetBoolean, such as true,
false, 0, 1, yes, or no.</p>
<p> For horizontally positioned tabs (tabpos is either s or
n), true forces all tabs to be equal width (the width
being equal to the longest label plus any padX speci-
fied). Horizontal tabs are always equal in height.</p>
<p> For vertically positioned tabs (tabpos is either w or
e), true forces all tabs to be equal height (the height
being equal to the height of the label with the largest
font). Vertically oriented tabs are always equal in
width.</p>
<p> Could have a special value which sets equal sized and
also forces tabs to completely fill notebook width
(apparently like
Windows).</p>
<li><p><strong>tabgap</strong></p>
<p> Specifies the amount of pixel space to place between
each tab. Value may be any pixel offset value. In addi-
tion, a special keyword overlap can be used as the
value to achieve a standard overlap of tabs. This value
may have any of the forms acceptable to Tk_GetPixels. </p>
<li><p><strong>raiseselect</strong></p>
<p> Sets whether to raise selected tabs slightly (2 pixels).</p>
<p> Specifes whether to slightly raise the selected tab
from the rest of the tabs. The selected tab is drawn 2
pixels closer to the outside of the tabnotebook than
the unselected tabs. A value of true says to raise
selected tabs, a value of false turns this feature off.
The default is false. The value may have any of the
forms accepted by the Tcl_GetBoolean, such as true,
false, 0, 1, yes, or no.</p>
<li><p><strong>bevelamount</strong></p>
<p> Specifies pixel size of tab corners. 0 means no corners.</p>
</ul>
</ul>
<p> OptionMenu</p>
<ul><li><p>Should accept focus and obey up and down arrow keys.</p>
</ul>
<p> PanedWidget</p>
<ul><li><p>Add index() method</p>
<li><p>Modify all methods so that they accept <strong>Pmw.END</strong> as a pane
identifier as well as an index or a name.</p>
<li><p>Check iwidgets pane and panedwindow classes.</p>
</ul>
<p> RadioSelect</p>
<ul><li><p>Add insert() and delete() methods.</p>
<li><p>The index method should have <strong>forInsert</strong> argument.</p>
<li><p>Add Pmw.SELECT to index() method. For single selectmode
this returns an integer, for multiple selectmode this
returns a list of integers.</p>
</ul>
<p> LogicalFont</p>
<ul><li><p>Add boldFixed fonts,</p>
<li><p>Search for closest size font if no exact match.</p>
<li><p>Maybe replace with Tk8.0 font mechanism.</p>
<li><p>Can the Tk8.0 font measuring functionality be used in Pmw somehow?</p>
</ul>
<p> Scrolled widgets</p>
<ul><li><p>Can some common scrolling methods be factored out, either as
a base class, "ScrolledMixin" mixin class or as helper functions?
Candidate methods: constructor, destroy, interior, _hscrollMode,
_vscrollMode, _configureScrollCommands, _scrollXNow, _scrollYNow,
_scrollBothLater, _scrollBothNow, _toggleHorizScrollbar,
_toggleVertScrollbar.</p>
<li><p>ScrolledField should have optional arrow buttons, so that it
can still be scrolled even if the mouse does not have a
middle button.</p>
</ul>
<p> Miscellaneous</p>
<ul><li><p>Add a button to the Pmw "Stack trace window" which
optionally removes all grabs:</p>
<p> I normally interact with the "Stack trace window"
immediately, and dismiss it afterwards. In many cases
where a bug appears like this, the rest of the application
is still functional (many of the problems appearing at
this stage of development of my application are unforeseen
exceptions communicating with a robot on the other end of
a socket, not affecting the GUI per se). For that reason
I'd prefer if the "stack trace window" would push another
grab on the grab stack (if any grabs are active at the
moment the exception occurs). Could the window have an
extra "Terminate application" option for this case?</p>
<li><p>need to handle component option queries in configure():</p>
<dl><dd><pre> foo = Pmw.AboutDialog(applicationname = 'abc XYZ')
foo.component('message').configure('text') - works
foo.cget('message_text') - works
foo.configure('message_text') - doesn't</pre></dl>
<li><p>Implement bindings (ComboBox, etc) via a dictionary lookup,
to allow people to invent new bindings, such as for
handicapped users. (Suggested by Michael McLay)</p>
<li><p>Modify bundlepmw.py so that it checks Pmw.def to see that no
files have been missed.</p>
<li><p>Potential cheap speedup by adding this to each module, or
inside functions if it has a loop containing calls to
builtins:</p>
<dl><dd><pre> from __builtin__ import *</pre></dl>
<li><p>Look at how update_idletasks and after_* are used in Pmw -
are they consistent? could it be improved? What are the
problems of using these on other bits of an application
(such as when the size of the toplevel is being determined
for the window manager).</p>
<li><p>If lots of errors occur (such as in a fast time callback)
the error window may not appear, since Tk will wait until it
is idle - which may never occur. The solution is to call
update_idletask when updating the error window, but only
after a short time has passed. This will provide better
user response. However, it may not be possible to do this
if some python interpretes (omppython, for example) do not
handle calls to update_idletasks at certain times.</p>
<li><p>In the Pmw FAQ, in the "Why don't Pmw megawidgets have a
<strong>'state'</strong> option?" section, it mentions several Pmw
megawidgets that can not be disabled. Fix them.</p>
<li><p>Add RCSID version string to all files.</p>
<li><p>When raising exceptions use the third argument to raise:</p>
<dl><dd><pre> raise SimulationException, msg, sys.exc_info()[2]</pre></dl>
<li><p>When update_idletasks is called all pending changes are
flushed to the window system server. However, it may take
some time for the server to display the changes. If it is
required that the display be up-to-date, update_idletasks
should be followed by a call that blocks until processed by
the server and a reply received. This may be useful in
Pmw.busycallback to ensure the busy cursor remains visible
until the display is actually modified.</p>
<li><p>There is a small bug which appears only with Tk8.0 (the bug
is not apparent with Tk4.2). If a dialog is activated and
pops up directly over the cursor and the dialog has a
default button, then pressing the <strong>Return</strong>
key will not invoke the default button. If you move the
mouse out of and then back into the dialog, pressing the
<strong>Return</strong> key will work. This behaviour has
been noticed in Tcl-only programs, so it is probably a bug
in Tk. (Tested on Solaris.)</p>
<li><p>Modify PmwBlt.py to use blt2.4 instead of blt8.0.unoff.
Nick Belshaw <nickb@earth.ox.ac.uk> is looking at wrapping
the new BLT StripChart and TabSet into Pmw.</p>
<li><p>Perhaps Pmw should have its own exception defined, like
TkInters's TclError, perhaps called PmwError.</p>
<li><p>This one is caused by a bug in the implementation of Tcl/Tk
for Microsoft Windows NT (and maybe other Microsoft
products). Mouse release events can get lost if the
grab_set and grab_release commands are used and the mouse
goes outside of the window while the mouse button is down.
This can occur while Pmw modal dialogs are active. Below
is some Tkinter-only code which demonstrates the problem.
Maybe there is a work around.</p>
<dl><dd><pre> # Test script to demonstrate bug in Tk
#implementation of grab under NT.
# Click on "Dialog" to bring up the modal
# dialog window. Then button down on the scale,
# move the mouse outside the window,
# then button up. The scale slider will still
# be sunken and clicks on the "OK" button
# will be ineffective.
import Tkinter
def activate():
waitVar.set(0)
toplevel.deiconify()
toplevel.wait_visibility()
toplevel.grab_set() # Problem here
toplevel.focus_set()
toplevel.wait_variable(waitVar)
def deactivate():
toplevel.withdraw()
toplevel.grab_release() # and here
waitVar.set(1)
root = Tkinter.Tk()
toplevel = Tkinter.Toplevel()
waitVar = Tkinter.IntVar()
toplevel.withdraw()
scale = Tkinter.Scale(toplevel, orient='horizontal', length=200)
scale.pack()
button = Tkinter.Button(toplevel, text='OK', command=deactivate)
button.pack()
button = Tkinter.Button(text='Dialog', command=activate)
button.pack()
button = Tkinter.Button(text='Exit', command=root.destroy)
button.pack()
root.mainloop()</pre></dl>
</ul>
<p><strong>Documentation</strong></p>
<ul><li><p>Complete all doco.</p>
<li><p>Add short examples to all megawidget manual pages.</p>
<li><p>Check if time24 is documented in EntryField/Counter man page.</p>
<li><p>Add a comment to Blt.html doco that it also covers the blt busy
command.</p>
<li><p>Document how to get Pmw working on a Mac, for example:</p>
<ul><li><p>Unzip and untar</p>
<p> This depends on what you use to unpack the tar file. If
you use (macgzip and) SunTar you have to tell it that files
with ".py" extensions are text files (in the
preferences/file type section). If you use stuffit
expander: this can be made to do the conversion
correctly, but it could be that this only works if you set
the .py extension correctly in Internet Config.</p>
<ul><li><p>Where do you untar Pmw?</p>
<li><p>How do you get line terminators correct (carriage
return/line feed)?</p>
<li><p>Is there any problem with file name case? (mixed
upper/lower case)</p>
<li><p>Is there any problem with file name length?</p>
</ul>
<p> (Joseph Saltiel says: It was the same type of operation
as in Windows/Unix. Run a program that unzips it and
untars it. It seems to get case and length right on its
own.)</p>
<li><p>Let python know where Pmw is</p>
<ul><li><p>If Pmw is in its own folder you will have to add the
parent of that folder to the sys paths in Edit
PythonPaths. If it is in the Python home folder, you
do not need to do this.</p>
<li><p>Make sure that the Pmw folder is called "Pmw" and not
something else. Since Pmw is a package, python expects
to find a "Pmw" folder somewhere in sys.path.</p>
</ul>
<p> (Joseph Saltiel says: With the Python distribution on the
Mac there is an application called editPythonPrefs, when
you run it it gives you a list of a paths. These paths
are similiar to the PYTHONPATH variable. I just added the
path to Pmw at the bottom of this list.)</p>
</ul>
<li><p>Error in Counter doco: add <strong>'yyyy'</strong> argument to <strong>'date'</strong> datatype:
The <strong>'date'</strong> counter also accepts a <strong>'yyyy'</strong> argument. If 0, the year
field will be displayed with 2 digits, otherwise it will be
displayed with 4 digits. The default is 0.</p>
<li><p>Add this explanation to MessageBar doco (from email reply):</p>
<p> Pmw.MessageBar can be used for both interactive help messages
(when the mouse enters certain widgets) and also for other
general messages.</p>
<p> To perform the help function it is integrated with the Balloon
help widget so that the programmer (or user) can choose either
balloon help, message bar help, both or neither.</p>
<p> The MessageBar supports a configurable number of message types.
The default types include <strong>'state'</strong>, <strong>'help'</strong>, <strong>'usererror'</strong> and
<strong>'systemerror'</strong>. The difference between these are the length of
time they are displayed, the number of bells that are rung and
the priority of the message. For example, the <strong>'help'</strong> message
type is lower in priority than the <strong>'usererror'</strong>, so that error
messages will always be displayed in preference to help messages
regardless of the order the messages are created in. The
<strong>'state'</strong> message type is lowest in priority but has no timeout,
so it should contain messages describing the current state of
the application, such as 'Waiting for
database connection' or
'Waiting for
file to be unlocked'. I generally set this to the
empty string when the application is running normally. By
default the help messages (with message type <strong>'help'</strong>) time out
after 5 seconds, so that if the cursor happens to be left over a
widget, the application state will be redisplayed after a short
time.</p>
<li><p>Document general ideas about building guis, eg:</p>
<p> When I write gui applications, I usually defer creation of windows
as much as possible - this means that the application starts up
quickly because it usually only has to create the main window.
Whenever another window is required for the first time, it is
created then. When the user has finished with the window, the
window is withdrawn, not deleted, so that next time it is required
it much faster to come up.</p>
<p> In summary - don't create a window until you need and
don't destroy a window if you may want it again.</p>
<p> The amount of memory required to keep the windows should not be
very much - except for very long running programs where the user
may create thousands of different windows.</p>
<li><p>Add class hierarchy diagram to documentation:</p>
<dl><dd><pre> MegaArchetype
MegaToplevel
etc
MegaWidget
etc</pre></dl>
<li><p>Add to doco something like: "Another way to extend a Pmw
megawidget is to specify a non-default type for one of the
components. For example <code>text_pytype = FontText</code>."</p>
<li><p>Document pyclass and pyclass = None (options for null components
are ignored; the only time this can be used is with the
Group's tag component - all
other's use the component widget in some way)</p>
<li><p>Doc: Pmw.Color.setscheme: this changes the initial colours of all
widgets created after the call to this function.</p>
<li><p>Create index of all Pmw methods, functions, options, components.</p>
<li><p>Add description of how to run the Pmw demos without installing.</p>
<li><p>Add description of how to install Pmw.</p>
<li><p>Describe grid structure of megawidgets, so that it is possible
to extend megawidgets by adding new widgets into the interior
(hence avoiding a childsite in most megawidgets)</p>
<li><p>Document error display and difference between callback and
binding error reports.</p>
<li><p>Document difference between <strong>'Helvetica 12'</strong> and <strong>'Helvetica size: 12'</strong>
in logicalfont.</p>
<li><p>Add to howtouse, to describe using the option database to set
options for a specific megawidget:</p>
<dl><dd><pre> import Pmw
root = Pmw.initialise(useTkOptionDb = 1)
root.option_add('*entryfield24*Label.text', 'German')
e = Pmw.EntryField(hull_name = 'entryfield24', labelpos = 'w')
e.pack()
root.update()</pre></dl>
<li><p>Also document hull_name and hull_class.</p>
<li><p>Finish FAQ, ReleaseProcedure and StructuredText test.</p>
<li><p>Put html through gifwizard and html lint.</p>
<dl><dd><pre> http://www.cen.uiuc.edu/cgi-bin/weblint
(eg: http://www.cre.canon.co.uk/~neilb/weblint/manpage.html)</pre></dl>
<li><p>Delete comments from source if they have been added to docs
(should not have two copies of anything).</p>
<li><p>Add name and short description for each megawidget, even if rest
of reference manual in incomplete.</p>
<li><p>Need to document non-standard initial values for component
options, such as border in ButtonBox and Dialog's childsite.</p>
<li><p>Docs should have DEFAULT BINDINGS section (like iwidget combobox).</p>
<li><p>Promote home page:</p>
<dl><dd><pre> http://www.geocities.com/homestead/promote.html
http://www.submit-it.com/subopt.htm, etc</pre></dl>
<li><p>Document font functions.</p>
<li><p>Create man pages as well as html (modify createmanuals to produce both).</p>
<li><p>Maybe something with html frames like: itcl2.2/html/index.html</p>
<li><p>Add to Pmw coding conventions:</p>
<ul><li><p>Surround <strong>=</strong> with spaces when used with keyword parameters.</p>
<li><p>Multi-line function calls should have one keyword parameter
per line.</p>
</ul>
<li><p>Add to starting.html a note that Pmw is a python "package" and add
a pointer to python documentation on packages.</p>
<li><p>Document scrolled widget implementations, explaining why they
are all slightly different (because the underlying widgets which
are being scrolled have different behaviors).</p>
<li><p>Make copyright clearer. Maybe borrow python's?</p>
</ul>
<p><strong>Demos</strong></p>
<ul><li><p>Check for missing demos.</p>
<li><p>In all demos can move the three lines beginning with "Import Pmw
from the sibling directory", to inside "if __name__" clause.
Also, "sibling directory" is now incorrect. Also, add note that
this is only necessary when running demos without installing Pmw.</p>
<li><p>Change demo/All.py so that it displays the traceback if it
cannot load or run a demo (easier for users to report errors).</p>
<li><p>Add option to demo/All.py: "Display demos in separate window"
to allow resizing of sub-demos</p>
<li><p>TimeCounter and Spectrum demos beep when they come up, using:</p>
<dl><dd><pre> root.option_add('*EntryField*value', 'VALUE')</pre></dl>
<li><p>In demos, add <code>title = 'blah'</code> to top of file and replace
<code>root.title(..)</code> with <code>root.title(title)</code> at bottom.</p>
<li><p>Add comprehensive speed test demo which creates one or more of
each (common) megawidget. Remove old SpeedTest demo.</p>
<li><p>Check demos work when called from ptui. (Changes have to do
with calling compile/exec where __name__ is not the name of the
All.py script, but is <strong>'__builtin__'</strong>)</p>
<li><p>PromptDialog demo should not remember password.</p>
<li><p>Finish Counter, Radioselect demos.</p>
<li><p>Modify the All demo so that you can reload a demo module.</p>
<li><p>The syntax-coloured code viewer looks strange on Microsoft NT,
because the size of the fonts differ. Check out Guido's
idle-0.1 text colouring for Pmw code viewer.</p>
<li><p>Document restrictions on adding bindings to a megawidget: you
probably need to bind to components of the megawidget and also
check that you are not destroying bindings set up by the
megawidget itself.</p>
<li><p>Add a demo that demonstrates setting the color scheme at run time.</p>
</ul>
<p><strong>Tests</strong></p>
<ul><li><p>Check for missing tests, such as TimeCounter, RadioSelect,
SelectionDialog, MessageBar, MenuBar, ComboBoxDialog, Balloon.</p>
<li><p>Create test for useTkOptionDb option to Pmw.initialise().</p>
<li><p>Check that destroyed widgets' python classes are garbage
collected (add test and/or demo).</p>
<li><p>Add tests for changecolor, setscheme, etc.</p>
<li><p>Need Resources test.</p>
<li><p>Create tests for deriving from Pmw classes (eg ComboBox).</p>
</ul>
<p><strong>Ideas</strong></p>
<ul><li><p>Add more Tix (www.xpi.com/tix/screenshot.html) and iwidgets widgets.</p>
<li><p>Look at spinner.itk for how to do vertical orientation on
same side for Counter.</p>
<li><p>Investigate these new features in Tk8.0 and see if they could be
used in Pmw:</p>
<dl><dd><pre> embedded images in text widgets
destroy command ignores windows that don't exist
</pre></dl>
</ul>
<center><P ALIGN="CENTER">
<IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
</p></center>
<font size=-1>
<center><P ALIGN="CENTER">
<a href="index.html">Home</a>.
Pmw 0.8.5
Maintainer
<a href="mailto:gregm@iname.com">gregm@iname.com</a>.
9 Feb 2001
</p></center>
</font>
</body>
</html>
|