OBMorphicIcons (was Re: this style looks cool)

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

OBMorphicIcons (was Re: this style looks cool)

Rob Rothwell

Message: 4
Date: Mon, 30 Aug 2010 03:41:45 +0200
From: Tudor Girba <[hidden email]>
Subject: Re: [Pharo-project] this style looks cool
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Hi Bill,

As I said, all you have to do is to override #browserIcon on the class
side of your class to return a symbol that corresponds to a method in
OBMorphicIcons. Please look at the implementors of #browserIcon.

For example:

Announcement class>>browserIcon
       ^ #announcement

OBMorphicIcons>>announcement
       ^ ((ColorForm
       extent: 12@12
       depth: 8
       fromArray: ...


Cheers,
Doru

This looks useful; how do you turn an image into a method, though?

Thank you,

Rob


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OBMorphicIcons (was Re: this style looks cool)

Alexandre Bergel
>
> This looks useful; how do you turn an image into a method, though?

Hi!

Have a look at the class side of MenuIcons. There are a bunch of import/export methods.

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OBMorphicIcons (was Re: this style looks cool)

Guillermo Polito
contents := (StandardFileStream fileNamed: 'loop_icon.jpg') contents.
encondedContents := (Base64MimeConverter mimeEncode: contents readStream) .


That basically gives you the string you have to embed in a method...

Cheers,
Guille

On Mon, Aug 30, 2010 at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:
>
> This looks useful; how do you turn an image into a method, though?

Hi!

Have a look at the class side of MenuIcons. There are a bunch of import/export methods.

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: OBMorphicIcons (was Re: this style looks cool)

Rob Rothwell
In reply to this post by Rob Rothwell
Thanks both of you for pointing me in the right direction.  I was able to get something similar to what is in OBMorphicIcons>>breakpoint by doing this:

methodContents := WriteStream on: ''.
(OBMorphicIcons iconNamed: #breakpoint) storeOn: methodContents.
methodContents inspect.

But the contents are different, and if you substitute them for the contents of breakpoint, the picture looks different too...

Thank you,

Rob


*contents := (StandardFileStream fileNamed: 'loop_icon.jpg') contents.
encondedContents := (Base64MimeConverter mimeEncode: contents readStream) .*

That basically gives you the string you have to embed in a method...

Cheers,
Guille

On Mon, Aug 30, 2010 at 9:42 AM, Alexandre Bergel <[hidden email]>wrote:

> >
> > This looks useful; how do you turn an image into a method, though?
>
> Hi!
>
> Have a look at the class side of MenuIcons. There are a bunch of
> import/export methods.
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project