<package >
<metadata>
<id>Crow.OpenTK</id>
- <version>0.4.6</version>
+ <version>0.4.8</version>
<title>C# Rapid Open Widget Toolkit</title>
<authors>JP Bruyere</authors>
<owners>Grand Tetras Software</owners>
For more information, please visit https://jpbruyere.github.io/Crow/.
</summary>
- <releaseNotes>pre-alpha release, minimal OpenTK implementation.</releaseNotes>
+ <releaseNotes>alpha release</releaseNotes>
<copyright>Copyright 2016</copyright>
<dependencies>
<dependency id="OpenTK.Next" version="1.2" />
public static class CompilerServices
{
static MethodInfo miAddBinding = typeof(GraphicObject).GetMethod ("BindMember");
- static FieldInfo miSetCurIface = typeof(GraphicObject).
- GetField ("CurrentInterface", BindingFlags.NonPublic | BindingFlags.Instance);
+ static FieldInfo miSetCurIface = typeof(GraphicObject).GetField ("currentInterface",
+ BindingFlags.NonPublic | BindingFlags.Instance);
public static void emitSetCurInterface(ILGenerator il){
il.Emit (OpCodes.Ldloc_0);
: base()
{
}
- public Container(Rectangle _bounds)
- : base(_bounds)
- {
- }
#endregion
[XmlIgnore]
internal static ulong currentUid = 0;
internal ulong uid = 0;
+ Interface currentInterface = null;
+
+ public Interface CurrentInterface {
+ get {
+ if (currentInterface == null) {
+ currentInterface = Interface.CurrentInterface;
+ initialize ();
+ }
+ return currentInterface;
+ }
+ set {
+ currentInterface = value;
+ }
+ }
+
Rectangles clipping = new Rectangles();
public Rectangles Clipping { get { return clipping; }}
{
uid = currentUid;
currentUid++;
-
-// if (CurrentInterface.XmlLoading)
-// return;
-// loadDefaultValues ();
- }
- public GraphicObject (Rectangle _bounds)
- {
-// if (!CurrentInterface.XmlLoading)
-// loadDefaultValues ();
-
- Left = _bounds.Left;
- Top = _bounds.Top;
- Width = _bounds.Width;
- Height = _bounds.Height;
}
#endregion
-
+ internal protected virtual void initialize(){
+ loadDefaultValues ();
+ }
#region private fields
LayoutingType registeredLayoutings = LayoutingType.All;
ILayoutable logicalParent;
if (RegisteredLayoutings == LayoutingType.None)
CurrentInterface.EnqueueForRepaint (this);
}
- internal Interface CurrentInterface = null;
#endregion
#region Layouting
: base()
{
}
- public PrivateContainer(Rectangle _bounds)
- : base(_bounds)
- {
- }
#endregion
protected GraphicObject child;
#region CTOR
public TemplatedControl () : base()
{
-// if (CurrentInterface.XmlLoading)
-// return;
- //loadTemplate ();
}
#endregion
+ internal protected override void initialize ()
+ {
+ loadTemplate ();
+ base.initialize ();
+ }
+
string _template;
string _itemTemplate;
public Dictionary<string, ItemTemplate> ItemTemplates = new Dictionary<string, Crow.ItemTemplate>();//TODO: dont instantiate if not used
FontRenderingOptions.SubpixelOrder = SubpixelOrder.Rgb;
}
public Interface(){
+ CurrentInterface = this;
CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
}
#endregion
public static FontOptions FontRenderingOptions;
#endregion
- internal bool XmlLoading = true;
+ internal static Interface CurrentInterface;
public Dictionary<string,object> Ressources = new Dictionary<string, object>();
public Queue<LayoutingQueueItem> LayoutingQueue = new Queue<LayoutingQueueItem> ();