]> O.S.I.I.S - jp/crow.git/commitdiff
debug for netcore standards 2
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 7 Dec 2018 03:32:57 +0000 (04:32 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 7 Dec 2018 03:32:57 +0000 (04:32 +0100)
71 files changed:
Crow.csproj
src/BmpPicture.cs
src/Command.cs
src/CompilerServices/CompilerServices.cs
src/Configuration.cs
src/GraphicObjects/Border.cs
src/GraphicObjects/Button.cs
src/GraphicObjects/CheckBox.cs
src/GraphicObjects/ColorPicker.cs
src/GraphicObjects/DirectoryView.cs
src/GraphicObjects/Expandable.cs
src/GraphicObjects/FileDialog.cs
src/GraphicObjects/GenericStack.cs
src/GraphicObjects/GraphicObject.cs
src/GraphicObjects/Grid.cs
src/GraphicObjects/Group.cs
src/GraphicObjects/HueSelector.cs
src/GraphicObjects/Image.cs
src/GraphicObjects/Label.cs
src/GraphicObjects/Menu.cs
src/GraphicObjects/MenuItem.cs
src/GraphicObjects/NumericControl.cs
src/GraphicObjects/Popper.cs
src/GraphicObjects/RadioButton.cs
src/GraphicObjects/SaturationValueSelector.cs
src/GraphicObjects/ScrollBar.cs
src/GraphicObjects/Scroller.cs
src/GraphicObjects/ScrollingObject.cs
src/GraphicObjects/Shape.cs
src/GraphicObjects/Splitter.cs
src/GraphicObjects/TemplatedControl.cs
src/GraphicObjects/TemplatedGroup.cs
src/GraphicObjects/TextRun.cs
src/GraphicObjects/TreeView.cs
src/GraphicObjects/Trend.cs
src/GraphicObjects/VerticalStack.cs
src/GraphicObjects/Window.cs
src/GraphicObjects/XmlIgnoreAttribute.cs [new file with mode: 0644]
src/IML/BindingMember.cs
src/IML/IMLContext.cs
src/IML/Reader.cs
src/Input/MouseEventArgs.cs
src/Instantiator.cs
src/Interface.cs
src/ItemTemplate.cs
src/Mono.Cairo/Antialias.cs
src/Mono.Cairo/Content.cs
src/Mono.Cairo/Context.cs
src/Mono.Cairo/Device.cs
src/Mono.Cairo/Extend.cs
src/Mono.Cairo/FillRule.cs
src/Mono.Cairo/Filter.cs
src/Mono.Cairo/FontSlant.cs
src/Mono.Cairo/FontType.cs
src/Mono.Cairo/FontWeight.cs
src/Mono.Cairo/Format.cs
src/Mono.Cairo/HintMetrics.cs
src/Mono.Cairo/HintStyle.cs
src/Mono.Cairo/LineCap.cs
src/Mono.Cairo/LineJoin.cs
src/Mono.Cairo/Matrix.cs
src/Mono.Cairo/NativeMethods.cs
src/Mono.Cairo/Operator.cs
src/Mono.Cairo/PatternType.cs
src/Mono.Cairo/Status.cs
src/Mono.Cairo/SubpixelOrder.cs
src/Mono.Cairo/Surface.cs
src/Mono.Cairo/SurfaceType.cs
src/Mono.Cairo/SvgVersion.cs
src/Point.cs
src/backends/xlib/X11Structs.cs

index e06c7c71eb92691a6cd8098b1666b4a96c7a71a0..817b9ae37f2e35358d5a346b4fb5549f41efab57 100644 (file)
     <Compile Include="src\GraphicObjects\ComboBox.cs" />
     <Compile Include="src\GraphicObjects\GroupBox.cs" />
     <Compile Include="src\GraphicObjects\ScrollBar.cs" />
+    <Compile Include="src/GraphicObjects/XmlIgnoreAttribute.cs" />
     <Compile Include="src\BubblingMouseButtonEventArgs.cs" />
     <Compile Include="src\SolidColor.cs" />
     <Compile Include="src\Gradient.cs" />
index 1c7250b8ab704ff4d767f1aaced288085d76c604..98c2a01607898fc50577e33b6fbcb22afbdf1344 100644 (file)
@@ -64,13 +64,13 @@ namespace Crow
                                return;
                        }
                        using (Stream stream = Interface.StaticGetStreamFromPath (Path)) {                              
-                               loadBitmap (new System.Drawing.Bitmap (stream));        
+                               //loadBitmap (new System.Drawing.Bitmap (stream));      
                        }
                        sharedResources [Path] = new sharedPicture (image, Dimensions);
                }
 
                //load image via System.Drawing.Bitmap, cairo load png only
-               void loadBitmap (System.Drawing.Bitmap bitmap)
+               /*void loadBitmap (System.Drawing.Bitmap bitmap)
                {
                        if (bitmap == null)
                                return;
@@ -88,7 +88,7 @@ namespace Crow
                        System.Runtime.InteropServices.Marshal.Copy (data.Scan0, image, 0, bitmapSize);
 
                        bitmap.UnlockBits (data);           
-               }
+               }*/
 
                #region implemented abstract members of Fill
 
index ba95acc9af9012f5a26a2b72f9ba9bd58f5b41a5..5d5f85e4046e06e6b7593e796634c514bc9c2bb4 100644 (file)
@@ -64,7 +64,7 @@ namespace Crow
                /// <summary>
                /// if true, action defined in this command may be executed,
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue(true)]
+               [DefaultValue(true)]
                public virtual bool CanExecute {
                        get { return canExecute; }
                        set {
@@ -77,7 +77,7 @@ namespace Crow
                /// <summary>
                /// label to display in the bound control
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue("Unamed Command")]
+               [DefaultValue("Unamed Command")]
                public virtual string Caption {
                        get { return caption; }
                        set {
@@ -91,7 +91,7 @@ namespace Crow
                /// <summary>
                /// Icon to display in the bound control
                /// </summary>
-               [XmlAttributeAttribute]
+               
                public Picture Icon {
                        get { return icon; }
                        set {
index 6ceff045af8239bffc3e761d7f79c388c23f555d..5112fb12d99e650259269ae06181ae26822f0c8c 100644 (file)
@@ -150,9 +150,9 @@ namespace Crow.IML
                        }
                        Type dvType = val.GetType ();
 
-                       if (dvType.IsValueType) {
+            if (dvType.IsValueType) {
                                if (pi.PropertyType.IsValueType) {
-                                       if (pi.PropertyType.IsEnum) {
+                    if (pi.PropertyType.IsEnum) {
                                                if (pi.PropertyType != dvType)
                                                        throw new Exception ("Enum mismatch in default values: " + pi.PropertyType.FullName);
                                                il.Emit (OpCodes.Ldc_I4, Convert.ToInt32 (val));
@@ -224,7 +224,7 @@ namespace Crow.IML
                                        il.Emit (OpCodes.Ldstr, Convert.ToString (val));//TODO:implement here string format?
                                        //load false
                                        il.Emit (OpCodes.Ldc_I4_0);
-                                       il.Emit (OpCodes.Callvirt, CompilerServices.miParseEnum);
+                                       il.Emit (OpCodes.Call, CompilerServices.miParseEnum);
 
                                        if (CompilerServices.miParseEnum.ReturnType != pi.PropertyType)
                                                il.Emit (OpCodes.Unbox_Any, pi.PropertyType);
@@ -236,13 +236,13 @@ namespace Crow.IML
                                                throw new Exception ("no Parse method found for: " + pi.PropertyType.FullName);
 
                                        il.Emit (OpCodes.Ldstr, Convert.ToString (val));//TODO:is this convert required?
-                                       il.Emit (OpCodes.Callvirt, miParse);
+                                       il.Emit (OpCodes.Call, miParse);
 
                                        if (miParse.ReturnType != pi.PropertyType)
                                                il.Emit (OpCodes.Unbox_Any, pi.PropertyType);
                                }
                        }
-                       il.Emit (OpCodes.Callvirt, pi.GetSetMethod ());
+            il.Emit (OpCodes.Callvirt, pi.GetSetMethod ());
                }
 
                #region conversions
@@ -535,23 +535,31 @@ namespace Crow.IML
                        }else if (origType.IsValueType) {
                                if (destType != origType) {
                                        MethodInfo miIO = getImplicitOp (origType, destType);
-                                       if (miIO != null) {
-                                               System.Reflection.Emit.Label emitCreateDefault = il.DefineLabel ();
-                                               System.Reflection.Emit.Label emitContinue = il.DefineLabel ();
-                                               LocalBuilder lbStruct = il.DeclareLocal (origType);
-                                               il.Emit (OpCodes.Dup);
-                                               il.Emit (OpCodes.Brfalse, emitCreateDefault);
-                                               il.Emit (OpCodes.Unbox_Any, origType);
-                                               il.Emit (OpCodes.Br, emitContinue);
-                                               il.MarkLabel (emitCreateDefault);
-                                               il.Emit (OpCodes.Pop);//pop null value
-                                               il.Emit (OpCodes.Ldloca, lbStruct);
-                                               il.Emit (OpCodes.Initobj, origType);
-                                               il.Emit (OpCodes.Ldloc, lbStruct);
-                                               il.MarkLabel (emitContinue);
-                                               il.Emit (OpCodes.Call, miIO);
-                                       }else
-                                               il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (destType));
+                    if (miIO != null)
+                    {
+                        System.Reflection.Emit.Label emitCreateDefault = il.DefineLabel();
+                        System.Reflection.Emit.Label emitContinue = il.DefineLabel();
+                        LocalBuilder lbStruct = il.DeclareLocal(origType);
+                        il.Emit(OpCodes.Dup);
+                        il.Emit(OpCodes.Brfalse, emitCreateDefault);
+                        il.Emit(OpCodes.Unbox_Any, origType);
+                        il.Emit(OpCodes.Br, emitContinue);
+                        il.MarkLabel(emitCreateDefault);
+                        il.Emit(OpCodes.Pop);//pop null value
+                        il.Emit(OpCodes.Ldloca, lbStruct);
+                        il.Emit(OpCodes.Initobj, origType);
+                        il.Emit(OpCodes.Ldloc, lbStruct);
+                        il.MarkLabel(emitContinue);
+                        il.Emit(OpCodes.Call, miIO);
+                    }
+                    else
+                    {
+                        MethodInfo miconv = CompilerServices.GetConvertMethod(destType);
+                        if (miconv.IsStatic)
+                            il.Emit(OpCodes.Call, miconv);
+                        else
+                            il.Emit(OpCodes.Callvirt, miconv);
+                    }
                                }else
                                        il.Emit (OpCodes.Unbox_Any, destType);//TODO:double check this
                        } else {
@@ -622,8 +630,12 @@ namespace Crow.IML
                                il.Emit (OpCodes.Pop);//remove null string from stack
                                il.Emit (OpCodes.Ldstr, "");//replace with empty string
                        } else if (dstType.IsPrimitive) {
-                               //il.Emit (OpCodes.Unbox_Any, dstType);
-                               il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (dstType));
+                //il.Emit (OpCodes.Unbox_Any, dstType);
+                MethodInfo miconv = CompilerServices.GetConvertMethod(dstType);
+                if (miconv.IsStatic)
+                    il.Emit(OpCodes.Call, miconv);
+                else
+                    il.Emit(OpCodes.Callvirt, miconv);
                        } else if (dstType.IsValueType) {
                                il.Emit (OpCodes.Unbox_Any, dstType);
                        } else{
@@ -803,10 +815,13 @@ namespace Crow.IML
 
                                                il.Emit (OpCodes.Ldstr, operandes [1].Trim ());
                                        }
-                                       il.Emit (OpCodes.Callvirt, lopParseMi);
-                                       //il.Emit (OpCodes.Unbox_Any, lopPI.PropertyType);
-                                       //emit left operand assignment
-                                       il.Emit (OpCodes.Callvirt, lopPI.GetSetMethod());
+                    if (lopParseMi.IsStatic)
+                                           il.Emit (OpCodes.Call, lopParseMi);
+                    else
+                        il.Emit(OpCodes.Callvirt, lopParseMi);
+                    //il.Emit (OpCodes.Unbox_Any, lopPI.PropertyType);
+                    //emit left operand assignment
+                    il.Emit (OpCodes.Callvirt, lopPI.GetSetMethod());
                                } else {//tree parsing and propert gets
                                        il.Emit (OpCodes.Ldarg_0);  //load sender ref onto the stack, the current node
 
index 71cae84adac76ac75b382b7098a6ad3b16e98613..b8112be4bc178658daa02a276f6def6adff6a46d 100644 (file)
@@ -108,6 +108,7 @@ namespace Crow
                {
                        string configRoot =
                                Path.Combine(
+                    
                                        Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
                                        ".config");
 
index 63f2c68fded33629b5ef13e2819b477e3d33328d..9379c26acaa96525a5ef1d64a8cc1eec26f793a8 100644 (file)
@@ -62,7 +62,7 @@ namespace Crow
                /// <summary>
                /// use to define the colors of the 3d border
                /// </summary>
-               [XmlAttributeAttribute]
+               
                public virtual Fill RaisedColor {
                        get { return raisedColor; }
                        set {
@@ -76,7 +76,7 @@ namespace Crow
                /// <summary>
                /// use to define the colors of the 3d border
                /// </summary>
-               [XmlAttributeAttribute]
+               
                public virtual Fill SunkenColor {
                        get { return sunkenColor; }
                        set {
@@ -90,7 +90,7 @@ namespace Crow
                /// <summary>
                /// border width in pixels
                /// </summary>
-               [XmlAttributeAttribute()][DefaultValue(1)]
+               [DefaultValue(1)]
                public virtual int BorderWidth {
                        get { return _borderWidth; }
                        set {
@@ -101,7 +101,7 @@ namespace Crow
                /// <summary>
                /// allow 3d border effects
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue(BorderStyle.Normal)]
+               [DefaultValue(BorderStyle.Normal)]
                public virtual BorderStyle BorderStyle {
                        get { return _borderStyle; }
                        set {
index 8b60dcb9269bd85fa005172cffb69d109f7c6467..30612512f208522f844153370f07f67ed39ead73 100644 (file)
@@ -75,7 +75,7 @@ namespace Crow
                }
                #endregion
 
-               [XmlAttributeAttribute][DefaultValue("#Crow.Images.button.svg")]
+               [DefaultValue("#Crow.Images.button.svg")]
                public string Image {
                        get { return image; }
                        set {
@@ -85,7 +85,7 @@ namespace Crow
                                NotifyValueChanged ("Image", image);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool IsPressed
                {
                        get { return isPressed; }
index 646a857774d6038abb2fe666126147a13d563f32..4860d604fa56df3b8d33f6dfd25b752d6dec82be 100644 (file)
@@ -45,7 +45,7 @@ namespace Crow
                public event EventHandler Checked;
                public event EventHandler Unchecked;
 
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool IsChecked
                {
                        get { return isChecked; }
index cc955191f542e9cf08d86c6835a0a53392933317..dd45023cde1624bf32c547ec628b8aa47a3702a5 100644 (file)
@@ -46,7 +46,7 @@ namespace Crow
                Color curColor;
                double h,s,v;
 
-               [XmlAttributeAttribute()]
+               
                public virtual double R {
                        get { return Math.Round(curColor.R * div); }
                        set {
@@ -58,7 +58,7 @@ namespace Crow
                                notifyCurColorHasChanged ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double G {
                        get { return Math.Round(curColor.G * div); }
                        set {
@@ -70,7 +70,7 @@ namespace Crow
                                hsvFromRGB ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double B {
                        get { return Math.Round(curColor.B * div); }
                        set {
@@ -82,7 +82,7 @@ namespace Crow
                                hsvFromRGB ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double A {
                        get { return Math.Round(curColor.A * div); }
                        set {
@@ -94,7 +94,7 @@ namespace Crow
                                hsvFromRGB ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double H {
                        get { return Math.Round (h, 3); }
                        set {
@@ -105,7 +105,7 @@ namespace Crow
                                rgbFromHSV ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double S {
                        get { return Math.Round (s, 2); }
                        set {
@@ -116,7 +116,7 @@ namespace Crow
                                rgbFromHSV ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double V {
                        get { return Math.Round (v, 2); }
                        set {
@@ -128,7 +128,7 @@ namespace Crow
                        }
                }
 
-               [XmlAttributeAttribute]
+               
                public virtual Fill SelectedColor {
                        get { return new SolidColor(curColor); }
                        set {
@@ -145,7 +145,7 @@ namespace Crow
                                hsvFromRGB ();
                        }
                }
-               [XmlAttributeAttribute]
+               
                public virtual Color SelectedRawColor {
                        get { return curColor; }
                        set {
index d530f0cb91660373a3c24497f3d1882a0d8c3f7c..b0217896860608152b97b3d777a5aad8896aa538 100644 (file)
@@ -63,7 +63,7 @@ namespace Crow
                                NotifyValueChanged ("SelectedItem", _selectedItem);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(true)]
+               [DefaultValue(true)]
                public virtual bool ShowFiles {
                        get { return showFiles; }
                        set {
@@ -74,7 +74,7 @@ namespace Crow
                                NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [DefaultValue(false)]
                public virtual bool ShowHidden {
                        get { return showHidden; }
                        set {
@@ -85,7 +85,7 @@ namespace Crow
                                NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("*.*")]
+               [DefaultValue("*.*")]
                public virtual string FileMask {
                        get { return fileMask; }
                        set {
@@ -96,7 +96,7 @@ namespace Crow
                                NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("/")]
+               [DefaultValue("/")]
                public virtual string CurrentDirectory {
                        get { return currentDirectory; }
                        set {
index 1920a8fe202b8e0b10fa2ed08a4b3e97f02002b9..89bec19651634ba67a4672cf26da18e13d3943d6 100644 (file)
@@ -67,7 +67,7 @@ namespace Crow
                }
 
                #region Public properties
-               [XmlAttributeAttribute][DefaultValue("#Crow.Images.Icons.expandable.svg")]
+               [DefaultValue("#Crow.Images.Icons.expandable.svg")]
                public string Image {
                        get { return image; }
                        set {
index 8069b8a7607acee43dd26591858f9a513dfdb9dc..db66ae9effa6471c0b46e09a0bd33bcd172b8e58 100644 (file)
@@ -55,7 +55,7 @@ namespace Crow
                public string SelectedFileFullPath {
                        get { return Path.Combine (SelectedDirectory, SelectedFile); }
                }
-               [XmlAttributeAttribute][DefaultValue("/home")]
+               [DefaultValue("/home")]
                public virtual string CurrentDirectory {
                        get { return curDir; }
                        set {
@@ -67,7 +67,7 @@ namespace Crow
                        }
                }
 
-               [XmlAttributeAttribute][DefaultValue("*")]
+               [DefaultValue("*")]
                public virtual string SearchPattern {
                        get { return searchPattern; }
                        set {
@@ -78,7 +78,7 @@ namespace Crow
 
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [DefaultValue(false)]
                public virtual bool ShowHidden {
                        get { return showHidden; }
                        set {
@@ -88,7 +88,7 @@ namespace Crow
                                NotifyValueChanged ("ShowHidden", showHidden);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(true)]
+               [DefaultValue(true)]
                public virtual bool ShowFiles {
                        get { return showFiles; }
                        set {
@@ -98,7 +98,7 @@ namespace Crow
                                NotifyValueChanged ("ShowFiles", showFiles);
                        }
                }
-               [XmlAttributeAttribute]public string SelectedFile {
+               public string SelectedFile {
                        get { return _selectedFile; }
                        set {
                                if (value == _selectedFile)
@@ -107,7 +107,7 @@ namespace Crow
                                NotifyValueChanged ("SelectedFile", _selectedFile);
                        }
                }
-               [XmlAttributeAttribute]public string SelectedDirectory {
+               public string SelectedDirectory {
                        get { return _selectedDir; }
                        set {
                                if (value == _selectedDir)
index f281311cd97d9c94e1025c0daa4ad5fb35199a7b..50c66c3ec05ed4e5753bd64030a660e2f1defbd8 100644 (file)
@@ -48,7 +48,7 @@ namespace Crow
                #endregion
 
                #region Public Properties
-        [XmlAttributeAttribute()][DefaultValue(2)]
+        [DefaultValue(2)]
         public int Spacing
         {
                        get { return _spacing; }
@@ -60,7 +60,7 @@ namespace Crow
                                RegisterForLayouting (LayoutingType.Sizing|LayoutingType.ArrangeChildren);
                        }
         }
-        [XmlAttributeAttribute()][DefaultValue(Orientation.Horizontal)]
+        [DefaultValue(Orientation.Horizontal)]
         public virtual Orientation Orientation
         {
             get { return _orientation; }
index ec4fa173ba2bcccafc1935ad12c4bfcdaacb1511..f90e06e0fb9bbf56c6ff5c11b26b06bb52a91e20 100644 (file)
@@ -1098,12 +1098,14 @@ namespace Crow
                        DynamicMethod dm = null;
                        ILGenerator il = null;
 
-                       dm = new DynamicMethod("dyn_loadDefValues",
+            /*dm = new DynamicMethod("dyn_loadDefValues",
                                MethodAttributes.Family | MethodAttributes.FamANDAssem | MethodAttributes.NewSlot,
                                CallingConventions.Standard,
-                               typeof(void),new Type[] {CompilerServices.TObject},thisType,true);
+                               typeof(void),new Type[] {CompilerServices.TObject}, thisType, true);*/
 
-                       il = dm.GetILGenerator(256);
+            dm = new DynamicMethod("dyn_loadDefValues", null, new Type[] {CompilerServices.TObject}, thisType, true);
+
+            il = dm.GetILGenerator(256);
                        il.DeclareLocal(CompilerServices.TObject);
                        il.Emit(OpCodes.Nop);
                        //set local GraphicObject to root object passed as 1st argument
@@ -1129,9 +1131,9 @@ namespace Crow
                                                il.Emit (OpCodes.Ldstr, trimed.Substring (1, trimed.Length - 2));
                                                //push null as 3rd arg, currentNode, not known when instanciing
                                                il.Emit (OpCodes.Ldnull);
-                                               il.Emit (OpCodes.Callvirt, CompilerServices.miCompileDynEventHandler);
+                                               il.Emit (OpCodes.Call, CompilerServices.miCompileDynEventHandler);
                                                il.Emit (OpCodes.Castclass, ei.EventHandlerType);
-                                               il.Emit (OpCodes.Callvirt, ei.AddMethod);
+                                               il.Emit (OpCodes.Call, ei.AddMethod);
                                        }else
                                                Debug.WriteLine("error in styling, event not handled : " + trimed);
                                }
index 4ae906a783457b409f77ab3347d2f92450fd27df..71e89bde8ffecfb2e81e850d9e9a5468d3c7d670 100644 (file)
@@ -56,13 +56,13 @@ namespace Crow
                #endregion
 
                #region Public Properties
-        [XmlAttributeAttribute()][DefaultValue(2)]
+        [DefaultValue(2)]
         public int Spacing
         {
                        get { return _spacing; }
             set { _spacing = value; }
         }
-        [XmlAttributeAttribute()][DefaultValue(2)]
+        [DefaultValue(2)]
         public virtual int ColumnCount
         {
             get { return _columnCount; }
@@ -76,7 +76,7 @@ namespace Crow
                                this.RegisterForLayouting (LayoutingType.ArrangeChildren);
                        }
         }
-               [XmlAttributeAttribute()][DefaultValue(2)]
+               [DefaultValue(2)]
                public virtual int RowCount
                {
                        get { return _rowCount; }
index ece1f09036baabe338e5fc44c02d603ac7f5400b..13fdcd49d95821eac52e9c1a02078e227fed22fa 100644 (file)
@@ -84,7 +84,7 @@ namespace Crow
         public virtual List<GraphicObject> Children {
                        get { return children; }
                }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [DefaultValue(false)]
         public bool MultiSelect
         {
             get { return _multiSelect; }
index 67f4ec6ee0b8a0c0381e4f97aec02c1a274a72e6..d8218feeb64b30af95ddcb88a3c87a7577246112 100644 (file)
@@ -44,7 +44,7 @@ namespace Crow
                Orientation _orientation;
                double hue;
 
-               [XmlAttributeAttribute][DefaultValue(Orientation.Horizontal)]
+               [DefaultValue(Orientation.Horizontal)]
                public virtual Orientation Orientation
                {
                        get { return _orientation; }
@@ -56,7 +56,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double Hue {
                        get { return hue; }
                        set {
index 5960101a3a3ea5f3c2d01d9bb157fcbc86540919..21a83f904aa4903abfc0107c09389d783796f14e 100644 (file)
@@ -49,7 +49,7 @@ namespace Crow
                /// <summary>
                /// If false, original size will be kept in any case.
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue(true)]
+               [DefaultValue(true)]
                public virtual bool Scaled {
                        get { return scaled; }
                        set {
@@ -66,7 +66,7 @@ namespace Crow
                /// <summary>
                /// If image is scaled, proportions will be preserved.
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue(true)]
+               [DefaultValue(true)]
                public virtual bool KeepProportions {
                        get { return keepProps; }
                        set {
@@ -83,7 +83,7 @@ namespace Crow
                /// <summary>
                /// Image file path, may be on disk or embedded. Accepts bitmaps or SVG drawings.
                /// </summary>
-        [XmlAttributeAttribute]
+        
                public string Path {
                        get { return _pic == null ? "" : _pic.Path; }
                        set {
@@ -108,7 +108,7 @@ namespace Crow
                /// Used only for svg images, repaint only node named referenced in SvgSub.
                /// If null, all the svg is rendered
                /// </summary>
-               [XmlAttributeAttribute]
+               
                public string SvgSub {
                        get { return _svgSub; }
                        set {
@@ -122,7 +122,7 @@ namespace Crow
                /// Object holding the image data once loaded, may be used directely to pupulate this control without 
                /// specifying a path.
                /// </summary>
-               [XmlAttributeAttribute]
+               
                public Picture Picture {
                        get { return _pic; }
                        set {
@@ -137,7 +137,7 @@ namespace Crow
                /// Opacity parameter for the image
                /// </summary>
                // TODO:could be moved in GraphicObject
-               [XmlAttributeAttribute()][DefaultValue(1.0)]
+               [DefaultValue(1.0)]
                public virtual double Opacity {
                        get { return opacity; }
                        set {
index b3f97a2e7338634ebc231910b0f90396c983809c..c8a436942b1bd485c436bd7f084d63cf023e87b8 100644 (file)
@@ -87,8 +87,7 @@ namespace Crow
                protected TextExtents te;
                #endregion
 
-
-               [XmlAttributeAttribute][DefaultValue("SteelBlue")]
+               [DefaultValue("SteelBlue")]
                public virtual Color SelectionBackground {
                        get { return selBackground; }
                        set {
@@ -99,7 +98,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("White")]
+               [DefaultValue("White")]
                public virtual Color SelectionForeground {
                        get { return selForeground; }
                        set {
@@ -110,7 +109,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(Alignment.Left)]
+               [DefaultValue(Alignment.Left)]
                public Alignment TextAlignment
         {
             get { return _textAlignment; }
@@ -122,7 +121,7 @@ namespace Crow
                                NotifyValueChanged ("TextAlignment", _textAlignment);
                        }
         }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public virtual bool HorizontalStretch {
                        get { return horizontalStretch; }
                        set {
@@ -133,7 +132,7 @@ namespace Crow
                                NotifyValueChanged ("HorizontalStretch", horizontalStretch);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public virtual bool VerticalStretch {
                        get { return verticalStretch; }
                        set {
@@ -144,7 +143,7 @@ namespace Crow
                                NotifyValueChanged ("VerticalStretch", verticalStretch);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("label")]
+               [DefaultValue("label")]
         public string Text
         {
             get {
@@ -167,7 +166,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
             }
         }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool Selectable
                {
                        get { return _selectable; }
@@ -182,7 +181,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool Multiline
                {
                        get { return _multiline; }
@@ -195,7 +194,7 @@ namespace Crow
                                RegisterForGraphicUpdate();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public int CurrentColumn{
                        get { return _currentCol; }
                        set {
@@ -210,7 +209,7 @@ namespace Crow
                                NotifyValueChanged ("CurrentColumn", _currentCol);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public int CurrentLine{
                        get { return _currentLine; }
                        set {
@@ -236,7 +235,7 @@ namespace Crow
                /// <summary>
                /// Selection begin position in char units
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue("-1")]
+               [DefaultValue("-1")]
                public Point SelBegin {
                        get {
                                return _selBegin;
@@ -249,7 +248,7 @@ namespace Crow
                                NotifyValueChanged ("SelectedText", SelectedText);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("-1")]
+               [DefaultValue("-1")]
                public Point SelRelease {
                        get {
                                return _selRelease;
index 0ddb8eaee54cba324aa98137a4813708bf4c0c6d..733962381d22624757c8ceb03f73cef369a8267e 100644 (file)
@@ -41,7 +41,7 @@ namespace Crow
                bool autoOpen = false;
 
                #region Public properties
-               [XmlAttributeAttribute][DefaultValue(Orientation.Horizontal)]
+               [DefaultValue(Orientation.Horizontal)]
                public Orientation Orientation {
                        get { return orientation; }
                        set {
index 3b25a9fe3ac5243222905c5c3f8cf2434d5db175..a9e164d5920f0aab906e0c5185ecda115fb67396 100644 (file)
@@ -85,17 +85,17 @@ namespace Crow
                                NotifyValueChanged ("Command", command);
                        }
                }
-               [XmlAttributeAttribute]
+               
                public override bool IsEnabled {
                        get { return Command == null ? base.IsEnabled : Command.CanExecute; }
                        set { base.IsEnabled = value; }
                }
-               [XmlAttributeAttribute]
+               
                public override string Caption {
                        get { return Command == null ? base.Caption : Command.Caption; }
                        set { base.Caption = value; }
                }
-               [XmlAttributeAttribute]
+               
                public Picture Icon {
                        get { return Command == null ? icon : Command.Icon;; }
                        set {
@@ -106,7 +106,7 @@ namespace Crow
                                        NotifyValueChanged ("Icon", icon);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue("Fit")]
+               [DefaultValue("Fit")]
                public virtual Measure PopWidth {
                        get { return popWidth; }
                        set {
@@ -116,7 +116,7 @@ namespace Crow
                                NotifyValueChanged ("PopWidth", popWidth);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue("Fit")]
+               [DefaultValue("Fit")]
                public virtual Measure PopHeight {
                        get { return popHeight; }
                        set {
index f0eda90f550e58b7e5ef0de576a00fdf4d3990ff..73083311e7b157d647dc1a3566cef5a1574f80f1 100644 (file)
@@ -49,7 +49,7 @@ namespace Crow
                #endregion
 
                #region public properties
-               [XmlAttributeAttribute][DefaultValue(2)]
+               [DefaultValue(2)]
                public int Decimals
                {
                        get { return _decimals; }
@@ -62,7 +62,7 @@ namespace Crow
                                RegisterForGraphicUpdate();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(0.0)]
+               [DefaultValue(0.0)]
                public virtual double Minimum {
                        get { return minValue; }
                        set {
@@ -74,7 +74,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(100.0)]
+               [DefaultValue(100.0)]
                public virtual double Maximum
                {
                        get { return maxValue; }
@@ -87,7 +87,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(1.0)]
+               [DefaultValue(1.0)]
                public virtual double SmallIncrement
                {
                        get { return smallStep; }
@@ -100,7 +100,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(5.0)]
+               [DefaultValue(5.0)]
                public virtual double LargeIncrement
                {
                        get { return bigStep; }
index 1186e8e727ba1de76a9eb54ede1fca49bef52333..89c0fa5a4a79d35ff84027cde01e9cecc62ed43c 100644 (file)
@@ -46,7 +46,7 @@ namespace Crow
                public event EventHandler Unpoped;
 
                #region Public Properties
-               [XmlAttributeAttribute()][DefaultValue("Fit")]
+               [DefaultValue("Fit")]
                public virtual Measure PopWidth {
                        get { return popWidth; }
                        set {
@@ -56,7 +56,7 @@ namespace Crow
                                NotifyValueChanged ("PopWidth", popWidth);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue("Fit")]
+               [DefaultValue("Fit")]
                public virtual Measure PopHeight {
                        get { return popHeight; }
                        set {
@@ -66,7 +66,7 @@ namespace Crow
                                NotifyValueChanged ("PopHeight", popHeight);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool IsPopped
                {
                        get { return _isPopped; }
@@ -89,7 +89,7 @@ namespace Crow
 
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(true)]
+               [DefaultValue(true)]
                public bool CanPop
                {
                        get { return _canPop; }
@@ -102,7 +102,7 @@ namespace Crow
                                NotifyValueChanged ("CanPop", _canPop);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(Alignment.Bottom)]
+               [DefaultValue(Alignment.Bottom)]
                public virtual Alignment PopDirection {
                        get { return popDirection; }
                        set {
index 4c553481bc89acba2f392767c01d06d725b9ee80..d18971a27ae3f550e9d528f0630fd65b84f77428 100644 (file)
@@ -60,7 +60,7 @@ namespace Crow
                }
                #endregion
 
-        [XmlAttributeAttribute()][DefaultValue(false)]
+        [DefaultValue(false)]
         public bool IsChecked
         {
                        get { return isChecked; }
index 485a33d2e027615e971bc4da3f22fecba21bfc36..5a25d6a22f21b145698a572529f46ba78a99940f 100644 (file)
@@ -40,7 +40,7 @@ namespace Crow
 
                double v, s;
 
-               [XmlAttributeAttribute()]
+               
                public virtual double V {
                        get { return v; }
                        set {
@@ -53,7 +53,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()]
+               
                public virtual double S {
                        get { return s; }
                        set {
index f7f0307307f14c95ddeb9993d85b07a25af7488f..8f777b645dc0b15e73bb7cbd1ebd866771a9fb8e 100644 (file)
@@ -45,7 +45,7 @@ namespace Crow
                public ScrollBar(Interface iface) : base(iface) {}
                #endregion
 
-               [XmlAttributeAttribute()][DefaultValue(Orientation.Vertical)]
+               [DefaultValue(Orientation.Vertical)]
                public virtual Orientation Orientation
                {
                        get { return _orientation; }
@@ -61,7 +61,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(20)]
+               [DefaultValue(20)]
                public virtual int CursorSize {
                        get { return _cursorSize; }
                        set {
index 4f2707254535b359aeb5b6b169521983703eecfe..16f6556de99f34bd3c46b27a15aac9e97fe1aa2d 100644 (file)
@@ -53,7 +53,7 @@ namespace Crow
 
                #region public properties
                /// <summary> Horizontal Scrolling Position </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int ScrollX {
                        get { return scrollX; }
                        set {
@@ -76,7 +76,7 @@ namespace Crow
                        }
                }
                /// <summary> Vertical Scrolling Position </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int ScrollY {
                        get { return scrollY; }
                        set {
@@ -99,7 +99,7 @@ namespace Crow
                        }
                }
                /// <summary> Horizontal Scrolling maximum value </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int MaxScrollX {
                        get { return maxScrollX; }
                        set {
@@ -116,7 +116,7 @@ namespace Crow
                        }
                }
                /// <summary> Vertical Scrolling maximum value </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int MaxScrollY {
                        get { return maxScrollY; }
                        set {
@@ -133,7 +133,7 @@ namespace Crow
                        }
                }
                /// <summary> Mouse Wheel Scrolling multiplier </summary>
-               [XmlAttributeAttribute][DefaultValue(50)]
+               [DefaultValue(50)]
                public virtual int ScrollSpeed {
                        get { return scrollSpeed; }
                        set {
index 855ac0e32097b58bd1b9cef19cbf425cf0639791..bc57b3209d3cc083521cdf930d34cfd6c02a7947 100644 (file)
@@ -52,7 +52,7 @@ namespace Crow
                protected bool KeyEventsOverrides = false;
 
                /// <summary> Horizontal Scrolling Position </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int ScrollX {
                        get { return scrollX; }
                        set {
@@ -75,7 +75,7 @@ namespace Crow
                        }
                }
                /// <summary> Vertical Scrolling Position </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int ScrollY {
                        get { return scrollY; }
                        set {
@@ -98,7 +98,7 @@ namespace Crow
                        }
                }
                /// <summary> Horizontal Scrolling maximum value </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int MaxScrollX {
                        get { return maxScrollX; }
                        set {
@@ -115,7 +115,7 @@ namespace Crow
                        }
                }
                /// <summary> Vertical Scrolling maximum value </summary>
-               [XmlAttributeAttribute][DefaultValue(0)]
+               [DefaultValue(0)]
                public virtual int MaxScrollY {
                        get { return maxScrollY; }
                        set {
@@ -132,7 +132,7 @@ namespace Crow
                        }
                }
                /// <summary> Mouse Wheel Scrolling multiplier </summary>
-               [XmlAttributeAttribute][DefaultValue(1)]
+               [DefaultValue(1)]
                public virtual int MouseWheelSpeed {
                        get { return mouseWheelSpeed; }
                        set {
index a4b3193e8eb54f8e1048740dd2cdf197e805e56f..eb52a06a933474bb5b1c291a383781661a563582 100644 (file)
@@ -75,7 +75,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(1.0)]
+               [DefaultValue(1.0)]
                public double StokeWidth {
                        get { return strokeWidth; }
                        set {
index 3a12b784c80cca6b845d0650117eeb001c16f6c5..8fb7bb77485d0f9f2e599d6fe4352c2f5e8cab4a 100644 (file)
@@ -43,7 +43,7 @@ namespace Crow
 
                int thickness;
 
-               [XmlAttributeAttribute][DefaultValue(1)]
+               [DefaultValue(1)]
                public virtual int Thickness {
                        get { return thickness; }
                        set {
index 54991a415960e24b1e85080c36cfdb12302f49f4..a1a11b2220075f459d5f0299341c0a9d0ca4fb8f 100644 (file)
@@ -69,7 +69,7 @@ namespace Crow
                /// Template path
                /// </summary>
                //TODO: this property should be renamed 'TemplatePath'
-               [XmlAttributeAttribute][DefaultValue(null)]
+               [DefaultValue(null)]
                public string Template {
                        get { return _template; }
                        set {
@@ -86,7 +86,7 @@ namespace Crow
                /// <summary>
                /// a caption being recurrent need in templated widget, it is declared here.
                /// </summary>
-               [XmlAttributeAttribute()][DefaultValue("Templated Control")]
+               [DefaultValue("Templated Control")]
                public virtual string Caption {
                        get { return caption; }
                        set {
index 4d236dab2c66b1098fdd21ff513ffe0df63bd72c..dd9afb6c65f365d5f42a61bd8eb4222ca9fd2689 100644 (file)
@@ -97,7 +97,7 @@ namespace Crow
                /// ItemTemplate enclosing tag, or several item templates each enclosed
                /// in a separate tag.
                /// </summary>
-               [XmlAttributeAttribute]
+               
                public string ItemTemplate {
                        get { return _itemTemplate; }
                        set {
@@ -128,7 +128,7 @@ namespace Crow
                /// Other possible values are properties of Data
                /// </summary>
                /// <value>The data property test.</value>
-               [XmlAttributeAttribute][DefaultValue("TypeOf")]
+               [DefaultValue("TypeOf")]
                public string DataTest {
                        get { return dataTest; }
                        set {
@@ -188,7 +188,7 @@ namespace Crow
                [XmlIgnore]public bool HasItems {
                        get { return Items.Count > 0; }
                }
-               [XmlAttributeAttribute]public IList Data {
+               public IList Data {
                        get { return data; }
                        set {
                                if (value == data)
@@ -250,7 +250,7 @@ namespace Crow
                                loadItem (e.Element, items, dataTest);
                }
 
-               [XmlAttributeAttribute][DefaultValue("SteelBlue")]
+               [DefaultValue("SteelBlue")]
                public virtual Color SelectionBackground {
                        get { return selBackground; }
                        set {
@@ -261,7 +261,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue("White")]
+               [DefaultValue("White")]
                public virtual Color SelectionForeground {
                        get { return selForeground; }
                        set {
index 17e3b7701f871e3e30cf552d086a545300bef08a..297ffe956272a089ca7024586cd193939d6fa0eb 100644 (file)
@@ -61,13 +61,13 @@ namespace Crow
                #endregion
 
 
-               [XmlAttributeAttribute ()]
+               
                [DefaultValue (Alignment.Left)]
                public Alignment TextAlignment {
                        get { return _textAlignment; }
                        set { _textAlignment = value; }
                }
-               [XmlAttributeAttribute ()]
+               
                [DefaultValue (false)]
                public virtual bool HorizontalStretch {
                        get { return horizontalStretch; }
@@ -79,7 +79,7 @@ namespace Crow
                                NotifyValueChanged ("HorizontalStretch", horizontalStretch);
                        }
                }
-               [XmlAttributeAttribute ()]
+               
                [DefaultValue (false)]
                public virtual bool VerticalStretch {
                        get { return verticalStretch; }
@@ -91,7 +91,7 @@ namespace Crow
                                NotifyValueChanged ("VerticalStretch", verticalStretch);
                        }
                }
-               [XmlAttributeAttribute ()]
+               
                [DefaultValue ("label")]
                public string Text {
                        get {
@@ -112,7 +112,7 @@ namespace Crow
                                lines = getLines;
                        }
                }
-               [XmlAttributeAttribute ()]
+               
                [DefaultValue (false)]
                public bool Multiline {
                        get { return _multiline; }
@@ -121,7 +121,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute ()]
+               
                [DefaultValue (false)]
                public bool WordWrap {
                        get {
index 12a99fb3619d756c701cc11bc10c21b893b194ed..5a5e7144b3582b007b8956ae780792ee311712d8 100644 (file)
@@ -45,7 +45,7 @@ namespace Crow
                }
                #endregion
 
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [DefaultValue(false)]
                public virtual bool IsRoot {
                        get { return isRoot; }
                        set {
index 10c5422c03accd22b4b96f56f2a147781968f256..a2e0c838bfbb3cc2e44528a098c18c58c21d114e 100644 (file)
@@ -60,7 +60,7 @@ namespace Crow
                                AddValue (value);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(400)]
+               [DefaultValue(400)]
                public virtual int NbValues {
                        get { return nbValues; }
                        set {
@@ -72,7 +72,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(0.0)]
+               [DefaultValue(0.0)]
                public virtual double Minimum {
                        get { return minValue; }
                        set {
@@ -84,7 +84,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(100.0)]
+               [DefaultValue(100.0)]
                public virtual double Maximum
                {
                        get { return maxValue; }
@@ -97,7 +97,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(1.0)]
+               [DefaultValue(1.0)]
                public virtual double LowThreshold {
                        get { return lowThreshold; }
                        set {
@@ -108,7 +108,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(80.0)]
+               [DefaultValue(80.0)]
                public virtual double HighThreshold {
                        get { return highThreshold; }
                        set {
@@ -119,7 +119,7 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue("DarkRed")]
+               [DefaultValue("DarkRed")]
                public virtual Fill LowThresholdFill {
                        get { return lowThresholdFill; }
                        set {
@@ -130,7 +130,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue("DarkGreen")]
+               [DefaultValue("DarkGreen")]
                public virtual Fill HighThresholdFill {
                        get { return highThresholdFill; }
                        set {
index 9650e6858d58d985e2fb1db00bd70d6ccb824c5b..cf0a251a6fe39a10afa31de57216c462c1928f67 100644 (file)
@@ -43,7 +43,7 @@ namespace Crow
         }
                #endregion
 
-        [System.Xml.Serialization.XmlIgnore]
+        [XmlIgnore]
         public override Orientation Orientation
         {
             get { return Orientation.Vertical; }            
index 56632ff3a8e2fcab5af7c31b4107e1c2d67c5283..051ecbde5796612837dc270d1e459b5755f692bc 100644 (file)
@@ -84,7 +84,7 @@ namespace Crow
                #endregion
 
                #region public properties
-               [XmlAttributeAttribute][DefaultValue("#Crow.Images.Icons.crow.png")]
+               [DefaultValue("#Crow.Images.Icons.crow.png")]
                public string Icon {
                        get { return _icon; } 
                        set {
@@ -97,7 +97,7 @@ namespace Crow
                /// <summary>
                /// Background of the title bar if any.
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue("vgradient|0:Onyx|1:SteelBlue")]
+               [DefaultValue("vgradient|0:Onyx|1:SteelBlue")]
                public virtual Fill TitleBarBackground {
                        get { return titleBarBackground; }
                        set {
@@ -111,7 +111,7 @@ namespace Crow
                /// <summary>
                /// Foreground of the title bar, usualy used for the window caption color.
                /// </summary>
-               [XmlAttributeAttribute][DefaultValue("White")]
+               [DefaultValue("White")]
                public virtual Fill TitleBarForeground {
                        get { return titleBarForeground; }
                        set {
@@ -122,7 +122,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(true)]
+               [DefaultValue(true)]
                public bool Resizable {
                        get {
                                return resizable;
@@ -134,7 +134,7 @@ namespace Crow
                                NotifyValueChanged ("Resizable", resizable);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(true)]
+               [DefaultValue(true)]
                public bool Movable {
                        get {
                                return movable;
@@ -146,7 +146,7 @@ namespace Crow
                                NotifyValueChanged ("Movable", movable);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool Modal {
                        get {
                                return modal;
@@ -158,7 +158,7 @@ namespace Crow
                                NotifyValueChanged ("Modal", modal);
                        }
                }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool IsMinimized {
                        get { return _minimized; }
                        set{
@@ -177,7 +177,7 @@ namespace Crow
                [XmlIgnore]public bool IsNormal {
                        get { return !(IsMaximized|_minimized); }
                }
-               [XmlAttributeAttribute][DefaultValue(false)]
+               [DefaultValue(false)]
                public bool AlwaysOnTop {
                        get {
                                return modal ? true : alwaysOnTop;
@@ -194,7 +194,7 @@ namespace Crow
                                NotifyValueChanged ("AlwaysOnTop", AlwaysOnTop);
                        }
                }
-//             [XmlAttributeAttribute()][DefaultValue(WindowState.Normal)]
+//             [DefaultValue(WindowState.Normal)]
 //             public virtual WindowState State {
 //                     get { return _state; }
 //                     set {
diff --git a/src/GraphicObjects/XmlIgnoreAttribute.cs b/src/GraphicObjects/XmlIgnoreAttribute.cs
new file mode 100644 (file)
index 0000000..29e5bf6
--- /dev/null
@@ -0,0 +1,34 @@
+//
+// Expandable.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+
+namespace Crow
+{
+    public class XmlIgnoreAttribute : Attribute
+    {
+    }
+}
\ No newline at end of file
index 4a2b2c61db54cbbe3df58c2cc2e62fbcb5b74b41..47cba5fc8197ba3dade4ae546d21ebb4899117e1 100644 (file)
@@ -133,7 +133,7 @@ namespace Crow.IML
                                il.Emit (OpCodes.Brfalse, nextLogicParent);
                        } else if (LevelsUp > 0) {//go upward in logical tree
                                il.Emit (OpCodes.Ldc_I4, LevelsUp);//push arg 2 of goUpLevels
-                               il.Emit (OpCodes.Callvirt, CompilerServices.miGoUpLevels);
+                               il.Emit (OpCodes.Call, CompilerServices.miGoUpLevels);
                                //test if null
                                il.Emit (OpCodes.Dup);
                                il.Emit (OpCodes.Brfalse, cancel);
index aa4dee2f768f6bdd0b9d9e4590ee715e964fdc0e..6042e6daec3ae5f7185c8cc8d58e7b790f4bb2ae 100644 (file)
@@ -175,7 +175,7 @@ namespace Crow.IML
                        il.Emit(OpCodes.Ldfld, CompilerServices.fiCachedDel);
                        il.Emit(OpCodes.Ldc_I4, index);//load delegate index
                        il.Emit(OpCodes.Callvirt, CompilerServices.miGetDelegateListItem);
-                       il.Emit(OpCodes.Callvirt, evt.AddMethod);//call add event
+                       il.Emit(OpCodes.Call, evt.AddMethod);//call add event
                }
                /// <summary>
                /// Emits the handler method addition, done at end of parsing, Loc_0 is root node instance
@@ -204,8 +204,8 @@ namespace Crow.IML
                        il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);
                        //load methodInfo (3rd arg)
                        il.Emit (OpCodes.Ldstr, membs[membs.Length-1]);
-                       il.Emit (OpCodes.Callvirt, CompilerServices.miCreateDel);
-                       il.Emit (OpCodes.Callvirt, bd.SourceEvent.AddMethod);//call add event
+                       il.Emit (OpCodes.Call, CompilerServices.miCreateDel);
+                       il.Emit (OpCodes.Call, bd.SourceEvent.AddMethod);//call add event
                }
 //             public void emitHandlerMethodAddition(EventBinding bd){
 //                     //fetch source instance with address for handler addition (as 1st arg of handler.add)
index 7a0c8405d5b6075d87e9fdc47b57f03f86fab05b..72440b6c2e3f5f09c5ba78051d131972ca0f1b4b 100644 (file)
@@ -28,7 +28,7 @@ using System.Collections.Generic;
 
 namespace Crow.IML2
 {
-       public class Reader : XmlTextReader
+       public class Reader : XmlReader
        {               
                static List<Type> CrowTypes = new List<Type> ();
 
@@ -93,6 +93,7 @@ namespace Crow.IML2
                        il.Emit(OpCodes.Ret);
                        loader = (InstanciatorInvoker)dm.CreateDelegate (typeof(InstanciatorInvoker));
                        return loader;
+            XmlReader r = XmlReader.Create("test.xml");
                }
 
                protected int curDepth {
index cf883f13b4f4088047ca5982103d7c313b1e6c2a..6874109424dd3367452aaf638a035b492b58c8c5 100644 (file)
@@ -28,9 +28,6 @@
 #endregion
 
 using System;
-#if !MINIMAL
-using System.Drawing;
-#endif
 
 namespace Crow
 {
index 001832b108ca79997f9bb4a970688498657e66ff..c59043b80a246e618ddbfc14ceecbe20ee7b12fa 100644 (file)
@@ -198,7 +198,7 @@ namespace Crow.IML
 
                        emitBindingDelegates (ctx);
 
-                       ctx.il.Emit (OpCodes.Ldloc_0);//load root obj to return
+            ctx.il.Emit (OpCodes.Ldloc_0);//load root obj to return
                        ctx.il.Emit(OpCodes.Ret);
 
                        reader.Read ();//close tag
@@ -437,9 +437,10 @@ namespace Crow.IML
                                                #endif
                                        }
                                }
-                               ctx.il.Emit (OpCodes.Ldloc_0);
-                               ctx.il.Emit (OpCodes.Callvirt, CompilerServices.miLoadDefaultVals);
-                               #endregion
+                ctx.il.Emit (OpCodes.Ldloc_0);
+                ctx.il.Emit (OpCodes.Callvirt, CompilerServices.miLoadDefaultVals);
+                #endregion
+
 
                                #region Attributes reading
                                if (reader.HasAttributes) {
@@ -492,7 +493,7 @@ namespace Crow.IML
                /// <summary>
                /// Parse child node an generate corresponding msil
                /// </summary>
-               void readChildren (XmlTextReader reader, IMLContext ctx, int startingIdx = 0)
+               void readChildren (XmlReader reader, IMLContext ctx, int startingIdx = 0)
                {
                        bool endTagReached = false;
                        int nodeIdx = startingIdx;
@@ -622,6 +623,7 @@ namespace Crow.IML
 
                                emitRemoveOldDataSourceHandler (il, sourceEvent.Name, bindingDef.TargetMember, false);
 
+
                                //fetch method in datasource and test if it exist
                                il.Emit (OpCodes.Ldarg_2);//load new datasource
                                il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
@@ -630,28 +632,27 @@ namespace Crow.IML
                                il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
                                il.Emit (OpCodes.Ldstr, bindingDef.TargetMember);//load handler method name
                                il.Emit (OpCodes.Call, CompilerServices.miGetMethInfoWithRefx);
-                               il.Emit (OpCodes.Stloc_0);//save MethodInfo
-                               il.Emit (OpCodes.Ldloc_0);//push mi for test if null
-
-                               il.Emit (OpCodes.Brfalse, cancel);
-
-                               il.Emit (OpCodes.Ldarg_1);//load datasource change source where the event is as 1st arg of handler.add
-                               if (bindingDef.IsTemplateBinding)//fetch source instance with address
-                                       CompilerServices.emitGetInstance (il, bindingDef.SourceNA);
-
-                               //load handlerType of sourceEvent to create delegate (1st arg)
-                               il.Emit (OpCodes.Ldtoken, sourceEvent.EventHandlerType);
-                               il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);
-                               il.Emit (OpCodes.Ldarg_2);//load new datasource where the method is defined
-                               il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
-                               il.Emit (OpCodes.Ldloc_0);//load methodInfo (3rd arg)
-
-                               il.Emit (OpCodes.Callvirt, CompilerServices.miCreateBoundDel);
-                               il.Emit (OpCodes.Callvirt, sourceEvent.AddMethod);//call add event
-
-                               System.Reflection.Emit.Label finish = il.DefineLabel ();
-                               il.Emit (OpCodes.Br, finish);
-                               il.MarkLabel (cancel);
+                               il.Emit (OpCodes.Stloc_0);//save MethodInfo                                          
+                il.Emit (OpCodes.Ldloc_0);//push mi for test if null
+                il.Emit (OpCodes.Brfalse, cancel);//cancel if null
+
+                il.Emit (OpCodes.Ldarg_1);//load datasource change source where the event is as 1st arg of handler.add
+                if (bindingDef.IsTemplateBinding)//fetch source instance with address
+                    CompilerServices.emitGetInstance (il, bindingDef.SourceNA);
+
+                //load handlerType of sourceEvent to create delegate (1st arg)
+                il.Emit (OpCodes.Ldtoken, sourceEvent.EventHandlerType);
+                il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);
+                il.Emit (OpCodes.Ldarg_2);//load new datasource where the method is defined
+                il.Emit (OpCodes.Ldfld, CompilerServices.fiDSCNewDS);
+                il.Emit (OpCodes.Ldloc_0);//load methodInfo (3rd arg)
+
+                il.Emit (OpCodes.Call, CompilerServices.miCreateBoundDel);
+                il.Emit (OpCodes.Call, sourceEvent.AddMethod);//call add event
+                                          
+                System.Reflection.Emit.Label finish = il.DefineLabel ();
+                il.Emit (OpCodes.Br, finish);
+                il.MarkLabel (cancel);
                                #if DEBUG_BINDING
                                il.EmitWriteLine (string.Format ("Handler method '{0}' for '{1}' NOT FOUND in new dataSource", bindingDef.TargetMember, sourceEvent.Name));
                                #endif
@@ -659,6 +660,7 @@ namespace Crow.IML
                                #if DEBUG_BINDING
                                il.EmitWriteLine (string.Format ("Handler method '{0}' for '{1}' FOUND in new dataSource", bindingDef.TargetMember, sourceEvent.Name));
                                #endif
+                                              
                                il.Emit (OpCodes.Ret);
 
                                //store dschange delegate in instatiator instance for access while instancing graphic object
@@ -717,7 +719,7 @@ namespace Crow.IML
 
                                il.Emit (OpCodes.Ldstr, bindingCase.Key);//load name to test
                                il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
-                               il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+                               il.Emit (OpCodes.Call, CompilerServices.stringEquals);
                                il.Emit (OpCodes.Brfalse, nextTest);//if not equal, jump to next case
                                #endregion
 
@@ -851,7 +853,7 @@ namespace Crow.IML
 
                                il.Emit (OpCodes.Ldstr, bindingCase.Key);//load name to test
                                il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
-                               il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+                               il.Emit (OpCodes.Call, CompilerServices.stringEquals);
                                il.Emit (OpCodes.Brfalse, nextTest);//if not equal, jump to next case
                                #endregion
 
@@ -928,7 +930,7 @@ namespace Crow.IML
                        ilPC.Emit(OpCodes.Ldfld, CompilerServices.fiTemplateBinding);
 
                        //add template bindings dynValueChanged delegate to new parent event
-                       ilPC.Emit(OpCodes.Callvirt, CompilerServices.eiValueChange.AddMethod);//call add event
+                       ilPC.Emit(OpCodes.Call, CompilerServices.eiValueChange.AddMethod);//call add event
 
                        ilPC.MarkLabel (cancel);
                        ilPC.Emit (OpCodes.Ret);
@@ -972,7 +974,7 @@ namespace Crow.IML
                                //test if it's the expected one
                                il.Emit (OpCodes.Ldstr, bindingDef.TargetMember);
                                il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
-                               il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+                               il.Emit (OpCodes.Call, CompilerServices.stringEquals);
                                il.Emit (OpCodes.Brfalse, endMethod);
                                //set destination member with valueChanged new value
                                //load destination ref
@@ -1149,7 +1151,7 @@ namespace Crow.IML
                        //test if it's the expected one
                        il.Emit (OpCodes.Ldstr, origMember);
                        il.Emit (OpCodes.Ldc_I4_4);//StringComparison.Ordinal
-                       il.Emit (OpCodes.Callvirt, CompilerServices.stringEquals);
+                       il.Emit (OpCodes.Call, CompilerServices.stringEquals);
                        il.Emit (OpCodes.Brfalse, endMethod);
                        //set destination member with valueChanged new value
                        //load destination ref
index d1d46e8a35f1e002a3c8e71e499fbcc7478b87f8..de4df99e4895e38167606f83eef6c6e6a6efd236 100644 (file)
@@ -81,9 +81,9 @@ namespace Crow
 
                #region CTOR
                static Interface(){
-                       if (Type.GetType ("Mono.Runtime") == null) {
+                       /*if (Type.GetType ("Mono.Runtime") == null) {
                                throw new Exception (@"C.R.O.W. run only on Mono, download latest version at: http://www.mono-project.com/download/stable/");
-                       }
+                       }*/
 
                        CrowConfigRoot =
                                System.IO.Path.Combine(
@@ -129,8 +129,8 @@ namespace Crow
                        Keyboard.KeyUp += Keyboard_KeyUp;
                        Keyboard.KeyPress += Keyboard_KeyPress;
 
-                       initTooltip ();
-                       initContextMenus ();
+                       //initTooltip ();
+                       //initContextMenus ();
 
                        running = true;
 
index dda9d15279b40c27d7fe823d9ee193f2e14dcc62..fc893718b429a22355cf1c73318cef7403f740b7 100644 (file)
@@ -222,7 +222,7 @@ namespace Crow
                                        //dynamically and fetch
 
                                        il.Emit (OpCodes.Ldstr, fetchMethodName);
-                                       il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataTypeAndFetch);
+                                       il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
                                }else
                                        emitGetSubData(il, dataType);                   
                        }
@@ -259,7 +259,7 @@ namespace Crow
                                        //dynamically and fetch
 
                                        il.Emit (OpCodes.Ldstr, fetchMethodName);
-                                       il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataTypeAndFetch);
+                                       il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
                                }else
                                        emitGetSubData(il, dataType);                   
                        }
index 6c932f08edc2ca4923ade13375c0bbd91a7902d8..30c71c0fc7643af3953b17cb54d30281aa3ad8fe 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Antialias.cs
 //
 // Authors:
@@ -32,7 +32,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum Antialias
        {
                Default,
index a88d35a9320f08510f905a5cb9869eeab2798dda..a45370ff1b2b1a54e379b79e946fb9194a1b4496 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Content.cs
 //
 // Authors:
@@ -33,7 +33,7 @@ using System;
 namespace Cairo
 {
        //[Flags]
-       [Serializable]
+       
        public enum Content
        {
                Color = 0x1000,
index 74c2e444b6f2465835f1911fa05259b212634c3e..d428b42cc47c8cd5691a3602fa3f5515a6507125 100644 (file)
@@ -37,7 +37,6 @@
 using System;
 using System.Runtime.InteropServices;
 using System.Text;
-using Cairo;
 using Color = Crow.Color;
 
 namespace Cairo {      
@@ -68,7 +67,9 @@ namespace Cairo {
                        //
                        int ptr_size = Marshal.SizeOf (typeof (IntPtr));
 
-                       PlatformID platform = Environment.OSVersion.Platform;
+                       /*PlatformID platform = Environment.OSVersion.Platform;
+            RuntimeInformation.IsOSPlatform(OSPlatform.Linux); 
+            RuntimeInformation.OSArchitecture.HasFlag(Architecture.);
                        if (platform == PlatformID.Win32NT ||
                            platform == PlatformID.Win32S ||
                            platform == PlatformID.Win32Windows ||
@@ -76,10 +77,10 @@ namespace Cairo {
                            ptr_size == 4){
                                c_compiler_long_size = 4;
                                native_glyph_size = Marshal.SizeOf (typeof (NativeGlyph_4byte_longs));
-                       } else {
+                       } else {*/
                                c_compiler_long_size = 8;
                                native_glyph_size = Marshal.SizeOf (typeof (Glyph));
-                       }
+                       //}
                }
 
                public Context (Surface surface) : this (NativeMethods.cairo_create (surface.Handle), true)
index 06715bc9e99aa9d3fde6fb5cf98e573702fb86c9..a5452f9d660b3061de158120ef5cee5ebf6e85c0 100644 (file)
@@ -64,7 +64,7 @@ namespace Cairo
                }
                public string Status {
                        get {
-                               return  System.Runtime.InteropServices.Marshal.PtrToStringAuto(NativeMethods.cairo_status_to_string (NativeMethods.cairo_device_status (handle)));
+                return ""; //System.Runtime.InteropServices.Marshal.PtrToStringAuto(NativeMethods.cairo_status_to_string (NativeMethods.cairo_device_status (handle)));
                        }
                }
                public void SetThreadAware (bool value){
index 0ffee3fbfa1c321032b436444f65f59405353c5a..1135c2ff3c917b84d3bab835a179e4b91e6fff48 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Extend.cs
 //
 // Authors:
@@ -34,7 +34,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum Extend
        {
                None,
index 6d8c06262717c01e30d1cf937f5ad85f5d2815b1..24cbfba2b4065da8ca1916fedc8124497c9db00f 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.FillRule.cs
 //
 // Authors:
@@ -32,7 +32,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum FillRule
        {
                Winding,
index d602ed7d63831ecc3930ae7de1183509a453fe26..2355fbb313b51030986e07d7c736a27a119640a2 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Filter.cs
 //
 // Authors:
@@ -32,7 +32,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum Filter
        {
                Fast,
index c4e1af78f2090d1a16dc374ea9afd166d7b2c756..b7a5684cddfdca3e944e28d48738f2ecd9745dc3 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.FontSlant.cs
 //
 // Authors:
@@ -32,7 +32,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum FontSlant
        {
                Normal,
index 0c71fcb2c3b32aca8dd65d5e04149e6a5814933d..e9fd263a4fc505d826e48b112e34d543238c7b4d 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.FontType.cs
 //
 // Authors:
@@ -30,7 +30,7 @@ using System;
 
 namespace Cairo {
 
-       [Serializable]
+       
        public enum FontType
        {
                Toy,
index 9d1927d8d1b6ea53c8adcff608156fc7643f8b17..5b7810957ab5898f5bddc96f3ea46627615470f1 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.FontWeight.cs
 //
 // Authors:
@@ -32,7 +32,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum FontWeight
        {
                Normal,
index f0bded3c5389f013aaad3c9dfb5e0f4a90e172fe..96e9a0f577f47fe5371530014d5e405287a23769 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Format.cs
 //
 // Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum Format
        {
                Argb32  = 0,
index d43414240454e2d9d0a156469c14402b0e738fdf..3bf01d23da661380150b998a09a60b09dfe76d83 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.HintMetrics.cs
 //
 // Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum HintMetrics
        {
                Default,
index bb848206e73d5522331c7941e07ec64aa28e58a1..b8cca97469a673c0a72030c08f20a3bdf85b9f85 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.HintStyle.cs
 //
 // Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum HintStyle
        {
                Default,
index 57cfdec2147820e5fdf7fe3d9589b94489cffa89..46938c25bf4020d9bd746f28b5c6a2d19ffbbb8e 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.LineCap.cs
 //
 // Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum LineCap
        {
                Butt,
index 439b2a517489ea7010e314c8275bb65671702ea0..b5c241b0b1fe42fa615eaeccee6c24374145690b 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.LineJoin.cs
 //
 // Authors: Duncan Mak (duncan@ximian.com)
@@ -31,7 +31,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum LineJoin
        {
                Miter,
index 83ffce49d2b2663c06239614fbf12535fd2546fd..12f0cb92977217f0862544dcc8bd2c14ae2c28ba 100644 (file)
@@ -37,7 +37,7 @@ using System.Runtime.InteropServices;
 namespace Cairo {
 
        [StructLayout(LayoutKind.Sequential)]
-       public class Matrix : ICloneable
+       public class Matrix //: ICloneable
        {
                public double Xx;
                public double Yx;
index 24384fe7da1777a2e564433f819cf9e525476ff3..1bcdaa651c6592ef5b1b31f6985b9e1603da5fae 100644 (file)
@@ -44,13 +44,13 @@ namespace Cairo
 #if MONOTOUCH
                const string cairo = "__Internal";
 #else
-               const string cairo = "libcairo-2.dll";
+    const string cairo = "cairo";
 #endif
 
-               //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
-               //internal static extern void cairo_append_path (IntPtr cr, Path path);
+        //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+        //internal static extern void cairo_append_path (IntPtr cr, Path path);
 
-               [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+        [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
                internal static extern void cairo_arc (IntPtr cr, double xc, double yc, double radius, double angle1, double angle2);
 
                [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
index 918132ef289e7ad0f4d7aa4c2fcc0776ac65741c..f233a25f195af292e5fccbb52f3678cc8c47b5ce 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Operator.cs
 //
 // Authors: Duncan Mak (duncan@ximian.com)
@@ -33,7 +33,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum Operator
        {
                Clear,
index 8fe2d85d8c724d784bface8fbe96a1a95d814cfa..f9b9523a0ab07ab351fd6e86f4978f083573a161 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.PatternType.cs
 //
 // Authors:
@@ -30,7 +30,7 @@ using System;
 
 namespace Cairo {
 
-       [Serializable]
+       
        public enum PatternType
        {
                Solid,
index 6e5fbe015600c3a32e2bda358f81a0eb38805b6b..54b2fec3ba829eace2d9579ea5148970f8c86450 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Status.cs
 //
 // Authors:
@@ -34,7 +34,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum Status
        {
                Success = 0,
index e8ab65813098042748ef97767b1f55c8a8abaee9..3c3a336227ad720d610460f3c8c2ec98313a69c1 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.Cairo.cs
 //
 // Authors:
@@ -30,7 +30,7 @@ using System;
 
 namespace Cairo
 {
-       [Serializable]
+       
        public enum SubpixelOrder
        {
                Default,
index e7a2a5e47aee04cde3cf5140ffa30e131ca99f80..14f4a2b147852029dc00e4d6543bcb9976015f20 100644 (file)
@@ -40,9 +40,6 @@ namespace Cairo {
 
        public class Surface : IDisposable
        {
-               [Obsolete]
-               protected static Hashtable surfaces = new Hashtable ();
-
                IntPtr handle = IntPtr.Zero;
 
                [Obsolete]
index ae86d134c3a2f9c18d194413276199cc0be83b34..b0b659c6221fc57c92ffe99bb641a06a980d67a4 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.SurfaceType.cs
 //
 // Authors:
@@ -30,7 +30,7 @@ using System;
 
 namespace Cairo {
 
-       [Serializable]
+       
        public enum SurfaceType
        {
                Image,
index 99cee28962c4cdd515472b7dc49ac59570224d8d..7f0f4620f3a7b5904a51e759e5a03d85fa984d5a 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Mono.Cairo.SvgVersion.cs
 //
 // Authors:
@@ -30,7 +30,7 @@ using System;
 
 namespace Cairo {
 
-       [Serializable]
+       
        public enum SvgVersion
        {
                // FIXME: yuck
index 6175efc7b71bbaeab0bb34e1def84d6cd9fc8d09..08dd4436b9f1adc72a6ce3726265ccce7540af64 100644 (file)
@@ -66,14 +66,6 @@ namespace Crow
         {
             return new Cairo.PointD(p.X, p.Y);
         }
-        public static implicit operator System.Drawing.Point(Point p)
-        {
-            return new System.Drawing.Point(p.X, p.Y);
-        }
-        public static implicit operator Point(System.Drawing.Point p)
-        {
-            return new Point(p.X, p.Y);
-        }
         public static implicit operator Point(int i)
         {
             return new Point(i, i);
index 7ceff5be58a581003f1583d683e769b7f35edaf7..5e43e006cae1744dfae7002c7ca7dcb0f9900669 100644 (file)
@@ -1,4 +1,4 @@
-// Permission is hereby granted, free of charge, to any person obtaining
+// Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software",, to deal in the Software without restriction, including
 // without limitation the rights to use, copy, modify, merge, publish,
 using System;
 using System.ComponentModel;
 using System.Collections;
-using System.Drawing;
 using System.Diagnostics;
 using System.Runtime.InteropServices;
 using System.Threading;
+using System.Reflection;
 
-/// X11 Version
+// X11 Version
 namespace Crow.XLib {
        //
        // In the structures below, fields of type long are mapped to IntPtr.
@@ -1690,7 +1690,7 @@ namespace Crow.XLib {
        }
 
        [StructLayout (LayoutKind.Sequential)]
-       [Serializable]
+       
        public class XPoint
        {
                public short X;
@@ -1698,12 +1698,11 @@ namespace Crow.XLib {
        }
 
        [StructLayout (LayoutKind.Sequential)]
-       [Serializable]
+       
        public class XIMCallback
        {
                public IntPtr client_data;
-               public XIMProc callback;
-               [NonSerialized]
+               public XIMProc callback;                
                GCHandle gch;
 
                public XIMCallback (IntPtr clientData, XIMProc proc)