RE: gtkmm application design - Accessing resources such as icons, button images, multi-Language strings, etc...



Thanks!

I can't say what the project is now.  However, when it is finished, I would
be glad to describe it to everyone.   It is actually a really neat project
and gtkmm is fitting in nicely.

Bill

-----Original Message-----
From: gtkmm-list-bounces gnome org [mailto:gtkmm-list-bounces gnome org] On
Behalf Of Murray Cumming
Sent: Thursday, May 11, 2006 11:42 AM
To: Bill Sousan
Cc: gtkmm-list gnome org
Subject: Re: gtkmm application design - Accessing resources such as
icons,button images, multi-Language strings, etc...

On Thu, 2006-05-11 at 09:52 -0500, Bill Sousan wrote:

>             I am working on an embedded project using a touchscreen
> with gtkmm for all the graphics.

Ooh. Do we get to hear what this project is?

>   It operates without a window manager with the gtkmm app being the
> only window.  I have been designing relatively simple menus with
> buttons, icons, and text.  However, I need to have support for
> multi-language strings, and also different icons based on the language
> (I am using ustring, and I am not using Glade).

For strings, you can just do regular gettext translation.

Maybe you could provide different icons per language somehow via the
existing icon themes concept. Of course, you shouldn't have text in your
icons, but I know that's a hard rule to stick to for embedded projects.

>   My question is if there is a standardized way for accessing
> resources and also how to implement this nicely in C++ to limit the
> coupling between classes?  In other words, my first thought is to have
> a global variable/Class that contains all the resources for the
> application, such as icons, strings, images, etc.  Then all the menus
> will simply grab the resources from this global class.  However, then
> all my menus/screens/controls need to know about this global class.  I
> am curious how others have implemented or solved this issue.


-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]