image resize event

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

image resize event

Usman Bhatti
Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman
Reply | Threaded
Open this post in threaded view
|

Re: image resize event

Benjamin Van Ryseghem (Pharo)
Somewhere in World doOneCycle I guess

Ben

On Aug 19, 2013, at 6:07 PM, Usman Bhatti <[hidden email]> wrote:

Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman

Reply | Threaded
Open this post in threaded view
|

Re: image resize event

Henrik Sperre Johansen
In reply to this post by Usman Bhatti

On Aug 19, 2013, at 6:07 , Usman Bhatti <[hidden email]> wrote:

Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman

You need to install a #windowEventHandler: on the World, this will receive all host window events, such as resizes.
Make sure you also handle #windowClose events if you want the native X button to work, as per PasteUpMorph >> #windowEvent: 

Cheers,
Henry

signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: image resize event

fritsche.markus
<base href="local:///">

Von: Henrik Johansen
Gesendet: Dienstag, 20. August 2013 09:24 PM
An: Any question about pharo is welcome
Antwort an: Any question about pharo is welcome
Betreff: Re: [Pharo-users] image resize event


On Aug 19, 2013, at 6:07 , Usman Bhatti <[hidden email]> wrote:

Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman

You need to install a #windowEventHandler: on the World, this will receive all host window events, such as resizes.
Make sure you also handle #windowClose events if you want the native X button to work, as per PasteUpMorph >> #windowEvent: 

Cheers,
Henry

Reply | Threaded
Open this post in threaded view
|

Re: image resize event

Tudor Girba-2
I would like to know the solution for this as well :)

Doru


On Tue, Aug 20, 2013 at 9:30 AM, <[hidden email]> wrote:

Von: Henrik Johansen
Gesendet: Dienstag, 20. August 2013 09:24 PM
An: Any question about pharo is welcome
Antwort an: Any question about pharo is welcome
Betreff: Re: [Pharo-users] image resize event


On Aug 19, 2013, at 6:07 , Usman Bhatti <[hidden email]> wrote:

Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman

You need to install a #windowEventHandler: on the World, this will receive all host window events, such as resizes.
Make sure you also handle #windowClose events if you want the native X button to work, as per PasteUpMorph >> #windowEvent: 

Cheers,
Henry




--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: image resize event

Usman Bhatti
Fernando is going to propose a fix for this in PasteUpMorph>>extent:
Once his fix integrated in Pharo, PasteUpMorph announcer can be used to capture the image window size change event and trigger the update code:

World announcer on: WindowResizing do:[ do some actions]


usman

On Tue, Aug 20, 2013 at 4:19 PM, Tudor Girba <[hidden email]> wrote:
I would like to know the solution for this as well :)

Doru


On Tue, Aug 20, 2013 at 9:30 AM, <[hidden email]> wrote:

Von: Henrik Johansen
Gesendet: Dienstag, 20. August 2013 09:24 PM
An: Any question about pharo is welcome
Antwort an: Any question about pharo is welcome
Betreff: Re: [Pharo-users] image resize event


On Aug 19, 2013, at 6:07 , Usman Bhatti <[hidden email]> wrote:

Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman

You need to install a #windowEventHandler: on the World, this will receive all host window events, such as resizes.
Make sure you also handle #windowClose events if you want the native X button to work, as per PasteUpMorph >> #windowEvent: 

Cheers,
Henry




--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: image resize event

Stéphane Ducasse

On Aug 20, 2013, at 6:26 PM, Usman Bhatti <[hidden email]> wrote:

Fernando is going to propose a fix for this in PasteUpMorph>>extent:
Once his fix integrated in Pharo, PasteUpMorph announcer can be used to capture the image window size change event and trigger the update code:

World announcer on: WindowResizing do:[ do some actions]

better use 

World announcer when: WindowResizing do: [ do some actions]

and if possible

World announcer when: WindowResizing send: to: 

I should add these methods to Object and deprecate on:do:

Stef
 




usman

On Tue, Aug 20, 2013 at 4:19 PM, Tudor Girba <[hidden email]> wrote:
I would like to know the solution for this as well :)

Doru


On Tue, Aug 20, 2013 at 9:30 AM, <[hidden email]> wrote:


Von: Henrik Johansen
Gesendet: Dienstag, 20. August 2013 09:24 PM
An: Any question about pharo is welcome
Antwort an: Any question about pharo is welcome
Betreff: Re: [Pharo-users] image resize event


On Aug 19, 2013, at 6:07 , Usman Bhatti <[hidden email]> wrote:

Hello,

I would like to resize all my windows opened inside my image when resizing the image window. Can anyone point me to the hook where I can plug my code for window resizing?

For example, it would like to do
onImageResize
      World fitAll.

tx,

usman

You need to install a #windowEventHandler: on the World, this will receive all host window events, such as resizes.
Make sure you also handle #windowClose events if you want the native X button to work, as per PasteUpMorph >> #windowEvent: 

Cheers,
Henry




--

"Every thing has its own flow"


Reply | Threaded
Open this post in threaded view
|

Re: image resize event

hilaire
In reply to this post by Usman Bhatti
CONTENTS DELETED
The author has deleted this message.