[DEV] set imaghe drawer updated
This commit is contained in:
parent
7c0a5eefcc
commit
62a72a30c9
26
.classpath
26
.classpath
@ -23,17 +23,7 @@
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/loader3d">
|
||||
<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">
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-esignal">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
@ -43,12 +33,12 @@
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/scenarium-logger">
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-exml">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-etk">
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/loader3d">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
@ -58,15 +48,5 @@
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</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"/>
|
||||
</classpath>
|
||||
|
@ -1,3 +1,5 @@
|
||||
#version 400 core
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
@ -10,6 +12,7 @@ varying vec2 io_texcoord;
|
||||
varying vec4 io_color;
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -1,21 +1,27 @@
|
||||
#version 400 core
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
// Input :
|
||||
attribute vec3 in_coord3d;
|
||||
attribute vec2 in_texture2d;
|
||||
attribute vec4 in_color;
|
||||
uniform mat4 in_MatrixTransformation;
|
||||
|
||||
// VBA Input :
|
||||
layout (location = 0) in vec3 in_position;
|
||||
layout (location = 1) in vec2 in_textureCoords;
|
||||
layout (location = 3) in vec4 in_colors;
|
||||
uniform mat4 in_matrixTransformation;
|
||||
uniform mat4 in_matrixProjection;
|
||||
uniform mat4 in_matrixView;
|
||||
|
||||
// output :
|
||||
varying vec4 io_color;
|
||||
varying vec2 io_texcoord;
|
||||
|
||||
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
|
||||
io_texcoord = in_texture2d;
|
||||
io_texcoord = in_textureCoords;
|
||||
// set output color :
|
||||
io_color = in_color;
|
||||
io_color = in_colors;
|
||||
}
|
||||
|
@ -6,10 +6,11 @@
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-ewol">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="out/eclipse"/>
|
||||
</classpath>
|
||||
|
1
samples/.gitignore
vendored
1
samples/.gitignore
vendored
@ -1 +1,2 @@
|
||||
/bin/
|
||||
/out/
|
||||
|
BIN
samples/resources/test-ewol/data/mireA.png
Normal file
BIN
samples/resources/test-ewol/data/mireA.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
samples/resources/test-ewol/data/mireB.jpg
Normal file
BIN
samples/resources/test-ewol/data/mireB.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
@ -1,4 +1,5 @@
|
||||
module sample.atriasoft.ewol {
|
||||
//exports sample.atriasoft.ewol.simpleWindowsWithImage;
|
||||
requires org.atriasoft.ewol;
|
||||
requires org.atriasoft.etk;
|
||||
}
|
@ -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 ]");
|
||||
}
|
||||
|
||||
}
|
@ -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() {}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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() {}
|
||||
}
|
@ -1,31 +1,24 @@
|
||||
package sample.atriasoft.ewol.simpleWindowsWithImage;
|
||||
|
||||
import org.atriasoft.etk.Uri;
|
||||
import org.atriasoft.etk.math.Vector2b;
|
||||
import org.atriasoft.ewol.widget.Label;
|
||||
import org.atriasoft.ewol.widget.Spacer;
|
||||
import org.atriasoft.ewol.widget.ImageDisplay;
|
||||
import org.atriasoft.ewol.widget.Windows;
|
||||
|
||||
public class MainWindows extends Windows {
|
||||
|
||||
public MainWindows() {
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
setPropertyTitle("Simple sample test");
|
||||
setPropertyTitle("Simple label");
|
||||
//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);
|
||||
}
|
||||
//! [ewol_sample_HW_windows_title]
|
||||
ImageDisplay testWidget = new ImageDisplay();
|
||||
testWidget.setPropertySource(new Uri("DATA", "mireA.png"));
|
||||
testWidget.setPropertyExpand(new Vector2b(true, true));
|
||||
testWidget.setPropertyFill(new Vector2b(true, true));
|
||||
setSubWidget(testWidget);
|
||||
//! [ewol_sample_HW_windows_label]
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ import org.atriasoft.ewol.Ewol;
|
||||
public class SimpleWindowsWithImageMain {
|
||||
public static void main(final String[] args) {
|
||||
Ewol.init();
|
||||
//Uri.addLibrary("ne", MainCollisionTest.class, "testDataLoxelEngine/");
|
||||
Uri.setApplication(SimpleWindowsWithImageMain.class);
|
||||
//Uri.addLibrary("test-data", SimpleWindowsWithImageMain.class, "test-ewol/");
|
||||
Uri.setApplication(SimpleWindowsWithImageMain.class, "test-ewol/");
|
||||
Ewol.run(new Appl(), args);
|
||||
}
|
||||
|
||||
|
13
src/org/atriasoft/ewol/annotation/EwolObjectProperty.java
Normal file
13
src/org/atriasoft/ewol/annotation/EwolObjectProperty.java
Normal 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 {
|
||||
|
||||
}
|
@ -19,7 +19,7 @@ import org.atriasoft.gale.backend3d.OpenGL.RenderMode;
|
||||
import org.atriasoft.gale.resource.ResourceProgram;
|
||||
import org.atriasoft.gale.resource.ResourceTexture2;
|
||||
import org.atriasoft.gale.resource.ResourceTextureFile;
|
||||
import org.atriasoft.gale.resource.ResourceVirtualBufferObject;
|
||||
import org.atriasoft.gale.resource.ResourceVirtualArrayObject;
|
||||
|
||||
public class CompositingImage extends Compositing {
|
||||
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;
|
||||
private float angle = 0; //!< Angle to set at the axes
|
||||
private boolean clippingEnable = true; //!< true if the clipping must be activated
|
||||
private Vector3f clippingPosStart = new Vector3f(0, 0, 0); //!< Clipping start position
|
||||
private Vector3f clippingPosStop = new Vector3f(0, 0, 0); //!< Clipping stop position
|
||||
private Vector3f clippingPosStart = Vector3f.ZERO; //!< Clipping start position
|
||||
private Vector3f clippingPosStop = Vector3f.ZERO; //!< Clipping stop position
|
||||
private Color color = new Color(1, 1, 1); //!< The text foreground color
|
||||
private Uri filename;
|
||||
private int oGLColor = -1; //!< openGL id on the element (color buffer)
|
||||
private int oGLMatrix = -1; //!< openGL id on the element (transformation matrix)
|
||||
private final int oGLColor = -1; //!< openGL id on the element (color buffer)
|
||||
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 ResourceProgram oGLprogram = null; //!< pointer on the opengl display program
|
||||
private int oGLtexID = -1; //!< openGL id on the element (texture ID)
|
||||
private int oGLtexture = -1; //!< openGL id on the element (Texture position)
|
||||
private Vector3f position = new Vector3f(0, 0, 0); //!< The current position to draw
|
||||
private final int oGLtexture = -1; //!< openGL id on the element (Texture position)
|
||||
private Vector3f position = Vector3f.ZERO; //!< The current position to draw
|
||||
private Vector2i requestSize = new Vector2i(2, 2);
|
||||
|
||||
private ResourceTextureFile resource = null; //!< texture resources
|
||||
private ResourceTexture2 resourceImage = null; //!< texture resources
|
||||
private ResourceVirtualBufferObject vbo = null;
|
||||
private ResourceVirtualArrayObject vbo = null;
|
||||
|
||||
final Color[] vboDataColors = new Color[6];
|
||||
final Vector3f[] vboDataCoords = new Vector3f[6];
|
||||
final Vector2f[] vboDataCoordsTex = new Vector2f[6];
|
||||
private Color[] vboDataColors = null;
|
||||
private Vector3f[] vboDataCoords = null;
|
||||
private Vector2f[] vboDataCoordsTex = null;
|
||||
|
||||
public CompositingImage() {
|
||||
this(new Uri("DATA", ""), CompositingImage.SIZE_AUTO);
|
||||
@ -63,7 +65,7 @@ public class CompositingImage extends Compositing {
|
||||
public CompositingImage(final Uri uri, final int size) {
|
||||
this.filename = uri;
|
||||
// Create the VBO:
|
||||
this.vbo = ResourceVirtualBufferObject.create(CompositingImage.NB_VBO);
|
||||
this.vbo = ResourceVirtualArrayObject.createDynamic();
|
||||
if (this.vbo == null) {
|
||||
Log.error("can not instanciate VBO ...");
|
||||
return;
|
||||
@ -84,9 +86,9 @@ public class CompositingImage extends Compositing {
|
||||
// reset Buffer :
|
||||
this.vbo.clear();
|
||||
// reset temporal variables :
|
||||
this.position = new Vector3f(0, 0, 0);
|
||||
this.clippingPosStart = new Vector3f(0, 0, 0);
|
||||
this.clippingPosStop = new Vector3f(0, 0, 0);
|
||||
this.position = Vector3f.ZERO;
|
||||
this.clippingPosStart = Vector3f.ZERO;
|
||||
this.clippingPosStop = Vector3f.ZERO;
|
||||
this.clippingEnable = false;
|
||||
this.color = Color.WHITE;
|
||||
this.angle = 0;
|
||||
@ -119,9 +121,13 @@ public class CompositingImage extends Compositing {
|
||||
OpenGL.enable(OpenGL.Flag.flag_depthTest);
|
||||
}
|
||||
// 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.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
|
||||
if (this.resourceImage != null) {
|
||||
this.resourceImage.bindForRendering(0);
|
||||
@ -130,25 +136,17 @@ public class CompositingImage extends Compositing {
|
||||
} else {
|
||||
Log.error("FONT type error Request normal and display distance field ...");
|
||||
}
|
||||
// position:
|
||||
this.oGLprogram.sendAttributePointer(this.oGLPosition, this.vbo, CompositingImage.VBO_ID_COORD);
|
||||
// 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.vbo.renderArrays(RenderMode.TRIANGLE);
|
||||
this.vbo.unBindForRendering();
|
||||
this.oGLprogram.unUse();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
|
||||
this.vbo.setVboData(CompositingImage.VBO_ID_COORD, this.vboDataCoords);
|
||||
this.vbo.setVboData(CompositingImage.VBO_ID_COORD_TEX, this.vboDataCoordsTex);
|
||||
this.vbo.setVboData(CompositingImage.VBO_ID_COLOR, this.vboDataColors);
|
||||
|
||||
this.vbo.setPosition(this.vboDataCoords);
|
||||
this.vbo.setTextureCoordinate(this.vboDataCoordsTex);
|
||||
this.vbo.setColors(this.vboDataColors);
|
||||
this.vbo.setVertexCount(this.vboDataCoords.length);
|
||||
this.vbo.flush();
|
||||
}
|
||||
|
||||
@ -190,16 +188,15 @@ public class CompositingImage extends Compositing {
|
||||
this.oGLPosition = 0;
|
||||
this.oGLprogram = ResourceProgram.create(new Uri("DATA", "textured3D.vert", "ewol"), new Uri("DATA", "textured3D.frag", "ewol"));
|
||||
if (this.oGLprogram != null) {
|
||||
this.oGLPosition = this.oGLprogram.getAttribute("in_coord3d");
|
||||
this.oGLColor = this.oGLprogram.getAttribute("in_color");
|
||||
this.oGLtexture = this.oGLprogram.getAttribute("in_texture2d");
|
||||
this.oGLMatrix = this.oGLprogram.getUniform("in_MatrixTransformation");
|
||||
this.oGLMatrixTransformation = this.oGLprogram.getUniform("in_matrixTransformation");
|
||||
this.oGLMatrixProjection = this.oGLprogram.getUniform("in_matrixProjection");
|
||||
this.oGLMatrixView = this.oGLprogram.getUniform("in_matrixView");
|
||||
this.oGLtexID = this.oGLprogram.getUniform("in_texID");
|
||||
}
|
||||
}
|
||||
|
||||
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 sourcePosStop = sourcePosStopIn.multiply(ratio);
|
||||
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) {
|
||||
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);
|
||||
|
||||
Vector3f point = new Vector3f(0, 0, 0);
|
||||
Vector3f point = Vector3f.ZERO;
|
||||
|
||||
Vector2f tex = new Vector2f(sourcePosStart.x(), sourcePosStop.y());
|
||||
|
||||
|
@ -356,7 +356,7 @@ public class CompositingText extends TextBase {
|
||||
fontName = Configs.getConfigFonts().getName();
|
||||
}
|
||||
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);
|
||||
// link to new one
|
||||
this.font = ResourceTexturedFont.create(fontUri);
|
||||
|
@ -16,9 +16,9 @@ import org.atriasoft.ewol.event.EventInput;
|
||||
import org.atriasoft.ewol.event.EventTime;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.object.EwolObject;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.gale.key.KeyStatus;
|
||||
|
||||
/**
|
||||
@ -39,13 +39,13 @@ public class Button extends Widget {
|
||||
/// Periodic call handle to remove it when needed
|
||||
protected Connection periodicConnectionHanble = new Connection();
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "config")
|
||||
@EwolDescription(value = "configuration of the widget")
|
||||
private Uri propertyConfig = new Uri("THEME", "shape/Button.json", "ewol");
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "value")
|
||||
@EwolDescription(value = "Value display in the entry (decorated text)")
|
||||
private String propertyValue = "Test Text..."; //!< string that must be displayed
|
||||
|
@ -16,9 +16,9 @@ import org.atriasoft.ewol.DrawProperty;
|
||||
import org.atriasoft.ewol.annotation.EwolDescription;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.object.EwolObject;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.exml.model.XmlElement;
|
||||
import org.atriasoft.exml.model.XmlNode;
|
||||
|
||||
@ -29,7 +29,7 @@ import org.atriasoft.exml.model.XmlNode;
|
||||
public class ContainerN extends Widget {
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "lock")
|
||||
@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
|
||||
|
@ -21,9 +21,9 @@ import org.atriasoft.ewol.event.EventInput;
|
||||
import org.atriasoft.ewol.event.EventTime;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.object.EwolObject;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.gale.context.ClipBoard;
|
||||
import org.atriasoft.gale.context.ClipboardList;
|
||||
import org.atriasoft.gale.key.KeyKeyboard;
|
||||
@ -60,36 +60,36 @@ public class Entry extends Widget {
|
||||
/// Periodic call handle to remove it when needed
|
||||
protected Connection periodicConnectionHanble = new Connection();
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "config")
|
||||
@EwolDescription(value = "configuration of the widget")
|
||||
private Uri propertyConfig = new Uri("THEME", "shape/Entry.json", "ewol");
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "max")
|
||||
@EwolDescription(value = "Maximum char that can be set on the Entry")
|
||||
private int propertyMaxCharacter = Integer.MAX_VALUE; //!< number max of Character in the list
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "password")
|
||||
@EwolDescription(value = "Not display content in password mode")
|
||||
private boolean propertyPassword = false; //!< Disable display of the content of the entry
|
||||
/// regular expression value
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "regex")
|
||||
@EwolDescription(value = "Control what it is write with a regular expression")
|
||||
private String propertyRegex = ".*";
|
||||
|
||||
/// Text to display when nothing in in the entry (decorated text...)
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "empty-text")
|
||||
@EwolDescription(value = "Text when nothing is written")
|
||||
private String propertyTextWhenNothing = null;
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "value")
|
||||
@EwolDescription(value = "Value display in the entry (decorated text)")
|
||||
private String propertyValue = "Test Text..."; //!< string that must be displayed
|
||||
|
@ -18,9 +18,9 @@ import org.atriasoft.ewol.compositing.CompositingImage;
|
||||
import org.atriasoft.ewol.event.EventInput;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.resource.ResourceColorFile;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.exml.model.XmlElement;
|
||||
import org.atriasoft.gale.key.KeyStatus;
|
||||
|
||||
@ -32,46 +32,16 @@ public class ImageDisplay extends Widget {
|
||||
protected ResourceColorFile colorProperty = null; //!< theme color property
|
||||
protected CompositingImage compositing = new CompositingImage(); //!< compositing element of the image.
|
||||
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.
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlName(value = "size")
|
||||
@EwolDescription(value = "Basic display size of 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
|
||||
@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)
|
||||
@XmlManaged
|
||||
@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)
|
||||
protected Vector2f propertyPosStop = Vector2f.ONE; //!< position in the image to start the sisplay (when we want not to display all the image)
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@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 boolean propertySmooth = true; //!< display is done in the pixel approximation if false
|
||||
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
|
||||
@EwolSignal(name = "pressed")
|
||||
@EwolDescription(value = "Image is pressed")
|
||||
@ -110,34 +80,64 @@ public class ImageDisplay extends Widget {
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "border")
|
||||
@EwolDescription(value = "Border of the image")
|
||||
public Dimension getPropertyBorder() {
|
||||
return this.propertyBorder;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "size")
|
||||
@EwolDescription(value = "Basic display size of the image")
|
||||
public Dimension getPropertyImageSize() {
|
||||
return this.propertyImageSize;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "part-start")
|
||||
@EwolDescription(value = "Start display position in the image")
|
||||
public Vector2f getPropertyPosStart() {
|
||||
return this.propertyPosStart;
|
||||
}
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "part-stop")
|
||||
@EwolDescription(value = "Start display position in the image")
|
||||
public Vector2f getPropertyPosStop() {
|
||||
return this.propertyPosStop;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "src")
|
||||
@EwolDescription(value = "Image source path")
|
||||
public Uri getPropertySource() {
|
||||
return this.propertySource;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "ratio")
|
||||
@EwolDescription(value = "Keep ratio of the image")
|
||||
public boolean isPropertyKeepRatio() {
|
||||
return this.propertyKeepRatio;
|
||||
}
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "smooth")
|
||||
@EwolDescription(value = "Smooth display of the image")
|
||||
public boolean isPropertySmooth() {
|
||||
return this.propertySmooth;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "use-theme-color")
|
||||
@EwolDescription(value = "Use the theme color to display images")
|
||||
public boolean isPropertyUseThemeColor() {
|
||||
return this.propertyUseThemeColor;
|
||||
}
|
||||
@ -263,6 +263,7 @@ public class ImageDisplay extends Widget {
|
||||
Log.debug("Paint Image at : " + 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);
|
||||
this.compositing.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -343,7 +344,7 @@ public class ImageDisplay extends Widget {
|
||||
}
|
||||
|
||||
public void setPropertySource(final Uri propertySource) {
|
||||
if (this.propertySource.equals(propertySource)) {
|
||||
if (this.propertySource != null && this.propertySource.equals(propertySource)) {
|
||||
return;
|
||||
}
|
||||
this.propertySource = propertySource;
|
||||
|
@ -19,9 +19,9 @@ import org.atriasoft.ewol.compositing.CompositingText;
|
||||
import org.atriasoft.ewol.event.EventInput;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.resource.ResourceColorFile;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.exml.model.XmlElement;
|
||||
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 ResourceColorFile colorProperty; //!< theme color property
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "auto-translate")
|
||||
@EwolDescription(value = "Translate the String with the marker {T:xxxxxx}")
|
||||
protected boolean propertyAutoTranslate = true; //!< if at true the data is translate automaticaly translate.
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "font-size")
|
||||
@EwolDescription(value = "Default font size (0=> system default)")
|
||||
|
||||
protected int propertyFontSize = 0; //!< default size of the font.
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "value")
|
||||
@EwolDescription(value = "Displayed value string")
|
||||
protected String propertyValue = ""; //!< decorated text to display.
|
||||
|
@ -10,32 +10,17 @@ import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.etk.math.Vector3f;
|
||||
import org.atriasoft.ewol.annotation.EwolDescription;
|
||||
import org.atriasoft.ewol.compositing.CompositingDrawing;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
|
||||
class ProgressBar extends Widget {
|
||||
private static final int DOT_RADIUS = 6;
|
||||
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;
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlName(value = "color-on")
|
||||
@EwolDescription(value = "Color of the true value")
|
||||
protected Color propertyTextColorBgOn = Color.GREEN;
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlName(value = "color-bg")
|
||||
@EwolDescription(value = "ackground color")
|
||||
protected Color propertyTextColorFg = Color.BLACK;
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlName(value = "value")
|
||||
@EwolDescription(value = "Value of the progress bar [0..1]")
|
||||
protected float propertyValue = 0;
|
||||
|
||||
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));
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "color-off")
|
||||
@EwolDescription(value = "Color of the false value")
|
||||
public Color getPropertyTextColorBgOff() {
|
||||
return this.propertyTextColorBgOff;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "color-on")
|
||||
@EwolDescription(value = "Color of the true value")
|
||||
public Color getPropertyTextColorBgOn() {
|
||||
return this.propertyTextColorBgOn;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "color-bg")
|
||||
@EwolDescription(value = "ackground color")
|
||||
public Color getPropertyTextColorFg() {
|
||||
return this.propertyTextColorFg;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName(value = "value")
|
||||
@EwolDescription(value = "Value of the progress bar [0..1]")
|
||||
public float getPropertyValue() {
|
||||
return this.propertyValue;
|
||||
}
|
||||
|
@ -13,10 +13,11 @@ import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.etk.math.Vector2i;
|
||||
import org.atriasoft.ewol.Gravity;
|
||||
import org.atriasoft.ewol.annotation.EwolDescription;
|
||||
import org.atriasoft.ewol.annotation.EwolObjectProperty;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
|
||||
public class Sizer extends ContainerN {
|
||||
public enum DisplayMode {
|
||||
@ -24,17 +25,9 @@ public class Sizer extends ContainerN {
|
||||
modeVert; //!< Horizontal mode
|
||||
}
|
||||
|
||||
@XmlManaged
|
||||
@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
|
||||
protected Dimension propertyBorderSize = new Dimension(Vector2f.ZERO, Distance.PIXEL); //!< Border size needed for all the display
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlName(value = "mode")
|
||||
@EwolDescription(value = "The display mode")
|
||||
public DisplayMode propertyMode = DisplayMode.modeHori; //!< Methode to display the widget list (vert/hory ...)
|
||||
protected DisplayMode propertyMode = DisplayMode.modeHori; //!< Methode to display the widget list (vert/hory ...)
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -87,11 +80,21 @@ public class Sizer extends ContainerN {
|
||||
this.minSize = this.minSize.add(tmpBorderSize.multiply(2));
|
||||
//Log.error("[" + getId() + "] {" + getObjectType() + "} Result min size : " + this.minSize);
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName("border")
|
||||
@EwolObjectProperty
|
||||
@EwolDescription("The sizer border size")
|
||||
public Dimension getPropertyBorderSize() {
|
||||
return this.propertyBorderSize;
|
||||
}
|
||||
|
||||
|
||||
@XmlManaged
|
||||
@XmlAttribute
|
||||
@XmlName("mode")
|
||||
@EwolObjectProperty
|
||||
@EwolDescription("The display mode")
|
||||
public DisplayMode getPropertyMode() {
|
||||
return this.propertyMode;
|
||||
}
|
||||
|
@ -11,9 +11,9 @@ import org.atriasoft.etk.math.Vector2f;
|
||||
import org.atriasoft.etk.math.Vector3f;
|
||||
import org.atriasoft.ewol.annotation.EwolDescription;
|
||||
import org.atriasoft.ewol.compositing.CompositingDrawing;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
|
||||
/**
|
||||
* @ingroup ewolWidgetGroup
|
||||
@ -21,7 +21,7 @@ import org.atriasoft.exml.annotation.XmlProperty;
|
||||
public class Spacer extends Widget {
|
||||
private final CompositingDrawing draw = new CompositingDrawing(); //!< Compositing drawing element
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "color")
|
||||
@EwolDescription(value = "background of the spacer")
|
||||
protected Color propertyColor = Color.GREEN; //!< Background color
|
||||
|
@ -31,10 +31,10 @@ import org.atriasoft.ewol.event.EventShortCut;
|
||||
import org.atriasoft.ewol.event.InputSystem;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.object.EwolObject;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlDefaultManaged;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.exml.model.XmlElement;
|
||||
import org.atriasoft.gale.backend3d.OpenGL;
|
||||
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 ...
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "focus")
|
||||
@EwolDescription(value = "enable the widget to have the focus capacity")
|
||||
protected boolean propertyCanFocus = false; //!< the focus can be done on this widget
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "expand")
|
||||
@EwolDescription(value = "Request the widget Expand size while space is available")
|
||||
protected Vector2b propertyExpand = new Vector2b(false, false); //!< the widget will expand if possible
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "fill")
|
||||
@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.
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "gravity")
|
||||
@EwolDescription(value = "Gravity orientation")
|
||||
protected Gravity propertyGravity = Gravity.buttomLeft; //!< Gravity of the widget
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "hide")
|
||||
@EwolDescription(value = "The widget start hided")
|
||||
protected boolean propertyHide = false; //!< hide a widget on the display
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "max-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
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "min-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
|
||||
|
@ -21,9 +21,9 @@ import org.atriasoft.ewol.context.EwolContext;
|
||||
import org.atriasoft.ewol.internal.Log;
|
||||
import org.atriasoft.ewol.object.EwolObject;
|
||||
import org.atriasoft.ewol.resource.ResourceColorFile;
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlProperty;
|
||||
import org.atriasoft.gale.backend3d.OpenGL;
|
||||
|
||||
/**
|
||||
@ -36,12 +36,12 @@ public class Windows extends Widget {
|
||||
protected List<Widget> popUpWidgetList = new ArrayList<Widget>();
|
||||
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "file-color")
|
||||
@EwolDescription(value = "File color of the Windows")
|
||||
public Uri propertyColorConfiguration = new Uri("THEME", "color/Windows.json", "ewol"); //!< Configuration file of the windows theme
|
||||
@XmlManaged
|
||||
@XmlProperty
|
||||
@XmlAttribute
|
||||
@XmlName(value = "title")
|
||||
@EwolDescription(value = "Title of the windows")
|
||||
public String propertyTitle = "No title"; //!< Current title of the windows
|
||||
|
Loading…
x
Reference in New Issue
Block a user