[Gambas-devel] Stock class

Benoit Minisini gambas at ...1...
Wed Jul 19 23:41:20 CEST 2006


On Wednesday 19 July 2006 23:37, Benoit Minisini wrote:
> Sorry guys, I can't use the mailing-lists at the moment as my IP SMTP
> server was black-listed!
>
> I plan to implement the Stock class in another way as it is currently, so
> that it is as transparent as possible for the user:
>
> * PictureStock[Name, Size] must returns a picture according to a
> standardized name. A size can be specified.
>
> The standardized name could be "type/name.png".
>
> If the specified icon does not exist in the requested size, then an icon in
> another size scaled to the requested size must be returned.
>
> * PictureStock.All must return the names of all stock pictures.
>
> * PictureStock.Sizes must return a list of supported sizes.
>
> * PictureStock.Enabled to know if the stock is accessible.
>
> * PictureStock could be implemented in Gambas. The same code can be used by
> gb.qt and gb.gtk, like for the Action class.
>
> * The user do not have to use the Stock class directly. The Picture class
> will call the Stock class automatically when the picture path begins with
> ".stock/image".
>
> The idea behind that is that a stock should be able to store anything. As
> there is already a resource system in Gambas, by the use of relative paths,
> and that you cannot use hidden names in the IDE, then we could use them to
> reference "stock" resources that are not really stored in the project.
>
> Then I just have to add a tab to the icon file dialog in the IDE to allow
> the user using them.
>
> The last problem is how can I detect KDE icon paths in the QT component?
> Even if GTK+ has stock icons, GNOME seams to have more, I have the same
> question for it!
>
> Regards,

It works again! :-)

-- 
Benoit Minisini




More information about the Devel mailing list