[mcclim-devel] Non shrinking panes

Andy Hefner ahefner at gmail.com
Thu Feb 12 03:29:29 UTC 2009


After redisplay, McCLIM resizes the pane to fit the bounding rectangle
of the output history. If you're redisplaying the pane from scratch, I
don't understand why the bounding rectangle shouldn't be tightened -
it'd probably a bug. A small test case to demonstrate would be
helpful. Also, the behavior here changed recently, and maybe I didn't
think thoroughly through what I was doing.

If you clear the output history and (bounding-rectangle
(stream-output-history stream)) doesn't shrink afterward, it's
definitely a bug.

The thing to do here, I think, is to call change-space-requirements,
not resize-sheet. If the parent of your pane is some kind of layout
pane, the space will be reallocated top-down based on the space
requirements, with the layout pane itself calling resize-sheet on your
pane, overriding your change.

As you've probably figured out, adapting recorded output to the pane
size is tricky. The status bar in the listener used to do this to
justify the memory usage to the right, but occasionally it would find
a new way to recursively blow up. I decided it was more trouble than
it was worth and ripped it out. Still, you might make it work for your
application. It's certainly something we *should* support, but no one
has really worked out the best way to do it and carved a safe path
through McCLIM to make sure it works.

On Wed, Feb 11, 2009 at 4:40 PM, Nikolaus Demmel <demmeln at in.tum.de> wrote:
> False alarm.
>
> (clear-output-record (stream-output-history pane))
>
> does work. But the pane is still refusing to shrink in size, even if
> i manually call
>
> (resize-sheet pane a b)
>
> the pane is still back to its maximum ever size on next redisplay.
> What causes the pane to keep its size?
>
> Regards,
> Niko Demmel
>
>
> Am 11.02.2009 um 21:23 schrieb Nikolaus Demmel:
>
>> I have gained some confidence, that the issue has to do with output
>> recording.
>>
>> Unfortunately neither calling
>>
>> (climi:reset-output-history pane)
>>
>> nor
>>
>> (clear-output-record (stream-output-history pane))
>>
>> seems to do anything...
>>
>> Anyone know how to clear the output history?
>>
>> Regards,
>> Niko Demmel
>>
>>
>> Am 06.02.2009 um 21:11 schrieb Nikolaus Demmel:
>>
>>> Hi list
>>>
>>> In the following when i talk about width of the pane, i mean the
>>> value
>>> returned by (bounding-rectangle-width pane).
>>>
>>> I have an application pane with not much output (which is not very
>>> wide
>>> and definately not as wide as the pane) at the beginning. When i
>>> resize
>>> (shrink) the whole frame (manually, using the mouse), the application
>>> pane adapts in size until it is as wide as the intial output, then
>>> the
>>> scrolling kicks in, but the size of the pane doesn't shrink further.
>>> This makes sense.
>>>
>>> Now if after a while (or due to some user action) the output on the
>>> pane
>>> becomes wider, then the "minimum pane width" that i can achieve with
>>> shrinking the frame as above becomes this new withs of the output.
>>> This
>>> also makes sense.
>>>
>>> Now if the output changes to something not as wide again, then the
>>> "minimum pane width" acheived by resizing the whole window as above
>>> doesn't shrink. It stays at the maximum width of output over the
>>> whole
>>> lifetime of the application.
>>>
>>> Does this have to do with output recording?
>>>
>>> How can i make the pane become less wide again?
>>>
>>> The background is, that i want to draw some lines as wide as the pane
>>> that adapt in size, when i resize the window. This works with
>>> enlarging
>>> the window, but as described above not with shrinking it. How could i
>>> acheive that.
>>>
>>> Regards,
>>> Niko Demmel
>>>
>>>
>>> _______________________________________________
>>> mcclim-devel mailing list
>>> mcclim-devel at common-lisp.net
>>> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
>>
>>
>> _______________________________________________
>> mcclim-devel mailing list
>> mcclim-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
>
>
> _______________________________________________
> mcclim-devel mailing list
> mcclim-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
>




More information about the mcclim-devel mailing list