X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=swt%2Forg.argeo.cms.swt%2Fsrc%2Forg%2Fargeo%2Fcms%2Fswt%2FCmsSwtTheme.java;fp=swt%2Forg.argeo.cms.swt%2Fsrc%2Forg%2Fargeo%2Fcms%2Fswt%2FCmsSwtTheme.java;h=7669b1554df2872954788e095ca645b9dafaedf3;hb=7b242851c0094d13cbaca5b68261ad92c873a59f;hp=0000000000000000000000000000000000000000;hpb=dbb84b4ec2d313ec0724d035c32f482ac57974c5;p=lgpl%2Fargeo-commons.git diff --git a/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/CmsSwtTheme.java b/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/CmsSwtTheme.java new file mode 100644 index 000000000..7669b1554 --- /dev/null +++ b/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/CmsSwtTheme.java @@ -0,0 +1,25 @@ +package org.argeo.cms.swt; + +import org.argeo.api.cms.ux.CmsIcon; +import org.argeo.api.cms.ux.CmsTheme; +import org.eclipse.swt.graphics.Image; + +/** SWT specific {@link CmsTheme}. */ +public interface CmsSwtTheme extends CmsTheme { +// /** The image registered at this path, or null if not found. */ +// Image getImage(String path); + + /** + * And icon with this file name (without the extension), with a best effort to + * find the appropriate size, or null if not found. + * + * @param name An icon file name without path and extension. + * @param preferredSize the preferred size, if null, + * {@link #getDefaultIconSize()} will be tried. + */ + Image getIcon(String name, Integer preferredSize); + + Image getSmallIcon(CmsIcon icon); + + Image getBigIcon(CmsIcon icon); +}