Author: hisham
Date: 2005-06-26 19:17:56 -0400 (Sun, 26 Jun 2005)
New Revision: 46526

Added:
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_application.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_bin.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_container.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_window.cs
Modified:
   trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am
   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_menu.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menubar.cs
   trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menuitem.cs
Log:
more framkework classes, more work on gtk# compatibility, added invisible 
borders for padding to boxes, fixes to menu

Modified: trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs
===================================================================
--- trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs     2005-06-26 
22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs     2005-06-26 
23:17:56 UTC (rev 46526)
@@ -96,7 +96,6 @@
 public class EcoreEvasTest
 {
    
-  private static Enlightenment.Ecore.Canvas EE = new 
Enlightenment.Ecore.Canvas();
   private static Table imageTable;
   private static ArrayList items = new ArrayList();
   private static string dir;
@@ -156,7 +155,7 @@
     imageTable.HorizSpacer = 10;
     imageTable.VertSpacer = 10;
     imageTable.Resize(640 - 70 - 2, 480 - 37 - 2);
-    Box box_images = (Box)EE.DataGet("box_images");
+    Box box_images = (Box)Application.EE.DataGet("box_images");
     box_images.Show(); 
     System.GC.KeepAlive(imageTable);
   }   
@@ -165,60 +164,54 @@
   {
     int w, h;
     Box box;
-    w = EE.Geometry.W;
-    h = EE.Geometry.H; 
+    w = Application.EE.Geometry.W;
+    h = Application.EE.Geometry.H;     
        
-    box = (Box)EE.DataGet("box_icons");
+    box = (Box)Application.EE.DataGet("box_icons");
     box.Resize(box.Geometry.W, h - 37);
        
-    box = (Box)EE.DataGet("box_left");
+    box = (Box)Application.EE.DataGet("box_left");
     box.Resize(box.Geometry.W, h - 37);        
        
-    box = (Box)EE.DataGet("box_images");
+    box = (Box)Application.EE.DataGet("box_images");
     box.Resize(w - 70 - 2, h - 37 - 2);        
        
-    Edje win_bg = (Edje)EE.DataGet("win_bg");
+    Edje win_bg = (Edje)Application.EE.DataGet("win_bg");
     win_bg.Resize(w, h);
                        
     imageTable.Resize(w- 60 - 2, h - 37 - 2);
 
-    MenuBar mb = (MenuBar)EE.DataGet("mb");
+    MenuBar mb = (MenuBar)Application.EE.DataGet("mb");
     mb.Resize(w, mb.Geometry.H);
   }
-   
-   
-   
+        
   public static void Main(string [] args)
   {    
-    MainLoop.Init();
-    Enlightenment.Ecore.Canvas.Init();
-    Edje.Init();
-       
-    EE.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 640, 480);
-    EE.ResizeEvent += new 
Enlightenment.Ecore.Canvas.EventHandler(AppResizeHandler);
-    EE.Title = "EFL# Demo App";
-    EE.NameClassSet("efl_sharp_demo","efl_sharp_demo");        
-    EE.Show();         
-       
-    Enlightenment.Eblocks.Base.Init(EE);
+    Application.Init();
 
-    Edje win_bg = new Edje(EE.Get());
+    Window win = new Window("EFL# Demo App");  
+    win.Resize(640, 480);
+
+    Application.EE.ResizeEvent += AppResizeHandler;
+
+    /* integrate this code in the Window class */
+    Edje win_bg = new Edje(Application.EE.Get());
     win_bg.FileSet(DataConfig.DATADIR + 
"/data/eblocks/themes/e17.edj","window");
     win_bg.Resize(640, 480);
     win_bg.Move(0, 0);
     win_bg.Lower();
     win_bg.Show();
-       
+    
     MenuItem item;    
     MenuItem entry;
 
-    MenuBar mb = new MenuBar(EE.Get());
+    MenuBar mb = new MenuBar();
     mb.Move(0, 0);
     mb.Resize(640, 35);
     mb.Spacing = 15;
 
-    item = new MenuItem(EE.Get(), "_File");
-    Menu file_menu = new Menu(EE);
+    item = new MenuItem("_File");
+    Menu file_menu = new Menu();
     
     entry = new MenuItem(file_menu.Canvas, "_Open");
     file_menu.Append(entry);
@@ -231,8 +224,8 @@
     
     mb.Append(item);
 
-    item = new MenuItem(EE.Get(), "_Edit");
-    Menu edit_menu = new Menu(EE);
+    item = new MenuItem("_Edit");
+    Menu edit_menu = new Menu();
     
     entry = new MenuItem(edit_menu.Canvas, "_Copy");
     edit_menu.Append(entry);
@@ -244,7 +237,7 @@
     item.SubMenu = edit_menu;
     mb.Append(item);
 
-    item = new MenuItem(EE.Get(), "_About");
+    item = new MenuItem("_About");
     //item.SubMenu = about_menu;
     mb.Append(item);
 
@@ -279,7 +272,7 @@
        
     box_left.PackEnd(box_icons);
        
-    Enlightenment.Eblocks.Line vline = new 
Enlightenment.Eblocks.Line(EE.Get());
+    Enlightenment.Eblocks.Line vline = new 
Enlightenment.Eblocks.Line(Application.EE.Get());
     vline.Vertical = true;
     vline.Resize(6, 480 - 37);
        
@@ -289,24 +282,26 @@
        
     dir = args[0];     
                
-    imageTable = new Table(EE.Get(), items);
+    imageTable = new Table(Application.EE.Get(), items);
        
-    Box box_images = new Box(EE.Get());
+    HBox box_images = new HBox();
     box_images.Move(70, 37);
     box_images.Spacing = 0;
     box_images.Resize(640 - 70 - 2, 480 - 37 - 2);
     box_images.PackStart(imageTable);
        
-    EE.DataSet("box_images", box_images);
-    EE.DataSet("box_left", box_left);
-    EE.DataSet("box_icons", box_icons);
-    EE.DataSet("win_bg", win_bg);
-    EE.DataSet("vline", vline);
-    EE.DataSet("mb", mb);
+    Application.EE.DataSet("box_images", box_images);
+    Application.EE.DataSet("box_left", box_left);
+    Application.EE.DataSet("box_icons", box_icons);
+    Application.EE.DataSet("win_bg", win_bg);
+    Application.EE.DataSet("vline", vline);
+    Application.EE.DataSet("mb", mb);
        
     WaitCallback callback = new WaitCallback(Callback);
     ThreadPool.QueueUserWorkItem(callback);    
+
+    win.ShowAll();
        
-    MainLoop.Begin();       
+    Application.Run();
   }   
 }

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am  2005-06-26 22:08:57 UTC 
(rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/Makefile.am  2005-06-26 23:17:56 UTC 
(rev 46526)
@@ -49,7 +49,7 @@
 ewl/ewl_widget.cs \
 ewl/ewl_window.cs \
 epsilon/epsilon.cs \
-eblocks/eblocks_base.cs \
+eblocks/eblocks_application.cs \
 eblocks/eblocks_box.cs \
 eblocks/eblocks_button.cs \
 eblocks/eblocks_dialog.cs \
@@ -59,7 +59,8 @@
 eblocks/eblocks_table.cs \
 eblocks/eblocks_menubar.cs \
 eblocks/eblocks_menuitem.cs \
-eblocks/eblocks_menu.cs
+eblocks/eblocks_menu.cs \
+eblocks/eblocks_window.cs
 
 
 

Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_application.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_application.cs       
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_application.cs       
2005-06-26 23:17:56 UTC (rev 46526)
@@ -0,0 +1,43 @@
+namespace Enlightenment.Eblocks
+{
+  using System;
+  using System.Runtime.InteropServices;
+  using System.IO;
+  using System.Collections;
+  using Enlightenment.Ecore;
+  using Enlightenment.Edje;
+  
+  public static class Application
+  {
+    protected static Enlightenment.Ecore.Canvas ee;
+    protected static Enlightenment.Evas.Canvas  canvas;
+    
+    public static void Init()
+    {
+      MainLoop.Init();      
+      Canvas.Init();
+      Edje.Init();
+      ee = new Canvas();
+      ee.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 0, 0);      
+      canvas = ee.Get();
+    }    
+
+    public static void Run()
+    {
+      MainLoop.Begin();
+    }
+
+    public static void Quit()
+    {
+      MainLoop.Quit();
+    }
+
+    public static Enlightenment.Ecore.Canvas EE {
+      get { return ee; }
+    }
+
+    public static Enlightenment.Evas.Canvas Canvas {
+      get { return canvas; }
+    }
+  }
+}
\ No newline at end of file

Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_bin.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_bin.cs       
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_bin.cs       
2005-06-26 23:17:56 UTC (rev 46526)
@@ -0,0 +1,21 @@
+namespace Enlightenment.Eblocks
+{
+  using System;
+  using System.Runtime.InteropServices;
+  using System.IO;
+  using System.Collections;
+  using Enlightenment.Ecore;
+
+  public class Bin : Container
+  {
+    protected Enlightenment.Evas.Item child;
+
+    public Bin()
+    {}
+
+    public Enlightenment.Evas.Item Child {
+      get { return child; }
+      set { child = value; }
+    }
+  }
+}
\ No newline at end of file

Modified: 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-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_box.cs       
2005-06-26 23:17:56 UTC (rev 46526)
@@ -88,12 +88,12 @@
   
   public class HBox : Box
   {
-    public HBox() : base(Base.Canvas)
+    public HBox() : base(Application.Canvas)
     {      
       Horizontal = true;      
     }
     
-    public HBox (bool homogeneous, int _spacing) : base(Base.Canvas)
+    public HBox (bool homogeneous, int _spacing) : base(Application.Canvas)
     {      
       Horizontal = true;
       Spacing = _spacing;
@@ -105,11 +105,12 @@
 
   public class VBox : Box
   {
-    public VBox() : base(Base.Canvas)
+    public VBox() : base(Application.Canvas)
     {      
+
     }
     
-    public VBox (bool homogeneous, int _spacing) : base(Base.Canvas)
+    public VBox (bool homogeneous, int _spacing) : base(Application.Canvas)
     {      
       Spacing = _spacing;
     }
@@ -126,9 +127,9 @@
     private int x = 0;
     private int y = 0;
     private int spacer = 0;
-    private int border_width = 1;
+    private int border_width = 0;
+    private bool border = false;
     private bool rendered = false;
-    private bool border = false;    
     private bool fill = false;
     private bool expand = false;
     private BoxVAlign valign = BoxVAlign.Top;
@@ -319,14 +320,14 @@
     {
       x = _x;
       y = _y;
-      clip.Move(x, y);
+      clip.Move(x + border_width, y + border_width);
       internal_item.Move(x, y);
       
       if(border) {
        border_t.Move(x, y);
        border_l.Move(x, y);
-       border_b.Move(x, y + clip.Geometry.H);
-       border_r.Move(x + clip.Geometry.W, y);
+       border_b.Move(x, y + height);
+       border_r.Move(x + width, y);
       }
       
       if(horizontal)
@@ -347,28 +348,28 @@
       width = w;
       height = h;
       internal_item.Resize(width, height);
-      clip.Resize(width, height);
-      
+      clip.Resize(width - border_width*2, height - border_width*2);
+
       if(border) {
-       border_t.XY = new Enlightenment.Evas.LineXY(clip.Geometry.X, 
-                                                   clip.Geometry.Y,
-                                                   clip.Geometry.X + 
clip.Geometry.W, 
-                                                   clip.Geometry.Y);
+       border_t.XY = new Enlightenment.Evas.LineXY(x, 
+                                                   y,
+                                                   x + width, 
+                                                   y);
        
-       border_b.XY = new Enlightenment.Evas.LineXY(clip.Geometry.X, 
-                                                   clip.Geometry.Y + 
clip.Geometry.H,
-                                                   clip.Geometry.X + 
clip.Geometry.W, 
-                                                   clip.Geometry.Y + 
clip.Geometry.H);
+       border_b.XY = new Enlightenment.Evas.LineXY(x, 
+                                                   y + height,
+                                                   x + width, 
+                                                   y + height);
        
-       border_l.XY = new Enlightenment.Evas.LineXY(clip.Geometry.X, 
-                                                   clip.Geometry.Y,
-                                                   clip.Geometry.X, 
-                                                   clip.Geometry.Y + 
clip.Geometry.H);
+       border_l.XY = new Enlightenment.Evas.LineXY(x, 
+                                                   y,
+                                                   x, 
+                                                   y + height);
        
-       border_r.XY = new Enlightenment.Evas.LineXY(clip.Geometry.X + 
clip.Geometry.W, 
-                                                   clip.Geometry.Y,
-                                                   clip.Geometry.X + 
clip.Geometry.W, 
-                                                   clip.Geometry.Y + 
clip.Geometry.H);
+       border_r.XY = new Enlightenment.Evas.LineXY(x + width, 
+                                                   y,
+                                                   x + width, 
+                                                   y + height);
       }
       
 
@@ -431,15 +432,15 @@
        foreach(Enlightenment.Evas.Item item in items) 
          total_h += item.Geometry.H;
        foreach(Enlightenment.Evas.Item item in items) {
-         item.Resize(item.Geometry.W, item.Geometry.H + (height - 
total_h)/items.Count);       
+         item.Resize(item.Geometry.W, item.Geometry.H + (height - 
2*border_width - total_h)/items.Count);      
        }
       }
      
       switch(halign)
       {
       case BoxHAlign.Left:
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
                    
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, item.Geometry.Y);
@@ -449,8 +450,8 @@
        break;
                    
       case BoxHAlign.Right:
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
                    
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(x + width - item.Geometry.W , item.Geometry.Y);
@@ -460,10 +461,10 @@
        break;
                  
       case BoxHAlign.Center:
-       g.Y = y;
+       g.Y = y + border_width;
                  
        foreach(Enlightenment.Evas.Item item in items) {
-         item.Move(x + width/2 - item.Geometry.W/2, item.Geometry.Y);
+         item.Move(x + (width- 2*border_width)/2 - item.Geometry.W/2, 
item.Geometry.Y);
          item.Clip = clip;
          item.Show();                 
        }
@@ -476,8 +477,8 @@
        foreach(Enlightenment.Evas.Item item in items)
          items_height += item.Geometry.H;
                
-       g.X = x;
-       g.Y = y + ((height - items_height)/items.Count)/2;
+       g.X = x + border_width;
+       g.Y = y + ((height -2*border_width - items_height)/items.Count)/2;
                
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, g.Y);
@@ -491,8 +492,8 @@
 
       switch(valign) {
       case BoxVAlign.Top:
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
                
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, g.Y);
@@ -509,8 +510,8 @@
        foreach(Enlightenment.Evas.Item item in items)
          items_height += item.Geometry.H;
                
-       g.X = x;
-       g.Y = y + height/2 - items_height/2;
+       g.X = x + border_width;
+       g.Y = y + border_width + (height - (border_width)*2)/2 - items_height/2;
                
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, g.Y);
@@ -523,8 +524,8 @@
                
       case BoxVAlign.Bottom:
                
-       g.X = x;
-       g.Y = y + height;
+       g.X = x + border_width;
+       g.Y = y + border_width + height;
                
        for(int i = items.Count - 1; i >= 0; i--) {
          Enlightenment.Evas.Item item = (Enlightenment.Evas.Item)items[i];
@@ -548,35 +549,36 @@
        int items_width = 0;
        foreach(Enlightenment.Evas.Item item in items) 
          items_width += item.Geometry.W;
+       /* first undo here */
        foreach(Enlightenment.Evas.Item item in items)
-         item.Resize(item.Geometry.W + (width - items_width)/items.Count, 
item.Geometry.H);    
+         item.Resize(item.Geometry.W + (width - 2*border_width - 
items_width)/items.Count, item.Geometry.H);   
       }
 
       switch(valign) {
       case BoxVAlign.Top:
                  
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, g.Y);
-         item.Clip = clip;          
+         item.Clip = clip;
          item.Show();
        }                                 
        break;
                  
       case BoxVAlign.Middle:
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
        foreach(Enlightenment.Evas.Item item in items) {
-         item.Move(g.X, y + height/2 - item.Geometry.Y/2 - item.Geometry.H/2);
+         item.Move(g.X, y + (height - (border_width)*2)/2 - item.Geometry.Y/2 
- item.Geometry.H/2);
          item.Clip = clip;          
          item.Show();
        }                 
        break;
                  
       case BoxVAlign.Bottom:
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, y + height - item.Geometry.H);
          item.Clip = clip;          
@@ -592,7 +594,7 @@
           items_width += item.Geometry.W;        
 
         g.X = x + ((width - items_width)/items.Count)/2;
-        g.Y = y;
+        g.Y = y + border_width;
 
         foreach(Enlightenment.Evas.Item item in items) {         
           item.Move(g.X, item.Geometry.Y);
@@ -607,8 +609,8 @@
       switch(halign)
       {
       case BoxHAlign.Left:
-       g.X = x;
-       g.Y = y;
+       g.X = x + border_width;
+       g.Y = y + border_width;
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, item.Geometry.Y);
          item.Clip = clip;          
@@ -618,8 +620,8 @@
        }
        break;
       case BoxHAlign.Right:
-       g.X = x + width;
-       g.Y = y;
+       g.X = x + width + border_width;
+       g.Y = y + border_width;
        for(int i = items.Count - 1; i >= 0; i--) {
          Enlightenment.Evas.Item item = (Enlightenment.Evas.Item)items[i];
                        
@@ -638,8 +640,8 @@
        }
                  
                  
-       g.X = x + (width - items_width)/2;
-       g.Y = y;
+       g.X = x + (width - 2*border_width - items_width)/2;
+       g.Y = y + border_width;
                  
        foreach(Enlightenment.Evas.Item item in items) {
          item.Move(g.X, item.Geometry.Y);

Modified: 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-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_button.cs    
2005-06-26 23:17:56 UTC (rev 46526)
@@ -33,7 +33,7 @@
       text.Color = new Enlightenment.Evas.Color(0, 0, 0, 255); 
     }
 
-    public Button(string txt) : base(Eblocks.Base.Canvas, txt)
+    public Button(string txt) : base(Application.Canvas, txt)
     {
       bg.FileSet(DataConfig.DATADIR + "/data/eblocks/themes/e17.edj","button");
       bg.Clip = clip;

Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_container.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_container.cs 
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_container.cs 
2005-06-26 23:17:56 UTC (rev 46526)
@@ -0,0 +1,141 @@
+namespace Enlightenment.Eblocks
+{
+  using System;
+  using System.Runtime.InteropServices;
+  using System.IO;
+  using System.Collections;
+  using Enlightenment.Ecore;
+
+  public class Container : Enlightenment.Evas.Item
+  {
+    private uint border_width;
+    private Enlightenment.Evas.Item child;
+    private ArrayList children;
+
+    public Container()
+    {}
+
+    public uint BorderWidth {
+      get { return border_width; }
+      set { border_width = value; }
+    }
+
+    public Enlightenment.Evas.Item Child {
+      set { child = value; }
+    }
+
+    /* NOTE: in gtk, this is an array */
+    public ArrayList Childern {
+      get { return children; }
+    }
+    
+    /* NOTE: in gtk, this is an array */
+    public ArrayList FocusChain {
+      get {}
+      set {}
+    }
+
+    public Enlightenment.Evas.Item FocusChild {
+      set { }
+    }
+
+    /* TODO: Implement this */
+    public object FocusHadjustment {
+      get {}
+      set {}
+    }
+    
+    /* TODOL Implement this */
+    public object FocusVadjustment {
+      get {}
+      set {}
+    }
+    
+    /* TODOL Implement this */
+    public bool ReallocateRedraws {
+      get {}
+      set {}
+    }
+
+    /* TODOL Implement this */
+    public object ResizeMode {
+      get {}
+      set {}
+    }
+
+    public void Add(Enlightenment.Evas.Item item)
+    {}
+
+    public void CheckResize()
+    {}
+    
+    /* TODO: Implement this */
+    public void ChildGetProperty()
+    {}
+    
+    /* TODO: Implement this */
+    public void ChildGetValist()
+    {}
+    
+    /* TODO: Implement this */
+    public void ChildSetProperty()
+    {}
+
+    /* TODO: Implement this */
+    public void ChildSetValist()
+    {}
+
+    /* TODO: Implement this */
+    public void ChildType()
+    {}
+
+    /* TODO: Implement this */
+    public void Forall()
+    {}
+
+    /* TODO: Implement this */
+    public void Foreach()
+    {}
+
+    /* TODO: Implement this */
+    public void PropagateExpose()
+    {}
+
+    /* TODO: Implement this */
+    public void Remove(Enlightenment.Evas.Item item)
+    {}
+
+    /* TODO: Implement this */
+    public void ResizeChildren()
+    {}
+
+    /* TODO: Implement this */
+    public void UnsetFocusChain()
+    {}
+
+    /* TODO: Implement this */
+    protected void Finalize()
+    {}
+
+    /* TODO: Implement this */
+    protected void ForAll()
+    {}
+
+    /* TODO: Implement this */
+    protected void OnAdded(Enlightenment.Evas.Item item)
+    {}
+
+    /* TODO: Implement this */
+    protected void OnFocusChildSet(Enlightenment.Evas.Item item)
+    {}
+
+    /* TODO: Implement this */
+    protected void OnRemoved(Enlightenment.Evas.Item item)
+    {}
+
+    /* TODO: Implement this */
+    protected void OnResizeChecked()
+    {}
+
+  }
+}
\ No newline at end of file

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menu.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menu.cs      
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menu.cs      
2005-06-26 23:17:56 UTC (rev 46526)
@@ -22,11 +22,11 @@
     public Enlightenment.Evas.Item parent_item;
     public Enlightenment.Ecore.Canvas parent_canvas;
        
-    public Menu(Enlightenment.Ecore.Canvas p)
+    public Menu()
     {
       callbacks = new Hashtable();      
 
-      parent_canvas = p;
+      parent_canvas = Application.EE;
       
       ee = new Enlightenment.Ecore.Canvas();
       ee.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 0, 0);
@@ -42,9 +42,13 @@
       win_bg.Show();           
             
       item_box = new Box(canvas);
+      item_box.BorderWidth = 7;
       item_box.Border = true;      
       item_box.Spacing = 5;
       item_box.Move(0, 0);
+
+      height = item_box.BorderWidth * 2;
+      width += item_box.BorderWidth * 2;
     }
        
     public delegate void MenuButtonClickHandler(Menu d);
@@ -53,7 +57,7 @@
     {
       item_box.PackEnd(item);
       width = Math.Max(width, item.Geometry.W); 
-      height += item.Geometry.H;
+      height += item.Geometry.H + item_box.Spacing;
       ee.Resize(width, height);
       win_bg.Resize(width, height);
       item_box.Resize(width - 1, height - 1);

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menubar.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menubar.cs   
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menubar.cs   
2005-06-26 23:17:56 UTC (rev 46526)
@@ -33,7 +33,31 @@
        
        
     public MenuBar()
-    {}
+    {
+      canvas = Application.EE.Get();
+
+      box_out = new Box(canvas);
+      box_out.BorderWidth = 5;
+      box_out.Fill = true;
+      box_out.Spacing = 0;
+      
+      box_labels = new Box(canvas);
+
+      box_labels.Spacing = 15;
+      box_labels.Horizontal = true;
+      
+      seperator = new Line(canvas);
+      seperator.Horizontal = true;      
+      seperator.Resize(9999, 6);
+      
+      box_line = new Box(canvas);      
+      box_line.Fill = true;
+      box_line.Spacing = 0;           
+      box_line.PackStart(seperator);
+
+      box_out.PackStart(box_labels);
+      box_out.PackEnd(box_line);      
+    }
        
     public MenuBar(Enlightenment.Evas.Canvas c)
     {

Modified: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menuitem.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menuitem.cs  
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_menuitem.cs  
2005-06-26 23:17:56 UTC (rev 46526)
@@ -15,51 +15,21 @@
   public class MenuItem : Label
   { 
     Menu submenu;
-  
-    public MenuItem() : base()
-    {  
-    }
-       
-    public MenuItem(Enlightenment.Evas.Canvas c) : base(c)
+       
+    public MenuItem() : base(Application.EE.Get())
     {
-      //bg.FileSet(DataConfig.DATADIR + 
"/data/eblocks/themes/e17.edj","button");
+      
     }
-       
+
     public MenuItem(Enlightenment.Evas.Canvas c, string txt) : base(c, txt)
-    {
-      //bg.FileSet(DataConfig.DATADIR + 
"/data/eblocks/themes/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 MenuItem(string txt) : base(Application.EE.Get(), txt)
+    {       
+      text.Color = new Enlightenment.Evas.Color(0, 0, 0, 255); 
     }
-       
-       
-    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 void SubMenuOpen(Enlightenment.Evas.Item item, object EventInfo)
     {

Added: trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_window.cs
===================================================================
--- trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_window.cs    
2005-06-26 22:08:57 UTC (rev 46525)
+++ trunk/efl-sharp/libs/efl-sharp/src/lib/eblocks/eblocks_window.cs    
2005-06-26 23:17:56 UTC (rev 46526)
@@ -0,0 +1,29 @@
+namespace Enlightenment.Eblocks
+{
+  using System;
+  using System.Runtime.InteropServices;
+  using System.IO;
+  using System.Collections;
+  using Enlightenment.Ecore;
+
+  public class Window //: Bin
+  {
+    private Enlightenment.Ecore.Canvas ee;
+    
+    public Window(string title)
+    {
+      ee = Application.EE;
+      ee.Title = title;
+    }
+
+    public void Resize(int x, int y)
+    {
+      ee.Resize(x, y);
+    }
+    
+    public void ShowAll()
+    {
+      ee.Show();
+    }
+  }
+}
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to