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




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