aboutsummaryrefslogtreecommitdiffstatsci
path: root/CrowIDE/src/DesignInterface.cs
diff options
context:
space:
mode:
authorj-p <jp.bruyere@live.be>2018-12-11 23:20:54 +0100
committerGitHub <noreply@github.com>2018-12-11 23:20:54 +0100
commitd7239eebe4b07685aabaf6663bebbc77386286ea (patch)
tree836cee695262dc2fc3f1219de385752177893ed2 /CrowIDE/src/DesignInterface.cs
parentf1531e562b4ecd9d568a28c2fffe7ffed06c728a (diff)
parent7e831f8ebac4affbb01211b1f6ec3887280fea2b (diff)
Merge pull request #44 from jpbruyere/xlib
Xlib
Diffstat (limited to 'CrowIDE/src/DesignInterface.cs')
-rw-r--r--CrowIDE/src/DesignInterface.cs34
1 files changed, 31 insertions, 3 deletions
diff --git a/CrowIDE/src/DesignInterface.cs b/CrowIDE/src/DesignInterface.cs
index 04666b11..7d9b8ad8 100644
--- a/CrowIDE/src/DesignInterface.cs
+++ b/CrowIDE/src/DesignInterface.cs
@@ -30,6 +30,7 @@ using System.Threading;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using Cairo;
namespace Crow.Coding
{
@@ -53,17 +54,44 @@ namespace Crow.Coding
}
#endregion
- public DesignInterface ()
+ public DesignInterface () : base()
{
}
public ProjectFile ProjFile;
+
+ protected override void InitBackend ()
+ {
+ surf = new ImageSurface(Format.Argb32, 100, 100);
+ }
+ public override void ProcessResize (Rectangle bounds)
+ {
+ if (bounds == clientRectangle)
+ return;
+ lock (UpdateMutex) {
+ clientRectangle = bounds;
+ surf.Dispose ();
+ surf = new ImageSurface(Format.Argb32, clientRectangle.Width, clientRectangle.Height);
+
+ foreach (GraphicObject g in GraphicTree)
+ g.RegisterForLayouting (LayoutingType.All);
+
+ RegisterClip (clientRectangle);
+ }
+
+ }
public override GraphicObject Load (string path)
{
ProjectFile pi;
- if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi))
- return CreateITorFromIMLFragment (pi.Source).CreateInstance();
+ try {
+
+ if (ProjFile.Project.solution.GetProjectFileFromPath (path, out pi))
+ return CreateITorFromIMLFragment (pi.Source).CreateInstance();
+ } catch (Exception ex) {
+
+ }
+
return null;
}
public override System.IO.Stream GetStreamFromPath (string path)