[Pharo-dev] Dynamical resizing of a Nautilus Plugin

2015-09-10 Thread Peter Uhnák
Hi,

is it possible to dynamically resize (or add/remove) plugin in nautilus?

It seems that plugins are added during build (AbstractNautilusUI>>addAll:),
however is it possible to do at morphic level?

Because if I resize the morph of the plugin the parent will have empty
space; so probably I would have to move all the morphs underneath it, but I
am not knowledgeable enough of Morphic.

Since I can freely resize by hand the code pane area I think it should be
possible, but I am lost. :/

Thanks,
Peter


Re: [Pharo-dev] Dynamical resizing of a Nautilus Plugin

2015-09-10 Thread Thierry Goubier

Le 10/09/2015 20:59, Peter Uhnák a écrit :

Hi,

is it possible to dynamically resize (or add/remove) plugin in nautilus?

It seems that plugins are added during build (AbstractNautilusUI>>addAll:),
however is it possible to do at morphic level?

Because if I resize the morph of the plugin the parent will have empty
space; so probably I would have to move all the morphs underneath it,
but I am not knowledgeable enough of Morphic.

Since I can freely resize by hand the code pane area I think it should
be possible, but I am lost. :/


Morphic certainly support that. Can't help you about Nautilus, however :(

Thierry




Thanks,
Peter





Re: [Pharo-dev] Dynamical resizing of a Nautilus Plugin

2015-09-10 Thread Peter Uhnák
hmm... it's not pretty but this seems to work...

for anyone that might be also interested (maybe Yuriy and QA?):

~~~
MyPluginMorph>>changeHeight: aNumber
self submorphAfter layoutFrame topOffset: aNumber + self padding.
self layoutFrame bottomOffset: aNumber.
self layoutChanged
~~~

~~~
MyPluginMorph>>padding
"Padding set between plugins in AbstractNautilusUI>>addAll:
(middleHeight := middle height + 4)."

^ 4
~~~

~~~
MyPluginMorph>>height
"If the morph is not attached yet return negated padding to hide the plugin
by default."

^ owner ifNil: [ self padding negated ] ifNotNil: [ super height ]
~~~

Peter


On Thu, Sep 10, 2015 at 9:09 PM, stepharo  wrote:

> probably but we should play wiht the internal of nautilus.
>
> Le 10/9/15 20:59, Peter Uhnák a écrit :
>
> Hi,
>>
>> is it possible to dynamically resize (or add/remove) plugin in nautilus?
>>
>> It seems that plugins are added during build
>> (AbstractNautilusUI>>addAll:),
>> however is it possible to do at morphic level?
>>
>> Because if I resize the morph of the plugin the parent will have empty
>> space; so probably I would have to move all the morphs underneath it, but I
>> am not knowledgeable enough of Morphic.
>>
>> Since I can freely resize by hand the code pane area I think it should be
>> possible, but I am lost. :/
>>
>> Thanks,
>> Peter
>>
>
>
>


Re: [Pharo-dev] Dynamical resizing of a Nautilus Plugin

2015-09-10 Thread stepharo

probably but we should play wiht the internal of nautilus.

Le 10/9/15 20:59, Peter Uhnák a écrit :

Hi,

is it possible to dynamically resize (or add/remove) plugin in nautilus?

It seems that plugins are added during build 
(AbstractNautilusUI>>addAll:),

however is it possible to do at morphic level?

Because if I resize the morph of the plugin the parent will have empty 
space; so probably I would have to move all the morphs underneath it, 
but I am not knowledgeable enough of Morphic.


Since I can freely resize by hand the code pane area I think it should 
be possible, but I am lost. :/


Thanks,
Peter





Re: [Pharo-dev] Dynamical resizing of a Nautilus Plugin

2015-09-10 Thread Franck Warlouzet
I tried once to do a button which increases the text area size or reduces it 
depending on the source code length. But I failed to do it without opening a 
new  window, I did not spend a lot of time on it but I do not know if there is 
a way to reproduce the action of the clic to resize to window. 

If you succeed in, I could be interested to finish this idea. 

Franck

> To: pharo-dev@lists.pharo.org
> From: steph...@free.fr
> Date: Thu, 10 Sep 2015 21:09:34 +0200
> Subject: Re: [Pharo-dev] Dynamical resizing of a Nautilus Plugin
> 
> probably but we should play wiht the internal of nautilus.
> 
> Le 10/9/15 20:59, Peter Uhnák a écrit :
> > Hi,
> >
> > is it possible to dynamically resize (or add/remove) plugin in nautilus?
> >
> > It seems that plugins are added during build 
> > (AbstractNautilusUI>>addAll:),
> > however is it possible to do at morphic level?
> >
> > Because if I resize the morph of the plugin the parent will have empty 
> > space; so probably I would have to move all the morphs underneath it, 
> > but I am not knowledgeable enough of Morphic.
> >
> > Since I can freely resize by hand the code pane area I think it should 
> > be possible, but I am lost. :/
> >
> > Thanks,
> > Peter
> 
>