Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


In order to use an image that GiD use, you must use the tcl function gid_themes::GetImage, to see a complet complete list of images available you can take a look for example to the folder:
(GiD Folder)\themes\GiD_classic\images\large_size(24andmore)

proc gid_themes::GetImage { filename IconCategory }
IconCategory could be: "small_icons", "medium_icons", "large_icons", "menu", "toolbar"
There is another IconCategory, "generic", that is the category used when the parameter is omitted. Using this category the image is retrieved from root image folder (Example: (GiD Folder)\themes\GiD_classic\images\ ), but the use of this category its not recommended, since images from root folders are not guaranteed on future versions.

...


If your module needs other images from ones supplied by GiD
You can use:
gid_themes::GetImageModule to get the appropriate image, from inside the module folder, depending on current theme.
gid_themes::GetImage { full_path_filename } , image will be equal regardless of current theme. This is the 'old sytlestyle', with the module images stored as module developer want, without follow the previously recommended folder layout.

Note: the full_path_filename points to a 'module' file, but it must be build in a relative way, based on the problemype problemtype location.
e.g.

Code Block
proc InitGIDProject { dir } {
  set full_path_filename [file join $dir my_images_folder my_image.png] 
  set img [gid_themes::GetImage $full_path_filename]
  ...
}

...

The option "alternative_theme" its used if some file its not found, for try to find on the alternative theme (example themes still on develop )
Also using this redirection, a complet complete themes that module is not interested on can be redirected to our main theme, in this case we will need just 1 folder for each theme and configuration.xml inside it.

...