[DEV] set imaghe drawer updated

This commit is contained in:
Edouard DUPIN 2021-08-04 00:13:03 +02:00
parent 7c0a5eefcc
commit 62a72a30c9
27 changed files with 365 additions and 197 deletions

View File

@ -23,17 +23,7 @@
<attribute name="test" value="true"/> <attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/loader3d"> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-esignal">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-esvg">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-exml">
<attributes> <attributes>
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>
@ -43,12 +33,12 @@
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/scenarium-logger"> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-exml">
<attributes> <attributes>
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-etk"> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/loader3d">
<attributes> <attributes>
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>
@ -58,15 +48,5 @@
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-io-gami">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-esignal">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="out/eclipse/classes"/> <classpathentry kind="output" path="out/eclipse/classes"/>
</classpath> </classpath>

View File

@ -1,3 +1,5 @@
#version 400 core
#ifdef GL_ES #ifdef GL_ES
precision mediump float; precision mediump float;
precision mediump int; precision mediump int;
@ -10,6 +12,7 @@ varying vec2 io_texcoord;
varying vec4 io_color; varying vec4 io_color;
void main(void) { void main(void) {
gl_FragColor = texture2D(in_texID, io_texcoord) * io_color; vec4 map = texture2D(in_texID, io_texcoord);
gl_FragColor = map * io_color;
//gl_FragColor = vec4(1.0,1.0,0.2,0.6); //gl_FragColor = vec4(1.0,1.0,0.2,0.6);
} }

View File

@ -1,21 +1,27 @@
#version 400 core
#ifdef GL_ES #ifdef GL_ES
precision mediump float; precision mediump float;
precision mediump int; precision mediump int;
#endif #endif
// Input :
attribute vec3 in_coord3d; // VBA Input :
attribute vec2 in_texture2d; layout (location = 0) in vec3 in_position;
attribute vec4 in_color; layout (location = 1) in vec2 in_textureCoords;
uniform mat4 in_MatrixTransformation; layout (location = 3) in vec4 in_colors;
uniform mat4 in_matrixTransformation;
uniform mat4 in_matrixProjection;
uniform mat4 in_matrixView;
// output : // output :
varying vec4 io_color; varying vec4 io_color;
varying vec2 io_texcoord; varying vec2 io_texcoord;
void main(void) { void main(void) {
gl_Position = in_MatrixTransformation * vec4(in_coord3d, 1.0); gl_Position = in_matrixProjection * in_matrixView * in_matrixTransformation * vec4(in_position, 1.0);
//gl_Position = in_MatrixTransformation * vec4(in_position, 1.0);
// set texture output coord // set texture output coord
io_texcoord = in_texture2d; io_texcoord = in_textureCoords;
// set output color : // set output color :
io_color = in_color; io_color = in_colors;
} }

View File

@ -6,10 +6,11 @@
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-ewol"> <classpathentry combineaccessrules="false" kind="src" path="/atriasoft-ewol">
<attributes> <attributes>
<attribute name="module" value="true"/> <attribute name="module" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="out/eclipse"/>
</classpath> </classpath>

1
samples/.gitignore vendored
View File

@ -1 +1,2 @@
/bin/ /bin/
/out/

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,4 +1,5 @@
module sample.atriasoft.ewol { module sample.atriasoft.ewol {
//exports sample.atriasoft.ewol.simpleWindowsWithImage; //exports sample.atriasoft.ewol.simpleWindowsWithImage;
requires org.atriasoft.ewol; requires org.atriasoft.ewol;
requires org.atriasoft.etk;
} }

View File

@ -0,0 +1,80 @@
package sample.atriasoft.ewol.simpleWindowsLabel;
import org.atriasoft.etk.Configs;
import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.ewol.context.EwolApplication;
import org.atriasoft.ewol.context.EwolContext;
public class Appl implements EwolApplication {
//! [ewol_sample_HW_main_application]
private void localCreate(final EwolContext context) {
//! [ewol_sample_HW_main_parse_arguments]
// parse all the argument of the application
for (int iii = 0; iii < context.getCmd().size(); iii++) {
String tmpppp = context.getCmd().get(iii);
if (tmpppp == "-h" || tmpppp == "--help") {
Log.print(" -h/--help display this help");
System.exit(0);
}
}
//! [ewol_sample_HW_main_parse_arguments]
//! [ewol_sample_HW_main_set_windows_size]
// TODO : Remove this: Move if in the windows properties
context.setSize(new Vector2f(800, 600));
//! [ewol_sample_HW_main_set_windows_size]
//! [ewol_sample_HW_main_set_font_property]
// select font preference of der with a basic application size
Configs.getConfigFonts().set("FreeSherif", 12);
//! [ewol_sample_HW_main_set_font_property]
//! [ewol_sample_HW_main_set_windows]
// Create the windows
MainWindows basicWindows = new MainWindows();
// configure the ewol context to use the new windows
context.setWindows(basicWindows);
//! [ewol_sample_HW_main_set_windows]
}
@Override
public void onCreate(final EwolContext context) {
Log.info("Application onCreate: [BEGIN]");
localCreate(context);
Log.info("Application onCreate: [ END ]");
}
@Override
public void onDestroy(final EwolContext context) {
Log.info("Application onDestroy: [BEGIN]");
Log.info("Application onDestroy: [ END ]");
}
@Override
public void onPause(final EwolContext context) {
Log.info("Application onPause: [BEGIN]");
Log.info("Application onPause: [ END ]");
}
@Override
public void onResume(final EwolContext context) {
Log.info("Application onResume: [BEGIN]");
Log.info("Application onResume: [ END ]");
}
@Override
public void onStart(final EwolContext context) {
Log.info("Application onStart: [BEGIN]");
Log.info("Application onStart: [ END ]");
}
@Override
public void onStop(final EwolContext context) {
Log.info("Application onStop: [BEGIN]");
Log.info("Application onStop: [ END ]");
}
}

View File

@ -0,0 +1,39 @@
package sample.atriasoft.ewol.simpleWindowsLabel;
public class Log {
private static final String LIBNAME = "LoxelEngine";
public static void critical(final String data) {
System.out.println("[C] " + Log.LIBNAME + " | " + data);
}
public static void debug(final String data) {
System.out.println("[D] " + Log.LIBNAME + " | " + data);
}
public static void error(final String data) {
System.out.println("[E] " + Log.LIBNAME + " | " + data);
}
public static void info(final String data) {
System.out.println("[I] " + Log.LIBNAME + " | " + data);
}
public static void print(final String data) {
System.out.println(data);
}
public static void todo(final String data) {
System.out.println("[TODO] " + Log.LIBNAME + " | " + data);
}
public static void verbose(final String data) {
System.out.println("[V] " + Log.LIBNAME + " | " + data);
}
public static void warning(final String data) {
System.out.println("[W] " + Log.LIBNAME + " | " + data);
}
private Log() {}
}

View File

@ -0,0 +1,31 @@
package sample.atriasoft.ewol.simpleWindowsLabel;
import org.atriasoft.etk.math.Vector2b;
import org.atriasoft.ewol.widget.Label;
import org.atriasoft.ewol.widget.Spacer;
import org.atriasoft.ewol.widget.Windows;
public class MainWindows extends Windows {
public MainWindows() {
//! [ewol_sample_HW_windows_title]
setPropertyTitle("Simple sample test");
//EwolObject.getContext().getFontDefault().setName("FreeSans");
//! [ewol_sample_HW_windows_label]
if (true) {
//! [ewol_sample_HW_windows_title]
Label simpleLabel = new Label();
simpleLabel.setPropertyValue(
"He<b>llo.</b> <font color='blue'>World</font><br/><br/> - Coucou comment ca vas ???<br/> - Pas trop bien, je me suis cassé la jambe.<br/><br/><center>The end</center>");
simpleLabel.setPropertyExpand(new Vector2b(true, true));
simpleLabel.setPropertyFill(new Vector2b(true, true));
setSubWidget(simpleLabel);
//! [ewol_sample_HW_windows_label]
} else {
Spacer simpleSpacer = new Spacer();
simpleSpacer.setPropertyExpand(new Vector2b(true, true));
simpleSpacer.setPropertyFill(new Vector2b(true, true));
setSubWidget(simpleSpacer);
}
}
}

View File

@ -0,0 +1,15 @@
package sample.atriasoft.ewol.simpleWindowsLabel;
import org.atriasoft.etk.Uri;
import org.atriasoft.ewol.Ewol;
public class SimpleWindowsLabelMain {
public static void main(final String[] args) {
Ewol.init();
//Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/");
Uri.setApplication(SimpleWindowsLabelMain.class);
Ewol.run(new Appl(), args);
}
private SimpleWindowsLabelMain() {}
}

View File

@ -1,31 +1,24 @@
package sample.atriasoft.ewol.simpleWindowsWithImage; package sample.atriasoft.ewol.simpleWindowsWithImage;
import org.atriasoft.etk.Uri;
import org.atriasoft.etk.math.Vector2b; import org.atriasoft.etk.math.Vector2b;
import org.atriasoft.ewol.widget.Label; import org.atriasoft.ewol.widget.ImageDisplay;
import org.atriasoft.ewol.widget.Spacer;
import org.atriasoft.ewol.widget.Windows; import org.atriasoft.ewol.widget.Windows;
public class MainWindows extends Windows { public class MainWindows extends Windows {
public MainWindows() { public MainWindows() {
//! [ewol_sample_HW_windows_title] //! [ewol_sample_HW_windows_title]
setPropertyTitle("Simple sample test"); setPropertyTitle("Simple label");
//EwolObject.getContext().getFontDefault().setName("FreeSans"); //EwolObject.getContext().getFontDefault().setName("FreeSans");
//! [ewol_sample_HW_windows_label] //! [ewol_sample_HW_windows_label]
if (true) { //! [ewol_sample_HW_windows_title]
//! [ewol_sample_HW_windows_title] ImageDisplay testWidget = new ImageDisplay();
Label simpleLabel = new Label(); testWidget.setPropertySource(new Uri("DATA", "mireA.png"));
simpleLabel.setPropertyValue( testWidget.setPropertyExpand(new Vector2b(true, true));
"He<b>llo.</b> <font color='blue'>World</font><br/><br/> - Coucou comment ca vas ???<br/> - Pas trop bien, je me suis cassé la jambe.<br/><br/><center>The end</center>"); testWidget.setPropertyFill(new Vector2b(true, true));
simpleLabel.setPropertyExpand(new Vector2b(true, true)); setSubWidget(testWidget);
simpleLabel.setPropertyFill(new Vector2b(true, true)); //! [ewol_sample_HW_windows_label]
setSubWidget(simpleLabel);
//! [ewol_sample_HW_windows_label]
} else {
Spacer simpleSpacer = new Spacer();
simpleSpacer.setPropertyExpand(new Vector2b(true, true));
simpleSpacer.setPropertyFill(new Vector2b(true, true));
setSubWidget(simpleSpacer);
}
} }
} }

View File

@ -6,8 +6,8 @@ import org.atriasoft.ewol.Ewol;
public class SimpleWindowsWithImageMain { public class SimpleWindowsWithImageMain {
public static void main(final String[] args) { public static void main(final String[] args) {
Ewol.init(); Ewol.init();
//Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/"); //Uri.addLibrary("test-data", SimpleWindowsWithImageMain.class, "test-ewol/");
Uri.setApplication(SimpleWindowsWithImageMain.class); Uri.setApplication(SimpleWindowsWithImageMain.class, "test-ewol/");
Ewol.run(new Appl(), args); Ewol.run(new Appl(), args);
} }

View File

@ -0,0 +1,13 @@
package org.atriasoft.ewol.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ ElementType.FIELD, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@EwolAnnotation
public @interface EwolObjectProperty {
}

View File

@ -19,7 +19,7 @@ import org.atriasoft.gale.backend3d.OpenGL.RenderMode;
import org.atriasoft.gale.resource.ResourceProgram; import org.atriasoft.gale.resource.ResourceProgram;
import org.atriasoft.gale.resource.ResourceTexture2; import org.atriasoft.gale.resource.ResourceTexture2;
import org.atriasoft.gale.resource.ResourceTextureFile; import org.atriasoft.gale.resource.ResourceTextureFile;
import org.atriasoft.gale.resource.ResourceVirtualBufferObject; import org.atriasoft.gale.resource.ResourceVirtualArrayObject;
public class CompositingImage extends Compositing { public class CompositingImage extends Compositing {
public static final int NB_VBO = 3; public static final int NB_VBO = 3;
@ -30,26 +30,28 @@ public class CompositingImage extends Compositing {
public static final int VBO_ID_COORD_TEX = 1; public static final int VBO_ID_COORD_TEX = 1;
private float angle = 0; //!< Angle to set at the axes private float angle = 0; //!< Angle to set at the axes
private boolean clippingEnable = true; //!< true if the clipping must be activated private boolean clippingEnable = true; //!< true if the clipping must be activated
private Vector3f clippingPosStart = new Vector3f(0, 0, 0); //!< Clipping start position private Vector3f clippingPosStart = Vector3f.ZERO; //!< Clipping start position
private Vector3f clippingPosStop = new Vector3f(0, 0, 0); //!< Clipping stop position private Vector3f clippingPosStop = Vector3f.ZERO; //!< Clipping stop position
private Color color = new Color(1, 1, 1); //!< The text foreground color private Color color = new Color(1, 1, 1); //!< The text foreground color
private Uri filename; private Uri filename;
private int oGLColor = -1; //!< openGL id on the element (color buffer) private final int oGLColor = -1; //!< openGL id on the element (color buffer)
private int oGLMatrix = -1; //!< openGL id on the element (transformation matrix) protected int oGLMatrixProjection = -1; //!< openGL id on the element (Projection matrix)
protected int oGLMatrixTransformation = -1; //!< openGL id on the element (transformation matrix)
protected int oGLMatrixView = -1; //!< openGL id on the element (view matrix)
private int oGLPosition = -1; //!< openGL id on the element (vertex buffer) private int oGLPosition = -1; //!< openGL id on the element (vertex buffer)
private ResourceProgram oGLprogram = null; //!< pointer on the opengl display program private ResourceProgram oGLprogram = null; //!< pointer on the opengl display program
private int oGLtexID = -1; //!< openGL id on the element (texture ID) private int oGLtexID = -1; //!< openGL id on the element (texture ID)
private int oGLtexture = -1; //!< openGL id on the element (Texture position) private final int oGLtexture = -1; //!< openGL id on the element (Texture position)
private Vector3f position = new Vector3f(0, 0, 0); //!< The current position to draw private Vector3f position = Vector3f.ZERO; //!< The current position to draw
private Vector2i requestSize = new Vector2i(2, 2); private Vector2i requestSize = new Vector2i(2, 2);
private ResourceTextureFile resource = null; //!< texture resources private ResourceTextureFile resource = null; //!< texture resources
private ResourceTexture2 resourceImage = null; //!< texture resources private ResourceTexture2 resourceImage = null; //!< texture resources
private ResourceVirtualBufferObject vbo = null; private ResourceVirtualArrayObject vbo = null;
final Color[] vboDataColors = new Color[6]; private Color[] vboDataColors = null;
final Vector3f[] vboDataCoords = new Vector3f[6]; private Vector3f[] vboDataCoords = null;
final Vector2f[] vboDataCoordsTex = new Vector2f[6]; private Vector2f[] vboDataCoordsTex = null;
public CompositingImage() { public CompositingImage() {
this(new Uri("DATA", ""), CompositingImage.SIZE_AUTO); this(new Uri("DATA", ""), CompositingImage.SIZE_AUTO);
@ -63,7 +65,7 @@ public class CompositingImage extends Compositing {
public CompositingImage(final Uri uri, final int size) { public CompositingImage(final Uri uri, final int size) {
this.filename = uri; this.filename = uri;
// Create the VBO: // Create the VBO:
this.vbo = ResourceVirtualBufferObject.create(CompositingImage.NB_VBO); this.vbo = ResourceVirtualArrayObject.createDynamic();
if (this.vbo == null) { if (this.vbo == null) {
Log.error("can not instanciate VBO ..."); Log.error("can not instanciate VBO ...");
return; return;
@ -84,9 +86,9 @@ public class CompositingImage extends Compositing {
// reset Buffer : // reset Buffer :
this.vbo.clear(); this.vbo.clear();
// reset temporal variables : // reset temporal variables :
this.position = new Vector3f(0, 0, 0); this.position = Vector3f.ZERO;
this.clippingPosStart = new Vector3f(0, 0, 0); this.clippingPosStart = Vector3f.ZERO;
this.clippingPosStop = new Vector3f(0, 0, 0); this.clippingPosStop = Vector3f.ZERO;
this.clippingEnable = false; this.clippingEnable = false;
this.color = Color.WHITE; this.color = Color.WHITE;
this.angle = 0; this.angle = 0;
@ -119,9 +121,13 @@ public class CompositingImage extends Compositing {
OpenGL.enable(OpenGL.Flag.flag_depthTest); OpenGL.enable(OpenGL.Flag.flag_depthTest);
} }
// set Matrix : translation/positionMatrix // set Matrix : translation/positionMatrix
final Matrix4f tmpMatrix = OpenGL.getMatrix().multiply(this.matrixApply); final Matrix4f projMatrix = OpenGL.getMatrix();
final Matrix4f camMatrix = OpenGL.getCameraMatrix();
this.oGLprogram.use(); this.oGLprogram.use();
this.oGLprogram.uniformMatrix(this.oGLMatrix, tmpMatrix); this.vbo.bindForRendering();
this.oGLprogram.uniformMatrix(this.oGLMatrixProjection, projMatrix);
this.oGLprogram.uniformMatrix(this.oGLMatrixTransformation, this.matrixApply);
this.oGLprogram.uniformMatrix(this.oGLMatrixView, camMatrix);
// TextureID // TextureID
if (this.resourceImage != null) { if (this.resourceImage != null) {
this.resourceImage.bindForRendering(0); this.resourceImage.bindForRendering(0);
@ -130,25 +136,17 @@ public class CompositingImage extends Compositing {
} else { } else {
Log.error("FONT type error Request normal and display distance field ..."); Log.error("FONT type error Request normal and display distance field ...");
} }
// position: this.vbo.renderArrays(RenderMode.TRIANGLE);
this.oGLprogram.sendAttributePointer(this.oGLPosition, this.vbo, CompositingImage.VBO_ID_COORD); this.vbo.unBindForRendering();
// Texture:
this.oGLprogram.sendAttributePointer(this.oGLtexture, this.vbo, CompositingImage.VBO_ID_COORD_TEX);
// color:
this.oGLprogram.sendAttributePointer(this.oGLColor, this.vbo, CompositingImage.VBO_ID_COLOR);
// Request the draw of the elements:
OpenGL.drawArrays(RenderMode.TRIANGLE, 0, this.vbo.bufferSize(CompositingImage.VBO_ID_COORD));
this.oGLprogram.unUse(); this.oGLprogram.unUse();
} }
@Override @Override
public void flush() { public void flush() {
this.vbo.setPosition(this.vboDataCoords);
this.vbo.setVboData(CompositingImage.VBO_ID_COORD, this.vboDataCoords); this.vbo.setTextureCoordinate(this.vboDataCoordsTex);
this.vbo.setVboData(CompositingImage.VBO_ID_COORD_TEX, this.vboDataCoordsTex); this.vbo.setColors(this.vboDataColors);
this.vbo.setVboData(CompositingImage.VBO_ID_COLOR, this.vboDataColors); this.vbo.setVertexCount(this.vboDataCoords.length);
this.vbo.flush(); this.vbo.flush();
} }
@ -190,16 +188,15 @@ public class CompositingImage extends Compositing {
this.oGLPosition = 0; this.oGLPosition = 0;
this.oGLprogram = ResourceProgram.create(new Uri("DATA", "textured3D.vert", "ewol"), new Uri("DATA", "textured3D.frag", "ewol")); this.oGLprogram = ResourceProgram.create(new Uri("DATA", "textured3D.vert", "ewol"), new Uri("DATA", "textured3D.frag", "ewol"));
if (this.oGLprogram != null) { if (this.oGLprogram != null) {
this.oGLPosition = this.oGLprogram.getAttribute("in_coord3d"); this.oGLMatrixTransformation = this.oGLprogram.getUniform("in_matrixTransformation");
this.oGLColor = this.oGLprogram.getAttribute("in_color"); this.oGLMatrixProjection = this.oGLprogram.getUniform("in_matrixProjection");
this.oGLtexture = this.oGLprogram.getAttribute("in_texture2d"); this.oGLMatrixView = this.oGLprogram.getUniform("in_matrixView");
this.oGLMatrix = this.oGLprogram.getUniform("in_MatrixTransformation");
this.oGLtexID = this.oGLprogram.getUniform("in_texID"); this.oGLtexID = this.oGLprogram.getUniform("in_texID");
} }
} }
public void print(final Vector2f size) { public void print(final Vector2f size) {
printPart(size, new Vector2f(0, 0), new Vector2f(1, 1)); printPart(size, Vector2f.ZERO, Vector2f.ONE);
} }
/** /**
@ -226,6 +223,10 @@ public class CompositingImage extends Compositing {
final Vector2f sourcePosStart = sourcePosStartIn.multiply(ratio); final Vector2f sourcePosStart = sourcePosStartIn.multiply(ratio);
final Vector2f sourcePosStop = sourcePosStopIn.multiply(ratio); final Vector2f sourcePosStop = sourcePosStopIn.multiply(ratio);
Log.verbose(" openGLSize=" + openGLSize + " usableSize=" + usefullSize + " start=" + sourcePosStart + " stop=" + sourcePosStop); Log.verbose(" openGLSize=" + openGLSize + " usableSize=" + usefullSize + " start=" + sourcePosStart + " stop=" + sourcePosStop);
this.vboDataColors = new Color[6];
this.vboDataCoords = new Vector3f[6];
this.vboDataCoordsTex = new Vector2f[6];
if (this.angle == 0.0f) { if (this.angle == 0.0f) {
Vector3f point = this.position; Vector3f point = this.position;
@ -276,7 +277,7 @@ public class CompositingImage extends Compositing {
final Vector3f limitedSize = new Vector3f(size.x() * 0.5f, size.y() * 0.5f, 0.0f); final Vector3f limitedSize = new Vector3f(size.x() * 0.5f, size.y() * 0.5f, 0.0f);
Vector3f point = new Vector3f(0, 0, 0); Vector3f point = Vector3f.ZERO;
Vector2f tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y()); Vector2f tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y());

View File

@ -356,7 +356,7 @@ public class CompositingText extends TextBase {
fontName = Configs.getConfigFonts().getName(); fontName = Configs.getConfigFonts().getName();
} }
Uri fontUri = Configs.getConfigFonts().getFontUri(fontName).clone(); Uri fontUri = Configs.getConfigFonts().getFontUri(fontName).clone();
fontUri.setproperty("size", Integer.toString(fontSize)); fontUri.setProperty("size", Integer.toString(fontSize));
Log.verbose("plop : " + fontName + " size=" + fontSize + " result :" + fontName); Log.verbose("plop : " + fontName + " size=" + fontSize + " result :" + fontName);
// link to new one // link to new one
this.font = ResourceTexturedFont.create(fontUri); this.font = ResourceTexturedFont.create(fontUri);

View File

@ -16,9 +16,9 @@ import org.atriasoft.ewol.event.EventInput;
import org.atriasoft.ewol.event.EventTime; import org.atriasoft.ewol.event.EventTime;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.object.EwolObject; import org.atriasoft.ewol.object.EwolObject;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.gale.key.KeyStatus; import org.atriasoft.gale.key.KeyStatus;
/** /**
@ -39,13 +39,13 @@ public class Button extends Widget {
/// Periodic call handle to remove it when needed /// Periodic call handle to remove it when needed
protected Connection periodicConnectionHanble = new Connection(); protected Connection periodicConnectionHanble = new Connection();
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "config") @XmlName(value = "config")
@EwolDescription(value = "configuration of the widget") @EwolDescription(value = "configuration of the widget")
private Uri propertyConfig = new Uri("THEME", "shape/Button.json", "ewol"); private Uri propertyConfig = new Uri("THEME", "shape/Button.json", "ewol");
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "value") @XmlName(value = "value")
@EwolDescription(value = "Value display in the entry (decorated text)") @EwolDescription(value = "Value display in the entry (decorated text)")
private String propertyValue = "Test Text..."; //!< string that must be displayed private String propertyValue = "Test Text..."; //!< string that must be displayed

View File

@ -16,9 +16,9 @@ import org.atriasoft.ewol.DrawProperty;
import org.atriasoft.ewol.annotation.EwolDescription; import org.atriasoft.ewol.annotation.EwolDescription;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.object.EwolObject; import org.atriasoft.ewol.object.EwolObject;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlElement;
import org.atriasoft.exml.model.XmlNode; import org.atriasoft.exml.model.XmlNode;
@ -29,7 +29,7 @@ import org.atriasoft.exml.model.XmlNode;
public class ContainerN extends Widget { public class ContainerN extends Widget {
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "lock") @XmlName(value = "lock")
@EwolDescription(value = "Lock the subwidget expand") @EwolDescription(value = "Lock the subwidget expand")
protected Vector2b propertyLockExpand = new Vector2b(false, false); //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget protected Vector2b propertyLockExpand = new Vector2b(false, false); //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget

View File

@ -21,9 +21,9 @@ import org.atriasoft.ewol.event.EventInput;
import org.atriasoft.ewol.event.EventTime; import org.atriasoft.ewol.event.EventTime;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.object.EwolObject; import org.atriasoft.ewol.object.EwolObject;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.gale.context.ClipBoard; import org.atriasoft.gale.context.ClipBoard;
import org.atriasoft.gale.context.ClipboardList; import org.atriasoft.gale.context.ClipboardList;
import org.atriasoft.gale.key.KeyKeyboard; import org.atriasoft.gale.key.KeyKeyboard;
@ -60,36 +60,36 @@ public class Entry extends Widget {
/// Periodic call handle to remove it when needed /// Periodic call handle to remove it when needed
protected Connection periodicConnectionHanble = new Connection(); protected Connection periodicConnectionHanble = new Connection();
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "config") @XmlName(value = "config")
@EwolDescription(value = "configuration of the widget") @EwolDescription(value = "configuration of the widget")
private Uri propertyConfig = new Uri("THEME", "shape/Entry.json", "ewol"); private Uri propertyConfig = new Uri("THEME", "shape/Entry.json", "ewol");
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "max") @XmlName(value = "max")
@EwolDescription(value = "Maximum char that can be set on the Entry") @EwolDescription(value = "Maximum char that can be set on the Entry")
private int propertyMaxCharacter = Integer.MAX_VALUE; //!< number max of Character in the list private int propertyMaxCharacter = Integer.MAX_VALUE; //!< number max of Character in the list
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "password") @XmlName(value = "password")
@EwolDescription(value = "Not display content in password mode") @EwolDescription(value = "Not display content in password mode")
private boolean propertyPassword = false; //!< Disable display of the content of the entry private boolean propertyPassword = false; //!< Disable display of the content of the entry
/// regular expression value /// regular expression value
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "regex") @XmlName(value = "regex")
@EwolDescription(value = "Control what it is write with a regular expression") @EwolDescription(value = "Control what it is write with a regular expression")
private String propertyRegex = ".*"; private String propertyRegex = ".*";
/// Text to display when nothing in in the entry (decorated text...) /// Text to display when nothing in in the entry (decorated text...)
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "empty-text") @XmlName(value = "empty-text")
@EwolDescription(value = "Text when nothing is written") @EwolDescription(value = "Text when nothing is written")
private String propertyTextWhenNothing = null; private String propertyTextWhenNothing = null;
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "value") @XmlName(value = "value")
@EwolDescription(value = "Value display in the entry (decorated text)") @EwolDescription(value = "Value display in the entry (decorated text)")
private String propertyValue = "Test Text..."; //!< string that must be displayed private String propertyValue = "Test Text..."; //!< string that must be displayed

View File

@ -18,9 +18,9 @@ import org.atriasoft.ewol.compositing.CompositingImage;
import org.atriasoft.ewol.event.EventInput; import org.atriasoft.ewol.event.EventInput;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.resource.ResourceColorFile; import org.atriasoft.ewol.resource.ResourceColorFile;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlElement;
import org.atriasoft.gale.key.KeyStatus; import org.atriasoft.gale.key.KeyStatus;
@ -32,46 +32,16 @@ public class ImageDisplay extends Widget {
protected ResourceColorFile colorProperty = null; //!< theme color property protected ResourceColorFile colorProperty = null; //!< theme color property
protected CompositingImage compositing = new CompositingImage(); //!< compositing element of the image. protected CompositingImage compositing = new CompositingImage(); //!< compositing element of the image.
protected Vector2f imageRenderSize = Vector2f.ZERO; //!< size of the image when we render it protected Vector2f imageRenderSize = Vector2f.ZERO; //!< size of the image when we render it
@XmlManaged
@XmlProperty
@XmlName(value = "border")
@EwolDescription(value = "Border of the image")
protected Dimension propertyBorder = Dimension.ZERO; //!< border to add at the image. protected Dimension propertyBorder = Dimension.ZERO; //!< border to add at the image.
@XmlManaged
@XmlProperty
@XmlName(value = "size")
@EwolDescription(value = "Basic display size of the image")
protected Dimension propertyImageSize = Dimension.ZERO; //!< border to add at the image. protected Dimension propertyImageSize = Dimension.ZERO; //!< border to add at the image.
@XmlManaged
@XmlProperty
@XmlName(value = "ratio")
@EwolDescription(value = "Keep ratio of the image")
protected boolean propertyKeepRatio = true; //!< keep the image ratio between width and hight protected boolean propertyKeepRatio = true; //!< keep the image ratio between width and hight
@XmlManaged
@XmlProperty
@XmlName(value = "part-start")
@EwolDescription(value = "Start display position in the image")
protected Vector2f propertyPosStart = Vector2f.ZERO; //!< position in the image to start the sisplay (when we want not to display all the image) protected Vector2f propertyPosStart = Vector2f.ZERO; //!< position in the image to start the sisplay (when we want not to display all the image)
@XmlManaged protected Vector2f propertyPosStop = Vector2f.ONE; //!< position in the image to start the sisplay (when we want not to display all the image)
@XmlProperty
@XmlName(value = "part-stop")
@EwolDescription(value = "Start display position in the image")
protected Vector2f propertyPosStop = Vector2f.ZERO; //!< position in the image to start the sisplay (when we want not to display all the image)
@XmlManaged
@XmlProperty protected boolean propertySmooth = true; //!< display is done in the pixel approximation if false
@XmlName(value = "smooth")
@EwolDescription(value = "Smooth display of the image")
protected boolean propertySmooth = true; //!< display is done in the pixed approximation if false
@XmlManaged
@XmlProperty
@XmlName(value = "src")
@EwolDescription(value = "Image source path")
protected Uri propertySource = null; //!< file name of the image. protected Uri propertySource = null; //!< file name of the image.
@XmlManaged
@XmlProperty
@XmlName(value = "use-theme-color")
@EwolDescription(value = "Use the theme color to display images")
protected boolean propertyUseThemeColor = false; //!< Use the themo color management ("THEMECOLOR:///Image.json?lib=ewol") default false protected boolean propertyUseThemeColor = false; //!< Use the themo color management ("THEMECOLOR:///Image.json?lib=ewol") default false
@EwolSignal(name = "pressed") @EwolSignal(name = "pressed")
@EwolDescription(value = "Image is pressed") @EwolDescription(value = "Image is pressed")
@ -110,34 +80,64 @@ public class ImageDisplay extends Widget {
markToRedraw(); markToRedraw();
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "border")
@EwolDescription(value = "Border of the image")
public Dimension getPropertyBorder() { public Dimension getPropertyBorder() {
return this.propertyBorder; return this.propertyBorder;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "size")
@EwolDescription(value = "Basic display size of the image")
public Dimension getPropertyImageSize() { public Dimension getPropertyImageSize() {
return this.propertyImageSize; return this.propertyImageSize;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "part-start")
@EwolDescription(value = "Start display position in the image")
public Vector2f getPropertyPosStart() { public Vector2f getPropertyPosStart() {
return this.propertyPosStart; return this.propertyPosStart;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "part-stop")
@EwolDescription(value = "Start display position in the image")
public Vector2f getPropertyPosStop() { public Vector2f getPropertyPosStop() {
return this.propertyPosStop; return this.propertyPosStop;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "src")
@EwolDescription(value = "Image source path")
public Uri getPropertySource() { public Uri getPropertySource() {
return this.propertySource; return this.propertySource;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "ratio")
@EwolDescription(value = "Keep ratio of the image")
public boolean isPropertyKeepRatio() { public boolean isPropertyKeepRatio() {
return this.propertyKeepRatio; return this.propertyKeepRatio;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "smooth")
@EwolDescription(value = "Smooth display of the image")
public boolean isPropertySmooth() { public boolean isPropertySmooth() {
return this.propertySmooth; return this.propertySmooth;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "use-theme-color")
@EwolDescription(value = "Use the theme color to display images")
public boolean isPropertyUseThemeColor() { public boolean isPropertyUseThemeColor() {
return this.propertyUseThemeColor; return this.propertyUseThemeColor;
} }
@ -263,6 +263,7 @@ public class ImageDisplay extends Widget {
Log.debug("Paint Image at : " + origin + " size=" + imageRealSize); Log.debug("Paint Image at : " + origin + " size=" + imageRealSize);
Log.debug("Paint Image :" + this.propertySource + " realsize=" + this.compositing.getRealSize() + " origin=" + origin + " size=" + imageRealSize); Log.debug("Paint Image :" + this.propertySource + " realsize=" + this.compositing.getRealSize() + " origin=" + origin + " size=" + imageRealSize);
Log.debug(" start=" + this.propertyPosStart + " stop=" + this.propertyPosStop); Log.debug(" start=" + this.propertyPosStart + " stop=" + this.propertyPosStop);
this.compositing.flush();
} }
/** /**
@ -343,7 +344,7 @@ public class ImageDisplay extends Widget {
} }
public void setPropertySource(final Uri propertySource) { public void setPropertySource(final Uri propertySource) {
if (this.propertySource.equals(propertySource)) { if (this.propertySource != null && this.propertySource.equals(propertySource)) {
return; return;
} }
this.propertySource = propertySource; this.propertySource = propertySource;

View File

@ -19,9 +19,9 @@ import org.atriasoft.ewol.compositing.CompositingText;
import org.atriasoft.ewol.event.EventInput; import org.atriasoft.ewol.event.EventInput;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.resource.ResourceColorFile; import org.atriasoft.ewol.resource.ResourceColorFile;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlElement;
import org.atriasoft.gale.key.KeyStatus; import org.atriasoft.gale.key.KeyStatus;
@ -30,18 +30,18 @@ public class Label extends Widget {
protected int colorDefaultFgText = -1; //!< Default color of the text protected int colorDefaultFgText = -1; //!< Default color of the text
protected ResourceColorFile colorProperty; //!< theme color property protected ResourceColorFile colorProperty; //!< theme color property
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "auto-translate") @XmlName(value = "auto-translate")
@EwolDescription(value = "Translate the String with the marker {T:xxxxxx}") @EwolDescription(value = "Translate the String with the marker {T:xxxxxx}")
protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate. protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate.
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "font-size") @XmlName(value = "font-size")
@EwolDescription(value = "Default font size (0=> system default)") @EwolDescription(value = "Default font size (0=> system default)")
protected int propertyFontSize = 0; //!< default size of the font. protected int propertyFontSize = 0; //!< default size of the font.
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "value") @XmlName(value = "value")
@EwolDescription(value = "Displayed value string") @EwolDescription(value = "Displayed value string")
protected String propertyValue = ""; //!< decorated text to display. protected String propertyValue = ""; //!< decorated text to display.

View File

@ -10,32 +10,17 @@ import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector3f; import org.atriasoft.etk.math.Vector3f;
import org.atriasoft.ewol.annotation.EwolDescription; import org.atriasoft.ewol.annotation.EwolDescription;
import org.atriasoft.ewol.compositing.CompositingDrawing; import org.atriasoft.ewol.compositing.CompositingDrawing;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
class ProgressBar extends Widget { class ProgressBar extends Widget {
private static final int DOT_RADIUS = 6; private static final int DOT_RADIUS = 6;
private final CompositingDrawing draw = new CompositingDrawing(); // basic drawing element private final CompositingDrawing draw = new CompositingDrawing(); // basic drawing element
@XmlManaged
@XmlProperty
@XmlName(value = "color-off")
@EwolDescription(value = "Color of the false value")
protected Color propertyTextColorBgOff = Color.NONE; protected Color propertyTextColorBgOff = Color.NONE;
@XmlManaged
@XmlProperty
@XmlName(value = "color-on")
@EwolDescription(value = "Color of the true value")
protected Color propertyTextColorBgOn = Color.GREEN; protected Color propertyTextColorBgOn = Color.GREEN;
@XmlManaged
@XmlProperty
@XmlName(value = "color-bg")
@EwolDescription(value = "ackground color")
protected Color propertyTextColorFg = Color.BLACK; protected Color propertyTextColorFg = Color.BLACK;
@XmlManaged
@XmlProperty
@XmlName(value = "value")
@EwolDescription(value = "Value of the progress bar [0..1]")
protected float propertyValue = 0; protected float propertyValue = 0;
public ProgressBar() { public ProgressBar() {
@ -48,19 +33,34 @@ class ProgressBar extends Widget {
this.minSize = new Vector2f(Math.max(tmpMin.x(), 40.0f), Math.max(tmpMin.y(), ProgressBar.DOT_RADIUS * 2.0f)); this.minSize = new Vector2f(Math.max(tmpMin.x(), 40.0f), Math.max(tmpMin.y(), ProgressBar.DOT_RADIUS * 2.0f));
markToRedraw(); markToRedraw();
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "color-off")
@EwolDescription(value = "Color of the false value")
public Color getPropertyTextColorBgOff() { public Color getPropertyTextColorBgOff() {
return this.propertyTextColorBgOff; return this.propertyTextColorBgOff;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "color-on")
@EwolDescription(value = "Color of the true value")
public Color getPropertyTextColorBgOn() { public Color getPropertyTextColorBgOn() {
return this.propertyTextColorBgOn; return this.propertyTextColorBgOn;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "color-bg")
@EwolDescription(value = "ackground color")
public Color getPropertyTextColorFg() { public Color getPropertyTextColorFg() {
return this.propertyTextColorFg; return this.propertyTextColorFg;
} }
@XmlManaged
@XmlAttribute
@XmlName(value = "value")
@EwolDescription(value = "Value of the progress bar [0..1]")
public float getPropertyValue() { public float getPropertyValue() {
return this.propertyValue; return this.propertyValue;
} }

View File

@ -13,10 +13,11 @@ import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector2i; import org.atriasoft.etk.math.Vector2i;
import org.atriasoft.ewol.Gravity; import org.atriasoft.ewol.Gravity;
import org.atriasoft.ewol.annotation.EwolDescription; import org.atriasoft.ewol.annotation.EwolDescription;
import org.atriasoft.ewol.annotation.EwolObjectProperty;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
public class Sizer extends ContainerN { public class Sizer extends ContainerN {
public enum DisplayMode { public enum DisplayMode {
@ -24,17 +25,9 @@ public class Sizer extends ContainerN {
modeVert; //!< Horizontal mode modeVert; //!< Horizontal mode
} }
@XmlManaged protected Dimension propertyBorderSize = new Dimension(Vector2f.ZERO, Distance.PIXEL); //!< Border size needed for all the display
@XmlProperty
@XmlName(value = "border")
@EwolDescription(value = "The sizer border size")
public Dimension propertyBorderSize = new Dimension(Vector2f.ZERO, Distance.PIXEL); //!< Border size needed for all the display
@XmlManaged protected DisplayMode propertyMode = DisplayMode.modeHori; //!< Methode to display the widget list (vert/hory ...)
@XmlProperty
@XmlName(value = "mode")
@EwolDescription(value = "The display mode")
public DisplayMode propertyMode = DisplayMode.modeHori; //!< Methode to display the widget list (vert/hory ...)
/** /**
* Constructor * Constructor
@ -87,11 +80,21 @@ public class Sizer extends ContainerN {
this.minSize = this.minSize.add(tmpBorderSize.multiply(2)); this.minSize = this.minSize.add(tmpBorderSize.multiply(2));
//Log.error("[" + getId() + "] {" + getObjectType() + "} Result min size : " + this.minSize); //Log.error("[" + getId() + "] {" + getObjectType() + "} Result min size : " + this.minSize);
} }
@XmlManaged
@XmlAttribute
@XmlName("border")
@EwolObjectProperty
@EwolDescription("The sizer border size")
public Dimension getPropertyBorderSize() { public Dimension getPropertyBorderSize() {
return this.propertyBorderSize; return this.propertyBorderSize;
} }
@XmlManaged
@XmlAttribute
@XmlName("mode")
@EwolObjectProperty
@EwolDescription("The display mode")
public DisplayMode getPropertyMode() { public DisplayMode getPropertyMode() {
return this.propertyMode; return this.propertyMode;
} }

View File

@ -11,9 +11,9 @@ import org.atriasoft.etk.math.Vector2f;
import org.atriasoft.etk.math.Vector3f; import org.atriasoft.etk.math.Vector3f;
import org.atriasoft.ewol.annotation.EwolDescription; import org.atriasoft.ewol.annotation.EwolDescription;
import org.atriasoft.ewol.compositing.CompositingDrawing; import org.atriasoft.ewol.compositing.CompositingDrawing;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
/** /**
* @ingroup ewolWidgetGroup * @ingroup ewolWidgetGroup
@ -21,7 +21,7 @@ import org.atriasoft.exml.annotation.XmlProperty;
public class Spacer extends Widget { public class Spacer extends Widget {
private final CompositingDrawing draw = new CompositingDrawing(); //!< Compositing drawing element private final CompositingDrawing draw = new CompositingDrawing(); //!< Compositing drawing element
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "color") @XmlName(value = "color")
@EwolDescription(value = "background of the spacer") @EwolDescription(value = "background of the spacer")
protected Color propertyColor = Color.GREEN; //!< Background color protected Color propertyColor = Color.GREEN; //!< Background color

View File

@ -31,10 +31,10 @@ import org.atriasoft.ewol.event.EventShortCut;
import org.atriasoft.ewol.event.InputSystem; import org.atriasoft.ewol.event.InputSystem;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.object.EwolObject; import org.atriasoft.ewol.object.EwolObject;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlDefaultManaged; import org.atriasoft.exml.annotation.XmlDefaultManaged;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.exml.model.XmlElement; import org.atriasoft.exml.model.XmlElement;
import org.atriasoft.gale.backend3d.OpenGL; import org.atriasoft.gale.backend3d.OpenGL;
import org.atriasoft.gale.context.ClipboardList; import org.atriasoft.gale.context.ClipboardList;
@ -89,43 +89,43 @@ public class Widget extends EwolObject {
protected Vector2f origin = new Vector2f(0, 0); //!< internal ... I do not really known how if can use it ... protected Vector2f origin = new Vector2f(0, 0); //!< internal ... I do not really known how if can use it ...
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "focus") @XmlName(value = "focus")
@EwolDescription(value = "enable the widget to have the focus capacity") @EwolDescription(value = "enable the widget to have the focus capacity")
protected boolean propertyCanFocus = false; //!< the focus can be done on this widget protected boolean propertyCanFocus = false; //!< the focus can be done on this widget
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "expand") @XmlName(value = "expand")
@EwolDescription(value = "Request the widget Expand size while space is available") @EwolDescription(value = "Request the widget Expand size while space is available")
protected Vector2b propertyExpand = new Vector2b(false, false); //!< the widget will expand if possible protected Vector2b propertyExpand = new Vector2b(false, false); //!< the widget will expand if possible
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "fill") @XmlName(value = "fill")
@EwolDescription(value = "Fill the widget available size") @EwolDescription(value = "Fill the widget available size")
protected Vector2b propertyFill = new Vector2b(true, true); //!< the widget will fill all the space provided by the parent. protected Vector2b propertyFill = new Vector2b(true, true); //!< the widget will fill all the space provided by the parent.
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "gravity") @XmlName(value = "gravity")
@EwolDescription(value = "Gravity orientation") @EwolDescription(value = "Gravity orientation")
protected Gravity propertyGravity = Gravity.buttomLeft; //!< Gravity of the widget protected Gravity propertyGravity = Gravity.buttomLeft; //!< Gravity of the widget
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "hide") @XmlName(value = "hide")
@EwolDescription(value = "The widget start hided") @EwolDescription(value = "The widget start hided")
protected boolean propertyHide = false; //!< hide a widget on the display protected boolean propertyHide = false; //!< hide a widget on the display
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "max-size") @XmlName(value = "max-size")
@EwolDescription(value = "User maximum size") @EwolDescription(value = "User maximum size")
protected Dimension propertyMaxSize = new Dimension(new Vector2f(999999, 999999), Distance.PIXEL); //!< user define the maximum size of the widget protected Dimension propertyMaxSize = new Dimension(new Vector2f(999999, 999999), Distance.PIXEL); //!< user define the maximum size of the widget
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "min-size") @XmlName(value = "min-size")
@EwolDescription(value = "User minimum size") @EwolDescription(value = "User minimum size")
protected Dimension propertyMinSize = new Dimension(new Vector2f(0, 0), Distance.PIXEL); //!< user define the minimum size of the widget protected Dimension propertyMinSize = new Dimension(new Vector2f(0, 0), Distance.PIXEL); //!< user define the minimum size of the widget

View File

@ -21,9 +21,9 @@ import org.atriasoft.ewol.context.EwolContext;
import org.atriasoft.ewol.internal.Log; import org.atriasoft.ewol.internal.Log;
import org.atriasoft.ewol.object.EwolObject; import org.atriasoft.ewol.object.EwolObject;
import org.atriasoft.ewol.resource.ResourceColorFile; import org.atriasoft.ewol.resource.ResourceColorFile;
import org.atriasoft.exml.annotation.XmlAttribute;
import org.atriasoft.exml.annotation.XmlManaged; import org.atriasoft.exml.annotation.XmlManaged;
import org.atriasoft.exml.annotation.XmlName; import org.atriasoft.exml.annotation.XmlName;
import org.atriasoft.exml.annotation.XmlProperty;
import org.atriasoft.gale.backend3d.OpenGL; import org.atriasoft.gale.backend3d.OpenGL;
/** /**
@ -36,12 +36,12 @@ public class Windows extends Widget {
protected List<Widget> popUpWidgetList = new ArrayList<Widget>(); protected List<Widget> popUpWidgetList = new ArrayList<Widget>();
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "file-color") @XmlName(value = "file-color")
@EwolDescription(value = "File color of the Windows") @EwolDescription(value = "File color of the Windows")
public Uri propertyColorConfiguration = new Uri("THEME", "color/Windows.json", "ewol"); //!< Configuration file of the windows theme public Uri propertyColorConfiguration = new Uri("THEME", "color/Windows.json", "ewol"); //!< Configuration file of the windows theme
@XmlManaged @XmlManaged
@XmlProperty @XmlAttribute
@XmlName(value = "title") @XmlName(value = "title")
@EwolDescription(value = "Title of the windows") @EwolDescription(value = "Title of the windows")
public String propertyTitle = "No title"; //!< Current title of the windows public String propertyTitle = "No title"; //!< Current title of the windows