[Monodevelop-patches-list] r1745 - trunk/MonoDevelop/src/Libraries/Gdl
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jun 12 13:49:43 EDT 2004
Author: tberman
Date: 2004-06-12 13:49:43 -0400 (Sat, 12 Jun 2004)
New Revision: 1745
Modified:
trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockNotebook.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockPlaceholder.cs
Log:
added protected ctors, and started some of the floating impl
Modified: trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -19,28 +19,45 @@
private Gdk.GC xorGC;
private string title;
- public Dock ()
+ protected Dock (IntPtr raw) : base (raw) { }
+
+ public Dock () : this (null, false)
{
- Flags |= (int)WidgetFlags.NoWindow;
-
+ }
+
+ public Dock (Dock original, bool _float)
+ {
+ SetFlag (WidgetFlags.NoWindow);
+ if (original != null)
+ Master = original.Master;
+ this.floating = _float;
if (Master == null) {
DockObjectFlags &= ~(DockObjectFlags.Automatic);
Bind (new DockMaster ());
}
-
if (floating) {
- //Need code here to handle floating shit.
+ window = new Window (WindowType.Toplevel);
+ ((Gtk.Window)window).WindowPosition = WindowPosition.Mouse;
+ ((Gtk.Window)window).SetDefaultSize (width, height);
+ ((Gtk.Window)window).TypeHint = Gdk.WindowTypeHint.Normal;
+ ((Gtk.Window)window).Move (float_x, float_y);
+ window.ConfigureEvent += new ConfigureEventHandler (floatingConfigure);
+ SetWindowTitle ();
+ //TODO: connect to long name notify
+ DockObject controller = Master.Controller;
+ if (controller != null && controller is Dock) {
+ if (!((Dock)controller).Floating) {
+ if (controller.Toplevel != null && controller.Toplevel is Gtk.Window) {
+ ((Gtk.Window)window).TransientFor = (Gtk.Window)controller.Toplevel;
+ }
+ }
+ }
+ ((Gtk.Window)window).Add (this);
+ ((Gtk.Window)window).ShowAll ();
}
-
DockObjectFlags |= DockObjectFlags.Attached;
}
- public Dock (Dock original, bool floating) : this ()
- {
- Master = original.Master;
- this.floating = floating;
- }
-
public bool Floating {
get {
return floating;
@@ -506,5 +523,15 @@
((Window)window).Title = title;
}
+
+ private void floatingConfigure (object o, ConfigureEventArgs e)
+ {
+ Console.WriteLine ("inside configure");
+ float_x = e.Event.X;
+ float_y = e.Event.Y;
+ width = e.Event.Width;
+ height = e.Event.Height;
+ e.RetVal = false;
+ }
}
}
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockItem.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -50,6 +50,8 @@
grip.Show ();
}
}
+
+ protected DockItem (IntPtr raw) : base (raw) { }
public DockItem (string name, string longName, DockItemBehavior behavior) : this ()
{
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -18,6 +18,8 @@
private Gdk.Pixbuf icon_pixbuf = null;
private string title;
private Pango.Layout title_layout = null;
+
+ protected DockItemGrip (IntPtr raw) : base (raw) { }
public DockItemGrip ()
{
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockNotebook.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockNotebook.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockNotebook.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -22,6 +22,8 @@
private DockInfo dockInfo;
private CallbackInvoker storedInvoker;
+ protected DockNotebook (IntPtr raw) : base (raw) { }
+
static DockNotebook ()
{
Rc.ParseString ("style \"gdl-dock-notebook-default\" {\n" +
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -16,6 +16,9 @@
public event DetachedHandler Detached;
public event DockedHandler Docked;
+
+ protected DockObject (IntPtr raw) : base (raw) { }
+ protected DockObject () : base () { }
public DockObjectFlags DockObjectFlags {
get {
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -9,6 +9,8 @@
{
private bool positionChanged = false;
+ protected DockPaned (IntPtr raw) : base (raw) { }
+
public DockPaned (Orientation orientation)
{
CreateChild (orientation);
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockPlaceholder.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockPlaceholder.cs 2004-06-12 16:24:12 UTC (rev 1744)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockPlaceholder.cs 2004-06-12 17:49:43 UTC (rev 1745)
@@ -13,6 +13,8 @@
private ArrayList placement_stack;
private int host_detach_handler;
private int host_dock_handler;
+
+ protected DockPlaceholder (IntPtr raw) : base (raw) { }
public DockPlaceholder ()
{
More information about the Monodevelop-patches-list
mailing list