Author: hisham
Date: 2005-06-14 08:44:52 -0400 (Tue, 14 Jun 2005)
New Revision: 45961
Added:
trunk/efl-sharp/libs/efl-sharp/data/eblocks/
trunk/efl-sharp/libs/efl-sharp/data/eblocks/Makefile.am
trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/
trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/Makefile.am
trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/e17.edj
trunk/efl-sharp/libs/efl-sharp/data/fonts/Makefile.am
trunk/efl-sharp/libs/efl-sharp/data/test/
trunk/efl-sharp/libs/efl-sharp/data/test/Makefile.am
trunk/efl-sharp/libs/efl-sharp/data/test/images/
trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am
trunk/efl-sharp/libs/efl-sharp/data/test/images/e.png
trunk/efl-sharp/libs/efl-sharp/data/test/images/flower.jpg
trunk/efl-sharp/libs/efl-sharp/data/test/src/
trunk/efl-sharp/libs/efl-sharp/data/test/src/Makefile.am
trunk/efl-sharp/libs/efl-sharp/data/test/src/flower.edc
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_dialog.cs
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_label.cs
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_line.cs
trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_scrolledwindow.cs
Removed:
trunk/efl-sharp/libs/eblocks/temp_images/
trunk/efl-sharp/libs/eblocks/themes/
trunk/efl-sharp/libs/efl-sharp/data/eflsharp_test.sh
trunk/efl-sharp/libs/efl-sharp/data/images/
trunk/efl-sharp/libs/efl-sharp/data/src/
Modified:
trunk/efl-sharp/libs/eblocks/build.sh
trunk/efl-sharp/libs/eblocks/test.cs
trunk/efl-sharp/libs/efl-sharp/configure.in
trunk/efl-sharp/libs/efl-sharp/data/Makefile.am
trunk/efl-sharp/libs/efl-sharp/src/bin/efl_sharp_test.cs
trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am
Log:
eblocks is part of the dll now. autofoo revamped to allow theme installation
etc...
Modified: trunk/efl-sharp/libs/eblocks/build.sh
===================================================================
--- trunk/efl-sharp/libs/eblocks/build.sh 2005-06-14 12:20:57 UTC (rev
45960)
+++ trunk/efl-sharp/libs/eblocks/build.sh 2005-06-14 12:44:52 UTC (rev
45961)
@@ -1,10 +1,2 @@
-pushd themes/sharp
-edje_cc sharp.edc -id images -fd fonts
-popd
-
-#pushd themes/e17
-#./build.sh
-#popd
-
mcs test.cs -r:System.Drawing
-r:/usr/lib/mono/gac/efl-sharp/0.0.1.0__56eb9b2d0c525a1a/efl-sharp.dll \
-out:test.exe
Modified: trunk/efl-sharp/libs/eblocks/test.cs
===================================================================
--- trunk/efl-sharp/libs/eblocks/test.cs 2005-06-14 12:20:57 UTC (rev
45960)
+++ trunk/efl-sharp/libs/eblocks/test.cs 2005-06-14 12:44:52 UTC (rev
45961)
@@ -8,877 +8,8 @@
using Enlightenment.Ecore;
using Enlightenment.Edje;
using Enlightenment.Epsilon;
+using Enlightenment.Eblocks;
-
-public class Line : Enlightenment.Evas.Item
-{
- private int width = 6;
- private int height = 6;
- private int x = 0;
- private int y = 0;
- private bool vertical = false;
- private bool horizontal = true;
- private bool rendered = false;
-
- protected Enlightenment.Edje.Edje bg;
- public Enlightenment.Evas.Rectangle internal_item;
- protected Enlightenment.Evas.Rectangle clip;
-
- public override IntPtr Raw
- {
- get { return internal_item.Raw; }
- }
-
-
- public Line()
- {}
-
- public Line(Enlightenment.Evas.Canvas c)
- {
- canvas = c; // canvas is inherited
-
- internal_item = new Enlightenment.Evas.Rectangle(canvas);
- internal_item.Color = new Enlightenment.Evas.Color(0, 0, 0, 0);
- internal_item.RepeatEvents = true;
-
- clip = new Enlightenment.Evas.Rectangle(canvas);
- clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 255);
-
- bg = new Edje(c);
- bg.FileSet("themes/e17/e17.edj","hline");
- bg.StackBelow(internal_item);
- bg.RepeatEvents = true;
- bg.Clip = clip;
- }
-
- /* set box to be horizontal and not vertical */
- public bool Vertical
- {
- get { return vertical; }
- set { vertical = value; }
- }
-
- public bool Horizontal
- {
- get { return horizontal; }
- set { horizontal = value; }
- }
-
- /* render the box - this will show objects, but not clip, so box is
effectively hidden */
- public virtual void Render()
- {
- rendered = true;
- if(vertical)
- RenderVertical();
- else
- RenderHorizontal();
- }
-
- /* the following functions override the default Evas.Item */
-
- /* Delete the entire box */
- public override void Delete()
- {
- }
-
- /* return the type */
- public override string Type
- {
- get { return "Line"; }
- }
-
- public override int Layer
- {
- get { return 0; }
- set { }
- }
-
- public override void Lower()
- {
- }
-
- public override void Raise()
- {
- }
-
- public override void StackAbove(Enlightenment.Evas.Item above)
- {
- }
-
- public override void StackBelow(Enlightenment.Evas.Item below)
- {
- }
-
- public override Enlightenment.Evas.Item Above
- {
- get { return new Enlightenment.Evas.Item(); }
- }
-
- public override Enlightenment.Evas.Item Below
- {
- get { return new Enlightenment.Evas.Item(); }
- }
-
- public override void Move(int _x, int _y)
- {
- x = _x;
- y = _y;
- clip.Move(x, y);
- bg.Move(x, y);
- internal_item.Move(x, y);
- if(rendered)
- Render();
- }
-
- public override Enlightenment.Evas.Geometry Geometry
- {
- get { return clip.Geometry; }
- }
-
- public override void Resize(int w, int h)
- {
- width = w;
- height = h;
- clip.Resize(width, height);
- bg.Resize(width, height);
- internal_item.Resize(width, height);
- if(rendered)
- Render();
- }
-
- public override void Show()
- {
- clip.Show();
- if(!rendered)
- Render();
- }
-
- public override void Hide()
- {
- clip.Hide();
- }
-
- public override bool Visible
- {
- get { return true; }
- set { }
- }
-
- public override Enlightenment.Evas.Color Color
- {
- get { return new Enlightenment.Evas.Color(); }
- set { }
- }
-
- public override Enlightenment.Evas.Item Clip
- {
- get { return new Enlightenment.Evas.Item(); }
- set { }
- }
-
-
- /* private methods */
- private void RenderVertical()
- {
-
- }
-
- private void RenderHorizontal()
- {
- internal_item.Clip = clip;
- internal_item.Show();
- bg.Clip = clip;
- bg.Show();
- }
-}
-
-
-public class Dialog
-{
- //private bool iterate;
- //private int response;
- private Enlightenment.Ecore.Canvas ee;
- private Enlightenment.Evas.Canvas canvas;
- private Edje win_bg;
- private string title;
- private Label question;
- private Label explanation;
- private Box top_box;
- private Box button_box;
- private Hashtable callbacks;
-
- public Dialog()
- {}
-
- public Dialog(string _title, string _question, string _explanation)
- {
- callbacks = new Hashtable();
-
- title = _title;
- ee = new Enlightenment.Ecore.Canvas();
- ee.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 300, 100);
- ee.Title = title;
- canvas = ee.Get();
-
- question = new Label(canvas, _question);
- question.FontColor = new Enlightenment.Evas.Color(0, 0, 0, 255);
- question.FontFace = "Vera";
- question.FontSize = 12;
-
- explanation = new Label(canvas, _explanation);
- explanation.FontColor = new Enlightenment.Evas.Color(0, 0, 0, 255);
- explanation.FontSize = 11;
-
- win_bg = new Edje(canvas);
- win_bg.FileSet("themes/e17/e17.edj","window");
- win_bg.Resize(300, 100);
- win_bg.Move(0, 0);
- win_bg.Lower();
- win_bg.Show();
-
- top_box = new Box(canvas);
- //top_box.Horizontal = true; //enable when w add icon
- top_box.Spacing = 10;
- top_box.Resize(300, 70);
- top_box.Move(10, 10);
- top_box.Add(question);
- top_box.Add(explanation); // make this a textblock
-
-
- button_box = new Box(canvas);
- button_box.Horizontal = true;
- button_box.Move(10,60);
- button_box.Resize(280, 25);
- button_box.HorizontalAlign = BoxHAlign.Center;
- }
-
- public delegate void DialogButtonClickHandler(Dialog d);
- public void AddButton(string text, DialogButtonClickHandler handler)
- {
- Button button = new Button(canvas, text);
- button.Resize(50, 30);
- button.MouseUpEvent += new
Enlightenment.Evas.Item.EventHandler(ClickHandler);
- callbacks[button.Raw] = handler;
- button_box.Add(button);
- }
-
- public void ClickHandler(Enlightenment.Evas.Item item, object EventInfo)
- {
- DialogButtonClickHandler handler =
(DialogButtonClickHandler)callbacks[item.Raw];
- handler(this);
- }
-
- public void Run()
- {
- ee.Show();
- top_box.Show();
- button_box.Show();
- //iterate = true;
- }
-
- public void Close()
- {
- ee.Window.Delete();
- ee.Hide();
- }
-
- ~Dialog()
- {}
-}
-
-/*
- * TODO:
- * grow button as more text is added into it
- */
-public class Button : Label
-{
- public Button() : base()
- {
- }
-
- public Button(Enlightenment.Evas.Canvas c) : base(c)
- {
- bg.FileSet("themes/e17/e17.edj","button");
- }
-
- public Button(Enlightenment.Evas.Canvas c, string txt) : base(c, txt)
- {
- bg.FileSet("themes/e17/e17.edj","button");
- bg.Clip = clip;
- bg.RepeatEvents = true;
- bg.StackBelow(text);
-
- text.Color = new Enlightenment.Evas.Color(0, 0, 0, 255);
- }
-
- public override void Render()
- {
- bg.Show();
- base.Render();
- }
-
-
- public override void Move(int x, int y)
- {
- base.Move(x, y);
- Enlightenment.Evas.Geometry bg_g = bg.Geometry;
- Enlightenment.Evas.Geometry t_g = text.Geometry;
- text.Move(bg_g.X + (bg_g.W - t_g.W)/2 , bg_g.Y + (bg_g.H - t_g.H)/2);
- }
-
- public override void Resize(int w, int h)
- {
- bg.Resize(w, h);
- base.Resize(w, h);
- Enlightenment.Evas.Geometry bg_g = bg.Geometry;
- Enlightenment.Evas.Geometry t_g = text.Geometry;
- text.Move(bg_g.X + (bg_g.W - t_g.W)/2 , bg_g.Y + (bg_g.H - t_g.H)/2);
- }
-}
-
-public class Label : Enlightenment.Evas.Item
-{
- private int width = 0;
- private int height = 0;
- private int x = 0;
- private int y = 0;
- private int spacer = 0;
- private string font_face = "Vera";
- private int font_size = 11;
- private bool vertical = false;
- private bool rendered = false;
-
- protected Enlightenment.Edje.Edje bg;
- public Enlightenment.Evas.Rectangle internal_item;
- protected Enlightenment.Evas.Rectangle clip;
- protected Enlightenment.Evas.Text text;
-
- public override IntPtr Raw
- {
- get { return internal_item.Raw; }
- }
-
-
- public Label()
- {}
-
- public Label(Enlightenment.Evas.Canvas c)
- {
- canvas = c; // canvas is inherited
- canvas.FontPathAppend("themes/e17/fonts"); // THIS IS HARDCODED!!!
REMOVE.
-
- internal_item = new Enlightenment.Evas.Rectangle(canvas);
- internal_item.RepeatEvents = true;
- internal_item.Color = new Enlightenment.Evas.Color(0, 0, 0, 0);
-
- clip = new Enlightenment.Evas.Rectangle(canvas);
- clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 255);
-
- text = new Enlightenment.Evas.Text(canvas);
- text.Font = new TextFont(font_face, font_size);
- text.Clip = clip;
- text.StackBelow(internal_item);
- text.RepeatEvents = true;
-
- bg = new Edje(c);
- }
-
- public Label(Enlightenment.Evas.Canvas c, string txt)
- {
- canvas = c; // canvas is inherited
- canvas.FontPathAppend("themes/e17/fonts"); // THIS IS HARDCODED!!!
REMOVE.
-
- internal_item = new Enlightenment.Evas.Rectangle(canvas);
- internal_item.Color = new Enlightenment.Evas.Color(0, 0, 0, 0);
- internal_item.RepeatEvents = true;
-
- clip = new Enlightenment.Evas.Rectangle(canvas);
- clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 255);
-
- text = new Enlightenment.Evas.Text(canvas);
- text.Font = new TextFont(font_face, font_size);
- text.Txt = txt;
- text.StackBelow(internal_item);
- text.RepeatEvents = true;
-
- Geometry g = text.Geometry;
- clip.Resize(g.W, g.H);
- text.Clip = clip;
-
- bg = new Edje(c);
- }
-
- /* Usage functions, those are specific to Label */
- public string FontFace
- {
- get { return font_face; }
- set {
- font_face = value;
- text.Font = new TextFont(value, font_size);
- Geometry g = text.Geometry;
- clip.Resize(g.W, g.H);
- }
- }
-
- public int FontSize
- {
- get { return font_size; }
- set {
- font_size = value;
- text.Font = new TextFont(font_face, value);
- Geometry g = text.Geometry;
- clip.Resize(g.W, g.H);
- }
- }
-
- public Enlightenment.Evas.Color FontColor
- {
- get { return text.Color; }
- set { text.Color = value; }
- }
-
- /* set spacing between items */
- public int Spacing
- {
- get { return spacer; }
- set { spacer = value; }
- }
-
- /* set box to be horizontal and not vertical */
- public bool Vertical
- {
- get { return vertical; }
- set { vertical = value; }
- }
-
- /* render the box - this will show objects, but not clip, so box is
effectively hidden */
- public virtual void Render()
- {
- rendered = true;
- if(vertical)
- RenderVertical();
- else
- RenderHorizontal();
- }
-
- /* the following functions override the default Evas.Item */
-
- /* Delete the entire box */
- public override void Delete()
- {
- }
-
- /* return the type */
- public override string Type
- {
- get { return "Label"; }
- }
-
- public override int Layer
- {
- get { return 0; }
- set { }
- }
-
- public override void Lower()
- {
- }
-
- public override void Raise()
- {
- }
-
- public override void StackAbove(Enlightenment.Evas.Item above)
- {
- }
-
- public override void StackBelow(Enlightenment.Evas.Item below)
- {
- }
-
- public override Enlightenment.Evas.Item Above
- {
- get { return new Enlightenment.Evas.Item(); }
- }
-
- public override Enlightenment.Evas.Item Below
- {
- get { return new Enlightenment.Evas.Item(); }
- }
-
- public override void Move(int _x, int _y)
- {
- x = _x;
- y = _y;
- clip.Move(x, y);
- bg.Move(x, y);
- text.Move(x, y);
- internal_item.Move(x, y);
- if(rendered)
- Render();
- }
-
- public override Enlightenment.Evas.Geometry Geometry
- {
- get { return clip.Geometry; }
- }
-
- public override void Resize(int w, int h)
- {
- width = w;
- height = h;
- clip.Resize(width, height);
- bg.Resize(width, height);
- internal_item.Resize(width, height);
- if(rendered)
- Render();
- }
-
- public override void Show()
- {
- clip.Show();
- if(!rendered)
- Render();
- }
-
- public override void Hide()
- {
- clip.Hide();
- }
-
- public override bool Visible
- {
- get { return true; }
- set { }
- }
-
- public override Enlightenment.Evas.Color Color
- {
- get { return new Enlightenment.Evas.Color(); }
- set { }
- }
-
- public override Enlightenment.Evas.Item Clip
- {
- get { return new Enlightenment.Evas.Item(); }
- set { }
- }
-
-
- /* private methods */
- private void RenderVertical()
- {
-
- }
-
- private void RenderHorizontal()
- {
- internal_item.Clip = clip;
- internal_item.Show();
- text.Clip = clip;
- text.Show();
- }
-}
-
-/* allows you to embed and scroll a box */
-public class ScrolledWindow
-{
-
- public ScrolledWindow()
- {}
-}
-
-public enum BoxHAlign
-{
- Left = 0,
- Center = 1,
- Right = 2
-}
-
-public enum BoxVAlign
-{
- Top = 0,
- Middle = 1,
- Bottom = 2
-}
-
-/*
- * TODO:
- * add fill policies
- * finish alignment
- * add PackStart / PackEnd functions
- */
-
-public class Box : Enlightenment.Evas.Item
-{
- private int width = 0;
- private int height = 0;
- private int x = 0;
- private int y = 0;
- private int spacer = 0;
- private bool rendered = false;
- private BoxVAlign valign = BoxVAlign.Top;
- private BoxHAlign halign = BoxHAlign.Left;
-
- private Enlightenment.Evas.Rectangle clip;
- private Enlightenment.Evas.Rectangle internal_item;
- //private Enlightenment.Edje.Edje border;
-
- private bool horizontal = false;
- private ArrayList items = new ArrayList();
-
- public override IntPtr Raw
- {
- get { return internal_item.Raw; }
- }
-
- public Box()
- {}
-
- public Box(Enlightenment.Evas.Canvas c)
- {
- canvas = c; // canvas is inherited
-
- internal_item = new Enlightenment.Evas.Rectangle(canvas);
- internal_item.Color = new Enlightenment.Evas.Color(255, 255, 255, 0);
-
- clip = new Enlightenment.Evas.Rectangle(canvas);
- clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 0);
- }
-
- /* Usage functions, those are specific to Box */
-
- public BoxVAlign VerticalAlign
- {
- get { return valign; }
- set { valign = value; }
- }
-
- public BoxHAlign HorizontalAlign
- {
- get { return halign; }
- set { halign = value; }
- }
-
- /* set spacing between items */
- public int Spacing
- {
- get { return spacer; }
- set { spacer = value; }
- }
-
- /* set box to be horizontal and not vertical */
- public bool Horizontal
- {
- get { return horizontal; }
- set { horizontal = value; }
- }
-
- /* add item to the box */
- public void Add(Enlightenment.Evas.Item item)
- {
- items.Add(item);
- }
-
- /* render the box - this will show objects, but not clip, so box is
effectively hidden */
- public void Render()
- {
- rendered = true;
- if(horizontal)
- RenderHorizontal();
- else
- RenderVertical();
- }
-
- /* the following functions override the default Evas.Item */
-
- /* Delete the entire box */
- public override void Delete()
- {
- }
-
- /* return the type */
- public override string Type
- {
- get { return "Box"; }
- }
-
- public override int Layer
- {
- get { return 0; }
- set { }
- }
-
- public override void Lower()
- {
- foreach(Enlightenment.Evas.Item item in items)
- item.Raise();
- }
-
- public override void Raise()
- {
- foreach(Enlightenment.Evas.Item item in items)
- item.Raise();
- }
-
- public override void StackAbove(Enlightenment.Evas.Item above)
- {
- foreach(Enlightenment.Evas.Item item in items)
- item.StackAbove(above);
- }
-
- public override void StackBelow(Enlightenment.Evas.Item below)
- {
- foreach(Enlightenment.Evas.Item item in items)
- item.StackBelow(below);
- }
-
- public override Enlightenment.Evas.Item Above
- {
- get { return new Enlightenment.Evas.Item(); }
- }
-
- public override Enlightenment.Evas.Item Below
- {
- get { return new Enlightenment.Evas.Item(); }
- }
-
- public override void Move(int _x, int _y)
- {
- x = _x;
- y = _y;
- clip.Move(x, y);
- if(rendered)
- Render();
- }
-
- public override Enlightenment.Evas.Geometry Geometry
- {
- get { return new Enlightenment.Evas.Geometry(x, y, width, height); }
- }
-
- public override void Resize(int w, int h)
- {
- width = w;
- height = h;
- clip.Resize(width, height);
- if(rendered)
- Render();
- }
-
- public override void Show()
- {
- clip.Show();
- if(!rendered)
- Render();
- }
-
- public override void Hide()
- {
- clip.Hide();
- }
-
- public override bool Visible
- {
- get { return true; }
- set { }
- }
-
- public override Enlightenment.Evas.Color Color
- {
- get { return new Enlightenment.Evas.Color(); }
- set { }
- }
-
- public override Enlightenment.Evas.Item Clip
- {
- get { return new Enlightenment.Evas.Item(); }
- set { }
- }
-
-
- /* private methods */
- private void RenderVertical()
- {
- Geometry g = new Geometry();
- g.X = x;
- g.Y = y;
-
- foreach(Enlightenment.Evas.Item item in items)
- {
- item.Move(g.X, g.Y);
- item.Clip = clip;
- item.Show();
- g = item.Geometry;
- g.Y += g.H + spacer;
- }
- }
-
- private void RenderHorizontal()
- {
- Geometry g = new Geometry();
-
- if(halign == BoxHAlign.Left)
- {
-
- g.X = x;
- g.Y = y;
- foreach(Enlightenment.Evas.Item item in items)
- {
- item.Move(g.X, g.Y);
- item.Clip = clip;
- item.Show();
- g = item.Geometry;
- g.X += g.W + spacer;
- }
- return;
- }
-
- if(halign == BoxHAlign.Right)
- {
- g.X = x + width;
- g.Y = y;
- for(int i = items.Count - 1; i >= 0; i--)
- {
- Enlightenment.Evas.Item item =
(Enlightenment.Evas.Item)items[i];
-
- item.Move(g.X - item.Geometry.W, g.Y);
- item.Clip = clip;
- item.Show();
- g = item.Geometry;
- g.X -= - spacer;
- }
- return;
- }
-
- if(halign == BoxHAlign.Center)
- {
- int items_width = 0;
-
- foreach(Enlightenment.Evas.Item item in items)
- {
- items_width += item.Geometry.W;
- }
-
-
- g.X = x + (width - items_width)/2;
- g.Y = y;
-
- foreach(Enlightenment.Evas.Item item in items)
- {
- item.Move(g.X, g.Y);
- item.Clip = clip;
- item.Show();
- g = item.Geometry;
- g.X += g.W + spacer;
- }
- }
- }
-}
-
-
-
-
public class ContainerImage : Enlightenment.Evas.ContainerItem
{
public new Enlightenment.Evas.Image i;
@@ -1046,7 +177,7 @@
Edje win_bg = (Edje)EE.DataGet("win_bg");
win_bg.Resize(w, h);
- Line line = (Line)EE.DataGet("line");
+ Enlightenment.Eblocks.Line line =
(Enlightenment.Eblocks.Line)EE.DataGet("line");
line.Resize(w, line.Geometry.H);
cont.Resize(w- 60 - 2, h - 37 - 2);
@@ -1097,9 +228,9 @@
button.MouseUpEvent += new
Enlightenment.Evas.Item.EventHandler(AppAboutButtonHandler);
box_menu.Add(button);
- Line line;
+ Enlightenment.Eblocks.Line line;
- line = new Line(EE.Get());
+ line = new Enlightenment.Eblocks.Line(EE.Get());
line.Horizontal = true;
line.Resize(640, 6);
box_top.Add(line);
Modified: trunk/efl-sharp/libs/efl-sharp/configure.in
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/configure.in 2005-06-14 12:20:57 UTC (rev
45960)
+++ trunk/efl-sharp/libs/efl-sharp/configure.in 2005-06-14 12:44:52 UTC (rev
45961)
@@ -108,4 +108,10 @@
src/lib/glue/Makefile
src/lib/AssemblyInfo.cs
data/Makefile
+data/eblocks/Makefile
+data/eblocks/themes/Makefile
+data/fonts/Makefile
+data/test/Makefile
+data/test/images/Makefile
+data/test/src/Makefile
])
Modified: trunk/efl-sharp/libs/efl-sharp/data/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/Makefile.am 2005-06-14 12:20:57 UTC
(rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/Makefile.am 2005-06-14 12:44:52 UTC
(rev 45961)
@@ -1,13 +1,19 @@
MAINTAINERCLEANFILES = Makefile.in
-FILES = flower.edj images/e.png fonts/Vera.ttf
-testdir = $(pkgdatadir)/data
-test_DATA = $(FILES)
+SUBDIRS = test \
+fonts \
+eblocks
-$(FILES):
- ./eflsharp_test.sh
-EXTRA_DIST = $(FILES)
+# FILES = flower.edj images/e.png fonts/Vera.ttf
-CLEANFILES = flower.edj
+# testdir = $(pkgdatadir)/data
+# test_DATA = $(FILES)
+
+# $(FILES):
+# ./eflsharp_test.sh
+
+#EXTRA_DIST = $(FILES)
+
+#CLEANFILES = flower.edj
Added: trunk/efl-sharp/libs/efl-sharp/data/eblocks/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/eblocks/Makefile.am 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/eblocks/Makefile.am 2005-06-14
12:44:52 UTC (rev 45961)
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = themes
Added: trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/Makefile.am
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/Makefile.am
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+filesdir = $(pkgdatadir)/data/eblocks/themes
+files_DATA = e17.edj
Added: trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/e17.edj
===================================================================
(Binary files differ)
Property changes on: trunk/efl-sharp/libs/efl-sharp/data/eblocks/themes/e17.edj
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/efl-sharp/libs/efl-sharp/data/eflsharp_test.sh
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/eflsharp_test.sh 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/eflsharp_test.sh 2005-06-14
12:44:52 UTC (rev 45961)
@@ -1,2 +0,0 @@
-#!/bin/sh
-edje_cc $@ --image_dir ./images --font_dir ./fonts src/flower.edc -o flower.edj
Added: trunk/efl-sharp/libs/efl-sharp/data/fonts/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/fonts/Makefile.am 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/fonts/Makefile.am 2005-06-14
12:44:52 UTC (rev 45961)
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+filesdir = $(pkgdatadir)/data/fonts
+files_DATA = Vera.ttf
Added: trunk/efl-sharp/libs/efl-sharp/data/test/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/test/Makefile.am 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/test/Makefile.am 2005-06-14
12:44:52 UTC (rev 45961)
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = images \
+src
Added: trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/test/images/Makefile.am 2005-06-14
12:44:52 UTC (rev 45961)
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+filesdir = $(pkgdatadir)/data/test/images
+files_DATA = e.png
Added: trunk/efl-sharp/libs/efl-sharp/data/test/images/e.png
===================================================================
(Binary files differ)
Property changes on: trunk/efl-sharp/libs/efl-sharp/data/test/images/e.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/efl-sharp/libs/efl-sharp/data/test/images/flower.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/efl-sharp/libs/efl-sharp/data/test/images/flower.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/efl-sharp/libs/efl-sharp/data/test/src/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/test/src/Makefile.am 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/test/src/Makefile.am 2005-06-14
12:44:52 UTC (rev 45961)
@@ -0,0 +1,22 @@
+AINTAINERCLEANFILES = Makefile.in
+
+NAME = flower
+
+EDJE_CC = edje_cc
+EDJE_FLAGS = \
+-v \
+-id $(top_srcdir)/data/test/images \
+-fd $(top_srcdir)/data/fonts
+
+filesdir = $(pkgdatadir)/data/test/
+files_DATA = $(NAME).edj
+
+$(NAME).edj: Makefile $(NAME).edc
+ $(EDJE_CC) $(EDJE_FLAGS) \
+ $(top_srcdir)/data/test/src/$(NAME).edc \
+ $(top_builddir)/data/test/src/$(NAME).edj
+
+clean-local:
+ rm -f *.edj
+
+
Added: trunk/efl-sharp/libs/efl-sharp/data/test/src/flower.edc
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/data/test/src/flower.edc 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/data/test/src/flower.edc 2005-06-14
12:44:52 UTC (rev 45961)
@@ -0,0 +1,37 @@
+fonts {
+}
+images {
+ image: "flower.jpg" COMP;
+}
+data {
+}
+collections {
+ group {
+ name: "desktop/background";
+ parts {
+ part {
+ name: "background_image";
+ type: IMAGE;
+ mouse_events: 1;
+ description {
+ state: "default" 0.00;
+ visible: 1;
+ max: 2048 1536;
+ rel1 {
+ relative: 0.00 0.00;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 1.00 1.00;
+ offset: -1 -1;
+ }
+ image {
+ normal: "flower.jpg";
+ }
+ }
+ }
+ }
+ programs {
+ }
+ }
+}
Modified: trunk/efl-sharp/libs/efl-sharp/src/bin/efl_sharp_test.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/bin/efl_sharp_test.cs 2005-06-14
12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/bin/efl_sharp_test.cs 2005-06-14
12:44:52 UTC (rev 45961)
@@ -190,7 +190,7 @@
Enlightenment.Ecore.Events.SelectionNotifyEvent += new
Enlightenment.Ecore.Events.EventHandler(AppSelectionNotifyHandler);
Edje edje = new Edje(EE.Get());
- if(edje.FileSet(DataConfig.DATADIR +
"/data/flower.edj","desktop/background") == 0)
+ if(edje.FileSet(DataConfig.DATADIR +
"/data/test/flower.edj","desktop/background") == 0)
System.Console.WriteLine("Can't load edje object!");
edje.Focus = 1;
edje.MouseDownEvent += new
Enlightenment.Evas.Item.EventHandler(EdjeMouseDownEventCallback);
@@ -202,7 +202,7 @@
edje.Show();
Image image = new Image(EE.Get());
- image.Set(DataConfig.DATADIR + "/data/e.png", null);
+ image.Set(DataConfig.DATADIR + "/data/test/images/e.png", null);
image.Move(0, 0);
image.Resize(320, 320);
image.Fill = new ImageFill (0, 0, 320, 320);
Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am 2005-06-14 12:20:57 UTC
(rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am 2005-06-14 12:44:52 UTC
(rev 45961)
@@ -41,9 +41,16 @@
ewl/ewl_text.cs \
ewl/ewl_widget.cs \
ewl/ewl_window.cs \
-epsilon/epsilon.cs
+epsilon/epsilon.cs \
+eblocks/eblocks_box.cs \
+eblocks/eblocks_button.cs \
+eblocks/eblocks_dialog.cs \
+eblocks/eblocks_label.cs \
+eblocks/eblocks_line.cs \
+eblocks/eblocks_scrolledwindow.cs
+
EXTRA_DIST = $(FILES)
all: $(ASSEMBLY)
Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,298 @@
+namespace Enlightenment.Eblocks
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.IO;
+ using System.Collections;
+ using Enlightenment.Evas;
+ using Enlightenment.Ecore;
+ using Enlightenment.Edje;
+
+ public enum BoxHAlign
+ {
+ Left = 0,
+ Center = 1,
+ Right = 2
+ }
+
+ public enum BoxVAlign
+ {
+ Top = 0,
+ Middle = 1,
+ Bottom = 2
+ }
+
+ /*
+ * TODO:
+ * add fill policies
+ * finish alignment
+ * add PackStart / PackEnd functions
+ */
+
+ public class Box : Enlightenment.Evas.Item
+ {
+ private int width = 0;
+ private int height = 0;
+ private int x = 0;
+ private int y = 0;
+ private int spacer = 0;
+ private bool rendered = false;
+ private BoxVAlign valign = BoxVAlign.Top;
+ private BoxHAlign halign = BoxHAlign.Left;
+
+ private Enlightenment.Evas.Rectangle clip;
+ private Enlightenment.Evas.Rectangle internal_item;
+ //private Enlightenment.Edje.Edje border;
+
+ private bool horizontal = false;
+ private ArrayList items = new ArrayList();
+
+ public override IntPtr Raw
+ {
+ get { return internal_item.Raw; }
+ }
+
+ public Box()
+ {}
+
+ public Box(Enlightenment.Evas.Canvas c)
+ {
+ canvas = c; // canvas is inherited
+
+ internal_item = new Enlightenment.Evas.Rectangle(canvas);
+ internal_item.Color = new Enlightenment.Evas.Color(255, 255, 255,
0);
+
+ clip = new Enlightenment.Evas.Rectangle(canvas);
+ clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 0);
+ }
+
+ /* Usage functions, those are specific to Box */
+
+ public BoxVAlign VerticalAlign
+ {
+ get { return valign; }
+ set { valign = value; }
+ }
+
+ public BoxHAlign HorizontalAlign
+ {
+ get { return halign; }
+ set { halign = value; }
+ }
+
+ /* set spacing between items */
+ public int Spacing
+ {
+ get { return spacer; }
+ set { spacer = value; }
+ }
+
+ /* set box to be horizontal and not vertical */
+ public bool Horizontal
+ {
+ get { return horizontal; }
+ set { horizontal = value; }
+ }
+
+ /* add item to the box */
+ public void Add(Enlightenment.Evas.Item item)
+ {
+ items.Add(item);
+ }
+
+ /* render the box - this will show objects, but not clip, so box is
effectively hidden */
+ public void Render()
+ {
+ rendered = true;
+ if(horizontal)
+ RenderHorizontal();
+ else
+ RenderVertical();
+ }
+
+ /* the following functions override the default Evas.Item */
+
+ /* Delete the entire box */
+ public override void Delete()
+ {
+ }
+
+ /* return the type */
+ public override string Type
+ {
+ get { return "Box"; }
+ }
+
+ public override int Layer
+ {
+ get { return 0; }
+ set { }
+ }
+
+ public override void Lower()
+ {
+ foreach(Enlightenment.Evas.Item item in items)
+ item.Raise();
+ }
+
+ public override void Raise()
+ {
+ foreach(Enlightenment.Evas.Item item in items)
+ item.Raise();
+ }
+
+ public override void StackAbove(Enlightenment.Evas.Item above)
+ {
+ foreach(Enlightenment.Evas.Item item in items)
+ item.StackAbove(above);
+ }
+
+ public override void StackBelow(Enlightenment.Evas.Item below)
+ {
+ foreach(Enlightenment.Evas.Item item in items)
+ item.StackBelow(below);
+ }
+
+ public override Enlightenment.Evas.Item Above
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ }
+
+ public override Enlightenment.Evas.Item Below
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ }
+
+ public override void Move(int _x, int _y)
+ {
+ x = _x;
+ y = _y;
+ clip.Move(x, y);
+ if(rendered)
+ Render();
+ }
+
+ public override Enlightenment.Evas.Geometry Geometry
+ {
+ get { return new Enlightenment.Evas.Geometry(x, y, width, height);
}
+ }
+
+ public override void Resize(int w, int h)
+ {
+ width = w;
+ height = h;
+ clip.Resize(width, height);
+ if(rendered)
+ Render();
+ }
+
+ public override void Show()
+ {
+ clip.Show();
+ if(!rendered)
+ Render();
+ }
+
+ public override void Hide()
+ {
+ clip.Hide();
+ }
+
+ public override bool Visible
+ {
+ get { return true; }
+ set { }
+ }
+
+ public override Enlightenment.Evas.Color Color
+ {
+ get { return new Enlightenment.Evas.Color(); }
+ set { }
+ }
+
+ public override Enlightenment.Evas.Item Clip
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ set { }
+ }
+
+
+ /* private methods */
+ private void RenderVertical()
+ {
+ Geometry g = new Geometry();
+ g.X = x;
+ g.Y = y;
+
+ foreach(Enlightenment.Evas.Item item in items)
+ {
+ item.Move(g.X, g.Y);
+ item.Clip = clip;
+ item.Show();
+ g = item.Geometry;
+ g.Y += g.H + spacer;
+ }
+ }
+
+ private void RenderHorizontal()
+ {
+ Geometry g = new Geometry();
+
+ if(halign == BoxHAlign.Left)
+ {
+
+ g.X = x;
+ g.Y = y;
+ foreach(Enlightenment.Evas.Item item in items)
+ {
+ item.Move(g.X, g.Y);
+ item.Clip = clip;
+ item.Show();
+ g = item.Geometry;
+ g.X += g.W + spacer;
+ }
+ return;
+ }
+
+ if(halign == BoxHAlign.Right)
+ {
+ g.X = x + width;
+ g.Y = y;
+ for(int i = items.Count - 1; i >= 0; i--)
+ {
+ Enlightenment.Evas.Item item =
(Enlightenment.Evas.Item)items[i];
+
+ item.Move(g.X - item.Geometry.W, g.Y);
+ item.Clip = clip;
+ item.Show();
+ g = item.Geometry;
+ g.X -= - spacer;
+ }
+ return;
+ }
+
+ if(halign == BoxHAlign.Center)
+ {
+ int items_width = 0;
+
+ foreach(Enlightenment.Evas.Item item in items)
+ {
+ items_width += item.Geometry.W;
+ }
+
+
+ g.X = x + (width - items_width)/2;
+ g.Y = y;
+
+ foreach(Enlightenment.Evas.Item item in items)
+ {
+ item.Move(g.X, g.Y);
+ item.Clip = clip;
+ item.Show();
+ g = item.Geometry;
+ g.X += g.W + spacer;
+ }
+ }
+ }
+ }
+}
Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,60 @@
+namespace Enlightenment.Eblocks
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.IO;
+ using System.Collections;
+ using Enlightenment.Evas;
+ using Enlightenment.Ecore;
+ using Enlightenment.Edje;
+
+ /*
+ * TODO:
+ * grow button as more text is added into it
+ */
+ public class Button : Label
+ {
+ public Button() : base()
+ {
+ }
+
+ public Button(Enlightenment.Evas.Canvas c) : base(c)
+ {
+ bg.FileSet(DataConfig.DATADIR + "/themes/e17/e17.edj","button");
+ }
+
+ public Button(Enlightenment.Evas.Canvas c, string txt) : base(c, txt)
+ {
+ bg.FileSet(DataConfig.DATADIR + "/themes/e17/e17.edj","button");
+ bg.Clip = clip;
+ bg.RepeatEvents = true;
+ bg.StackBelow(text);
+
+ text.Color = new Enlightenment.Evas.Color(0, 0, 0, 255);
+ }
+
+ public override void Render()
+ {
+ bg.Show();
+ base.Render();
+ }
+
+
+ public override void Move(int x, int y)
+ {
+ base.Move(x, y);
+ Enlightenment.Evas.Geometry bg_g = bg.Geometry;
+ Enlightenment.Evas.Geometry t_g = text.Geometry;
+ text.Move(bg_g.X + (bg_g.W - t_g.W)/2 , bg_g.Y + (bg_g.H -
t_g.H)/2);
+ }
+
+ public override void Resize(int w, int h)
+ {
+ bg.Resize(w, h);
+ base.Resize(w, h);
+ Enlightenment.Evas.Geometry bg_g = bg.Geometry;
+ Enlightenment.Evas.Geometry t_g = text.Geometry;
+ text.Move(bg_g.X + (bg_g.W - t_g.W)/2 , bg_g.Y + (bg_g.H -
t_g.H)/2);
+ }
+ }
+}
Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_dialog.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_dialog.cs
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_dialog.cs
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,103 @@
+namespace Enlightenment.Eblocks
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.IO;
+ using System.Collections;
+ using Enlightenment.Evas;
+ using Enlightenment.Ecore;
+ using Enlightenment.Edje;
+
+ public class Dialog
+ {
+ //private bool iterate;
+ //private int response;
+ private Enlightenment.Ecore.Canvas ee;
+ private Enlightenment.Evas.Canvas canvas;
+ private Edje win_bg;
+ private string title;
+ private Label question;
+ private Label explanation;
+ private Box top_box;
+ private Box button_box;
+ private Hashtable callbacks;
+
+ public Dialog()
+ {}
+
+ public Dialog(string _title, string _question, string _explanation)
+ {
+ callbacks = new Hashtable();
+
+ title = _title;
+ ee = new Enlightenment.Ecore.Canvas();
+ ee.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 300, 100);
+ ee.Title = title;
+ canvas = ee.Get();
+
+ question = new Label(canvas, _question);
+ question.FontColor = new Enlightenment.Evas.Color(0, 0, 0, 255);
+ question.FontFace = "Vera";
+ question.FontSize = 12;
+
+ explanation = new Label(canvas, _explanation);
+ explanation.FontColor = new Enlightenment.Evas.Color(0, 0, 0, 255);
+ explanation.FontSize = 11;
+
+ win_bg = new Edje(canvas);
+ win_bg.FileSet(DataConfig.DATADIR +
"/themes/e17/e17.edj","window");
+ win_bg.Resize(300, 100);
+ win_bg.Move(0, 0);
+ win_bg.Lower();
+ win_bg.Show();
+
+ top_box = new Box(canvas);
+ //top_box.Horizontal = true; //enable when w add icon
+ top_box.Spacing = 10;
+ top_box.Resize(300, 70);
+ top_box.Move(10, 10);
+ top_box.Add(question);
+ top_box.Add(explanation); // make this a textblock
+
+
+ button_box = new Box(canvas);
+ button_box.Horizontal = true;
+ button_box.Move(10,60);
+ button_box.Resize(280, 25);
+ button_box.HorizontalAlign = BoxHAlign.Center;
+ }
+
+ public delegate void DialogButtonClickHandler(Dialog d);
+ public void AddButton(string text, DialogButtonClickHandler handler)
+ {
+ Button button = new Button(canvas, text);
+ button.Resize(50, 30);
+ button.MouseUpEvent += new
Enlightenment.Evas.Item.EventHandler(ClickHandler);
+ callbacks[button.Raw] = handler;
+ button_box.Add(button);
+ }
+
+ public void ClickHandler(Enlightenment.Evas.Item item, object EventInfo)
+ {
+ DialogButtonClickHandler handler =
(DialogButtonClickHandler)callbacks[item.Raw];
+ handler(this);
+ }
+
+ public void Run()
+ {
+ ee.Show();
+ top_box.Show();
+ button_box.Show();
+ //iterate = true;
+ }
+
+ public void Close()
+ {
+ ee.Window.Delete();
+ ee.Hide();
+ }
+
+ ~Dialog()
+ {}
+ }
+}
Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_label.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_label.cs
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_label.cs
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,254 @@
+namespace Enlightenment.Eblocks
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.IO;
+ using System.Collections;
+ using Enlightenment.Evas;
+ using Enlightenment.Ecore;
+ using Enlightenment.Edje;
+
+ public class Label : Enlightenment.Evas.Item
+ {
+ private int width = 0;
+ private int height = 0;
+ private int x = 0;
+ private int y = 0;
+ private int spacer = 0;
+ private string font_face = "Vera";
+ private int font_size = 11;
+ private bool vertical = false;
+ private bool rendered = false;
+
+ protected Enlightenment.Edje.Edje bg;
+ public Enlightenment.Evas.Rectangle internal_item;
+ protected Enlightenment.Evas.Rectangle clip;
+ protected Enlightenment.Evas.Text text;
+
+ public override IntPtr Raw
+ {
+ get { return internal_item.Raw; }
+ }
+
+
+ public Label()
+ {}
+
+ public Label(Enlightenment.Evas.Canvas c)
+ {
+ canvas = c; // canvas is inherited
+ canvas.FontPathAppend(DataConfig.DATADIR +"/themes/e17/fonts"); //
Make this follow theme
+
+ internal_item = new Enlightenment.Evas.Rectangle(canvas);
+ internal_item.RepeatEvents = true;
+ internal_item.Color = new Enlightenment.Evas.Color(0, 0, 0, 0);
+
+ clip = new Enlightenment.Evas.Rectangle(canvas);
+ clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 255);
+
+ text = new Enlightenment.Evas.Text(canvas);
+ text.Font = new TextFont(font_face, font_size);
+ text.Clip = clip;
+ text.StackBelow(internal_item);
+ text.RepeatEvents = true;
+
+ bg = new Edje(c);
+ }
+
+ public Label(Enlightenment.Evas.Canvas c, string txt)
+ {
+ canvas = c; // canvas is inherited
+ canvas.FontPathAppend(DataConfig.DATADIR + "/themes/e17/fonts");
// Make this follow theme
+
+ internal_item = new Enlightenment.Evas.Rectangle(canvas);
+ internal_item.Color = new Enlightenment.Evas.Color(0, 0, 0, 0);
+ internal_item.RepeatEvents = true;
+
+ clip = new Enlightenment.Evas.Rectangle(canvas);
+ clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 255);
+
+ text = new Enlightenment.Evas.Text(canvas);
+ text.Font = new TextFont(font_face, font_size);
+ text.Txt = txt;
+ text.StackBelow(internal_item);
+ text.RepeatEvents = true;
+
+ Geometry g = text.Geometry;
+ clip.Resize(g.W, g.H);
+ text.Clip = clip;
+
+ bg = new Edje(c);
+ }
+
+ /* Usage functions, those are specific to Label */
+ public string FontFace
+ {
+ get { return font_face; }
+ set {
+ font_face = value;
+ text.Font = new TextFont(value, font_size);
+ Geometry g = text.Geometry;
+ clip.Resize(g.W, g.H);
+ }
+ }
+
+ public int FontSize
+ {
+ get { return font_size; }
+ set {
+ font_size = value;
+ text.Font = new TextFont(font_face, value);
+ Geometry g = text.Geometry;
+ clip.Resize(g.W, g.H);
+ }
+ }
+
+ public Enlightenment.Evas.Color FontColor
+ {
+ get { return text.Color; }
+ set { text.Color = value; }
+ }
+
+ /* set spacing between items */
+ public int Spacing
+ {
+ get { return spacer; }
+ set { spacer = value; }
+ }
+
+ /* set box to be horizontal and not vertical */
+ public bool Vertical
+ {
+ get { return vertical; }
+ set { vertical = value; }
+ }
+
+ /* render the box - this will show objects, but not clip, so box is
effectively hidden */
+ public virtual void Render()
+ {
+ rendered = true;
+ if(vertical)
+ RenderVertical();
+ else
+ RenderHorizontal();
+ }
+
+ /* the following functions override the default Evas.Item */
+
+ /* Delete the entire box */
+ public override void Delete()
+ {
+ }
+
+ /* return the type */
+ public override string Type
+ {
+ get { return "Label"; }
+ }
+
+ public override int Layer
+ {
+ get { return 0; }
+ set { }
+ }
+
+ public override void Lower()
+ {
+ }
+
+ public override void Raise()
+ {
+ }
+
+ public override void StackAbove(Enlightenment.Evas.Item above)
+ {
+ }
+
+ public override void StackBelow(Enlightenment.Evas.Item below)
+ {
+ }
+
+ public override Enlightenment.Evas.Item Above
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ }
+
+ public override Enlightenment.Evas.Item Below
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ }
+
+ public override void Move(int _x, int _y)
+ {
+ x = _x;
+ y = _y;
+ clip.Move(x, y);
+ bg.Move(x, y);
+ text.Move(x, y);
+ internal_item.Move(x, y);
+ if(rendered)
+ Render();
+ }
+
+ public override Enlightenment.Evas.Geometry Geometry
+ {
+ get { return clip.Geometry; }
+ }
+
+ public override void Resize(int w, int h)
+ {
+ width = w;
+ height = h;
+ clip.Resize(width, height);
+ bg.Resize(width, height);
+ internal_item.Resize(width, height);
+ if(rendered)
+ Render();
+ }
+
+ public override void Show()
+ {
+ clip.Show();
+ if(!rendered)
+ Render();
+ }
+
+ public override void Hide()
+ {
+ clip.Hide();
+ }
+
+ public override bool Visible
+ {
+ get { return true; }
+ set { }
+ }
+
+ public override Enlightenment.Evas.Color Color
+ {
+ get { return new Enlightenment.Evas.Color(); }
+ set { }
+ }
+
+ public override Enlightenment.Evas.Item Clip
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ set { }
+ }
+
+
+ /* private methods */
+ private void RenderVertical()
+ {
+
+ }
+
+ private void RenderHorizontal()
+ {
+ internal_item.Clip = clip;
+ internal_item.Show();
+ text.Clip = clip;
+ text.Show();
+ }
+ }
+}
Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_line.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_line.cs
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_line.cs
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,192 @@
+namespace Enlightenment.Eblocks
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.IO;
+ using System.Collections;
+ using Enlightenment.Evas;
+ using Enlightenment.Ecore;
+ using Enlightenment.Edje;
+
+ public class Line : Enlightenment.Evas.Item
+ {
+ private int width = 6;
+ private int height = 6;
+ private int x = 0;
+ private int y = 0;
+ private bool vertical = false;
+ private bool horizontal = true;
+ private bool rendered = false;
+
+ protected Enlightenment.Edje.Edje bg;
+ public Enlightenment.Evas.Rectangle internal_item;
+ protected Enlightenment.Evas.Rectangle clip;
+
+ public override IntPtr Raw
+ {
+ get { return internal_item.Raw; }
+ }
+
+
+ public Line()
+ {}
+
+ public Line(Enlightenment.Evas.Canvas c)
+ {
+ canvas = c;
+
+ internal_item = new Enlightenment.Evas.Rectangle(canvas);
+ internal_item.Color = new Enlightenment.Evas.Color(0, 0, 0, 0);
+ internal_item.RepeatEvents = true;
+
+ clip = new Enlightenment.Evas.Rectangle(canvas);
+ clip.Color = new Enlightenment.Evas.Color(255, 255, 255, 255);
+
+ bg = new Edje(c);
+ bg.FileSet(DataConfig.DATADIR + "/themes/e17/e17.edj","hline");
+ bg.StackBelow(internal_item);
+ bg.RepeatEvents = true;
+ bg.Clip = clip;
+ }
+
+ /* set box to be horizontal and not vertical */
+ public bool Vertical
+ {
+ get { return vertical; }
+ set { vertical = value; }
+ }
+
+ public bool Horizontal
+ {
+ get { return horizontal; }
+ set { horizontal = value; }
+ }
+
+ /* render the box - this will show objects, but not clip, so box is
effectively hidden */
+ public virtual void Render()
+ {
+ rendered = true;
+ if(vertical)
+ RenderVertical();
+ else
+ RenderHorizontal();
+ }
+
+ /* the following functions override the default Evas.Item */
+
+ /* Delete the entire box */
+ public override void Delete()
+ {
+ }
+
+ /* return the type */
+ public override string Type
+ {
+ get { return "Line"; }
+ }
+
+ public override int Layer
+ {
+ get { return 0; }
+ set { }
+ }
+
+ public override void Lower()
+ {
+ }
+
+ public override void Raise()
+ {
+ }
+
+ public override void StackAbove(Enlightenment.Evas.Item above)
+ {
+ }
+
+ public override void StackBelow(Enlightenment.Evas.Item below)
+ {
+ }
+
+ public override Enlightenment.Evas.Item Above
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ }
+
+ public override Enlightenment.Evas.Item Below
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ }
+
+ public override void Move(int _x, int _y)
+ {
+ x = _x;
+ y = _y;
+ clip.Move(x, y);
+ bg.Move(x, y);
+ internal_item.Move(x, y);
+ if(rendered)
+ Render();
+ }
+
+ public override Enlightenment.Evas.Geometry Geometry
+ {
+ get { return clip.Geometry; }
+ }
+
+ public override void Resize(int w, int h)
+ {
+ width = w;
+ height = h;
+ clip.Resize(width, height);
+ bg.Resize(width, height);
+ internal_item.Resize(width, height);
+ if(rendered)
+ Render();
+ }
+
+ public override void Show()
+ {
+ clip.Show();
+ if(!rendered)
+ Render();
+ }
+
+ public override void Hide()
+ {
+ clip.Hide();
+ }
+
+ public override bool Visible
+ {
+ get { return true; }
+ set { }
+ }
+
+ public override Enlightenment.Evas.Color Color
+ {
+ get { return new Enlightenment.Evas.Color(); }
+ set { }
+ }
+
+ public override Enlightenment.Evas.Item Clip
+ {
+ get { return new Enlightenment.Evas.Item(); }
+ set { }
+ }
+
+
+ /* private methods */
+ private void RenderVertical()
+ {
+
+ }
+
+ private void RenderHorizontal()
+ {
+ internal_item.Clip = clip;
+ internal_item.Show();
+ bg.Clip = clip;
+ bg.Show();
+ }
+ }
+}
Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_scrolledwindow.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_scrolledwindow.cs
2005-06-14 12:20:57 UTC (rev 45960)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_scrolledwindow.cs
2005-06-14 12:44:52 UTC (rev 45961)
@@ -0,0 +1,18 @@
+namespace Enlightenment.Eblocks
+{
+ using System;
+ using System.Runtime.InteropServices;
+ using System.IO;
+ using System.Collections;
+ using Enlightenment.Evas;
+ using Enlightenment.Ecore;
+ using Enlightenment.Edje;
+
+ /* allows you to embed and scroll a box */
+ public class ScrolledWindow
+ {
+
+ public ScrolledWindow()
+ {}
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches