DrGeoII as a service: DrGeoCanvas minimal

classic Classic list List threaded Threaded
4 messages Options
HJH
Reply | Threaded
Open this post in threaded view
|

DrGeoII as a service: DrGeoCanvas minimal

HJH
Hello Hilaire

Thank you for implementing the #minimal method so that I can do

     | c |
     c := DrGeoCanvas minimal.
     c view extent: 500@500.
     c segment:  2@2 to: 4@4.
     c exportToBitmap: '/home/user8/sketch1.png'.
     c delete.

You wrote:

In case you don't delete the canvas as in the code above, to close it with mouse, you need to call the Morph Halo and cycle to the DrGService instances, and quit it. Not very handy.

Yes, this is an issue.

I see it as useful to have the option of doing

     | c |
     c := DrGeoCanvas minimal.
     c view extent: 500@500.
     c segment:  2@2 to: 4@4.

Have c on the desktop and move it around with the mouse. Later delete it through a pop-up-menu command on the object c.

You say: This is a DrGeoII canvas providing a service. What does this concept imply? Or which other options do I have to use it as a service?


--Hannes

Reply | Threaded
Open this post in threaded view
|

Re: DrGeoII as a service: DrGeoCanvas minimal

Hilaire Fernandes
Administrator
Hi,

Le 05/10/2018 à 11:08, HJH [via Dr. Geo Forum] a écrit :

In case you don't delete the canvas as in the code above, to close it with mouse, you need to call the Morph Halo and cycle to the DrGService instances, and quit it. Not very handy.

Yes, this is an issue.
In the other hand,  if each nested morph does not show its halo it will solve the issue. I could take a look.


I would prefer to be have the option of doing


     | c |
     c := DrGeoCanvas minimal.
     c view extent: 500@500.
     c segment:  2@2 to: 4@4.

Have c on the desktop and move it around. Later delete it through a pop-up-menu command on the object c.

You say: This is a DrGeoII canvas providing a service. What does this concept imply? Or which other options do I have to use it as a service?
It provides the service to show an interactive canvas and to be embedded in another morph. I would like to embed it in a Text Morph, but we seem to be short of option in Pharo.
There is currently no popup menu, although it was present in the past (check DrGDrawable class)

Hilaire

Was this message helpful?
Tell us!
Reply | Threaded
Open this post in threaded view
|

Re: DrGeoII as a service: DrGeoCanvas minimal

Hliaire Fernandes
Administrator
I submit code changes. Now only the DrGService halo shows up. It makes easier to close a service view by mouse operation.

How to close a service view with mouse:

1. Move the mouse cursor over a service view
2. [Cltr]+middle-mouse-clic, the service view halo shows up
3. Select the halo's close-icon

Code changes can be explored from the repository.

Hilaire
HJH
Reply | Threaded
Open this post in threaded view
|

Re: DrGeoII as a service: DrGeoCanvas minimal

HJH
To close a DrGService object there is also the option of evaluating

    World submorphs

in a "Playground".

This gives a list of morphs on the desktop.  

Then choose the line with the DrGService object.

And evaluate

    self delete