[Monodevelop-patches-list] r1822 - trunk/MonoDevelop/src/Libraries/Gdl
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Jun 24 21:11:54 EDT 2004
Author: jluke
Date: 2004-06-24 21:11:54 -0400 (Thu, 24 Jun 2004)
New Revision: 1822
Modified:
trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockLayout.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs
Log:
implement some stuff
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs 2004-06-24 23:21:44 UTC (rev 1821)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs 2004-06-25 01:11:54 UTC (rev 1822)
@@ -6,11 +6,71 @@
namespace Gdl
{
- // stub so I can compile in MD
- public class DockBar : Widget // maybe not really
+ public class DockBar : VBox
{
+ DockMaster master;
+
public DockBar (Dock dock)
{
+ master = dock.Master;
}
+
+ public DockMaster Master {
+ get {
+ return master;
+ }
+ set {
+ master = value;
+ }
+ }
+
+ public void AddItem (DockItem item)
+ {
+ Button button = new Button ();
+ Image image = new Image (item.StockId);
+ button.Add (image);
+ button.Clicked += OnDockButtonClicked;
+ // check if already there
+ // set tooltip
+ item.DockBar = this;
+ item.DockBarButton = button;
+ this.PackStart (button, false, false, 0);
+ button.ShowAll ();
+ }
+
+ public void Attach (DockMaster master)
+ {
+ this.master = master;
+ master.LayoutChanged += OnLayoutChanged;
+ }
+
+ public void RemoveItem (DockItem item)
+ {
+ // check if there
+ this.Remove (item.DockBarButton);
+ }
+
+ void UpdateDockItems ()
+ {
+ foreach (DockItem item in master.DockObjects)
+ {
+ if (item.Iconified)
+ this.AddItem (item);
+ else
+ this.RemoveItem (item);
+ }
+ }
+
+ void OnLayoutChanged (object o, EventArgs args)
+ {
+ UpdateDockItems ();
+ }
+
+ void OnDockButtonClicked (object o, EventArgs args)
+ {
+ // show
+ // remove
+ // resize
+ }
}
}
\ No newline at end of file
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs 2004-06-24 23:21:44 UTC (rev 1821)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs 2004-06-25 01:11:54 UTC (rev 1822)
@@ -18,7 +18,9 @@
private int dragoffX = 0;
private int dragoffY = 0;
private Menu menu = null;
+ private DockBar dockBar;
private DockItemGrip grip;
+ private Button dockButton;
private uint gripSize;
private Widget tabLabel = null;
private int preferredWidth = -1;
@@ -103,6 +105,24 @@
}
}
+ public DockBar DockBar {
+ get {
+ return dockBar;
+ }
+ set {
+ dockBar = value;
+ }
+ }
+
+ public Button DockBarButton {
+ get {
+ return dockButton;
+ }
+ set {
+ dockButton = value;
+ }
+ }
+
public int DragOffX {
get {
return dragoffX;
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockLayout.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockLayout.cs 2004-06-24 23:21:44 UTC (rev 1821)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockLayout.cs 2004-06-25 01:11:54 UTC (rev 1822)
@@ -9,13 +9,56 @@
// stub so I can compile in MD
public class DockLayout
{
+ DockMaster master;
+ Widget itemsui;
+ Widget layoutsui;
+ string[] layouts;
+ bool dirty;
+
public DockLayout (Dock dock)
{
}
+
+ public DockMaster Master {
+ get {
+ return master;
+ }
+ set {
+ master = value;
+ }
+ }
+
+ // generated had Dirty and IsDirty
+ public bool IsDirty {
+ get {
+ return dirty;
+ }
+ }
+
+ public Widget ItemsUi {
+ get {
+ return itemsui;
+ }
+ }
+
+ public Widget LayoutsUi {
+ get {
+ return layoutsui;
+ }
+ }
+
+ public void Attach (DockMaster master)
+ {
+ this.master = master;
+ }
+
+ public void DeleteLayout (string name)
+ {
+ }
- public string[] GetLayouts (bool something)
+ public string[] GetLayouts (bool includeDefault)
{
- return new string[] {""};
+ return layouts;
}
public void LoadLayout (string newLayout)
@@ -26,6 +69,10 @@
{
}
+ public void RunManager ()
+ {
+ }
+
public void SaveLayout (string currentLayout)
{
}
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs 2004-06-24 23:21:44 UTC (rev 1821)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs 2004-06-25 01:11:54 UTC (rev 1822)
@@ -21,6 +21,8 @@
private uint idle_layout_changed_id;
private Hashtable lockedItems = new Hashtable ();
private Hashtable unlockedItems = new Hashtable ();
+
+ public event EventHandler LayoutChanged;
public DockMaster ()
{
More information about the Monodevelop-patches-list
mailing list