| 1 |
Subject: Adjuster |
| 2 |
Date: Wed, 16 Dec 1998 22:23:23 +0100 |
| 3 |
From: Stephen Kun <[email protected]> |
| 4 |
To: Nick Ing-Simmons <[email protected]> |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
3. How do I find out whether slave is a pack or grid master or if it is not a |
| 10 |
master (for setting packPropagate(0)) |
| 11 |
Currently I set both on the slave. |
| 12 |
|
| 13 |
4. In setting position of drag bar, I do a lot of calcs for each motion event. |
| 14 |
Some could be done one for first, then used again for subsequent calls, eg: |
| 15 |
borderwidth of master, etc. |
| 16 |
I've now partially done this and store them on the widget. |
| 17 |
|
| 18 |
5. Do I need XSync and idletasks calls in Adjuster.pm? |
| 19 |
XSync causes a bug. idletasks doesn't make any difference in practice, from |
| 20 |
what I can see. I've commented both out. |
| 21 |
Bug when using XSync: |
| 22 |
Run pack_adj_4r |
| 23 |
Shorten whole window from right so that left window edge crosses leftmost |
| 24 |
adjuster. Buttons on other adjusters disappear |
| 25 |
|
| 26 |
6. Sometimes the effect given by the Restore method, is undesirable. Eg. |
| 27 |
for multi-columns. Then when you expand say the 1st column, the size of the |
| 28 |
col at the end gets reduced to 0 width when the Adjuster forces itself in. |
| 29 |
Then when you reduce the size of the first column again, the end col is still |
| 30 |
0 width. |
| 31 |
Better would be: |
| 32 |
a) put the restore functionality on a flag OR |
| 33 |
b) when a col is reduced because of a Restore, it saves previous width of |
| 34 |
its slave, and attempts to restore it when the space becomes availabe. (Sounds |
| 35 |
impracticable.) |
| 36 |
I've implemented a) with default ON. In the documentation I'll recommend the |
| 37 |
default for the 1st Adjuster, then OFF for the remaining. |
| 38 |
|
| 39 |
8. What about a packAdjustForget? Given that Adjuster doesn't work well for |
| 40 |
grid anyway, and doesn't consider other managers, that wouldn't be too bad. |
| 41 |
I'm not going to do this, but someone mentioned it a while ago. I can |
| 42 |
see me probably wanting it too at some point. |
| 43 |
Are you for the idea? |
| 44 |
|
| 45 |
10. Grid doesn't work well with Adjuster, didn't before either. I think |
| 46 |
this has to do with grid, rather than adjuster. You get the same effect |
| 47 |
if you grid a row of widgets, then reduce the width of the window. |
| 48 |
Bugs demonstrated by grid_adj_4l: |
| 49 |
a) there's never an Unmap event for the adjuster. |
| 50 |
b) after adjusting, widgets protrude into border on right. |
| 51 |
c) grid('Propagate', 0) on MainWindow has no effect - window shrinks/grows |
| 52 |
when widgets are adjusted |
| 53 |
d) widgets shuffle to correct position on startup |
| 54 |
I don't recommend use of grid with Adjust! |
| 55 |
|
| 56 |
11. Have taken out __END__ temporarily for testing |
| 57 |
Will put it back before publishing on the mailing list. |
| 58 |
|
| 59 |
12. Why do the adjusters in my testcases come out grey? That's not the |
| 60 |
default background. |
| 61 |
|
| 62 |
13. Could packAdjust return ($adj, $w). Could then do: |
| 63 |
my $canv = $top->Canvas()->packAdjust(); |
| 64 |
OR |
| 65 |
my ($adj, $canv) = $top->Canvas()->packAdjust(); |
| 66 |
Latter is good if you want to configure or unpack adjuster later. |
| 67 |
I realise this is very Kludgy, but there's no other way to get the |
| 68 |
Adjuster from packAdjust. |
| 69 |
I suppose the workaround of creating the Adjuster yourself is OK. When |
| 70 |
you do it by hand though, there's more chance of making mistakes, eg |
| 71 |
forgetting the -side (which defaults then to 'top') which would cause havoc. |
| 72 |
What's your opinion. |
| 73 |
|
| 74 |
14. Run the script adj_button_bug: You can't reduce size of button. |
| 75 |
Button can be expanded, but as soon as focus enters button, it springs back |
| 76 |
to its original size. Why? |
| 77 |
It's not important though. |