<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" />
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;
System.Runtime.InteropServices.Marshal.Copy (data.Scan0, image, 0, bitmapSize);
bitmap.UnlockBits (data);
- }
+ }*/
#region implemented abstract members of Fill
/// <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 {
/// <summary>
/// label to display in the bound control
/// </summary>
- [XmlAttributeAttribute][DefaultValue("Unamed Command")]
+ [DefaultValue("Unamed Command")]
public virtual string Caption {
get { return caption; }
set {
/// <summary>
/// Icon to display in the bound control
/// </summary>
- [XmlAttributeAttribute]
+
public Picture Icon {
get { return icon; }
set {
}
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));
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);
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
}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 {
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{
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
{
string configRoot =
Path.Combine(
+
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".config");
/// <summary>
/// use to define the colors of the 3d border
/// </summary>
- [XmlAttributeAttribute]
+
public virtual Fill RaisedColor {
get { return raisedColor; }
set {
/// <summary>
/// use to define the colors of the 3d border
/// </summary>
- [XmlAttributeAttribute]
+
public virtual Fill SunkenColor {
get { return sunkenColor; }
set {
/// <summary>
/// border width in pixels
/// </summary>
- [XmlAttributeAttribute()][DefaultValue(1)]
+ [DefaultValue(1)]
public virtual int BorderWidth {
get { return _borderWidth; }
set {
/// <summary>
/// allow 3d border effects
/// </summary>
- [XmlAttributeAttribute][DefaultValue(BorderStyle.Normal)]
+ [DefaultValue(BorderStyle.Normal)]
public virtual BorderStyle BorderStyle {
get { return _borderStyle; }
set {
}
#endregion
- [XmlAttributeAttribute][DefaultValue("#Crow.Images.button.svg")]
+ [DefaultValue("#Crow.Images.button.svg")]
public string Image {
get { return image; }
set {
NotifyValueChanged ("Image", image);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsPressed
{
get { return isPressed; }
public event EventHandler Checked;
public event EventHandler Unchecked;
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsChecked
{
get { return isChecked; }
Color curColor;
double h,s,v;
- [XmlAttributeAttribute()]
+
public virtual double R {
get { return Math.Round(curColor.R * div); }
set {
notifyCurColorHasChanged ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double G {
get { return Math.Round(curColor.G * div); }
set {
hsvFromRGB ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double B {
get { return Math.Round(curColor.B * div); }
set {
hsvFromRGB ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double A {
get { return Math.Round(curColor.A * div); }
set {
hsvFromRGB ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double H {
get { return Math.Round (h, 3); }
set {
rgbFromHSV ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double S {
get { return Math.Round (s, 2); }
set {
rgbFromHSV ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double V {
get { return Math.Round (v, 2); }
set {
}
}
- [XmlAttributeAttribute]
+
public virtual Fill SelectedColor {
get { return new SolidColor(curColor); }
set {
hsvFromRGB ();
}
}
- [XmlAttributeAttribute]
+
public virtual Color SelectedRawColor {
get { return curColor; }
set {
NotifyValueChanged ("SelectedItem", _selectedItem);
}
}
- [XmlAttributeAttribute()][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool ShowFiles {
get { return showFiles; }
set {
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool ShowHidden {
get { return showHidden; }
set {
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
}
}
- [XmlAttributeAttribute][DefaultValue("*.*")]
+ [DefaultValue("*.*")]
public virtual string FileMask {
get { return fileMask; }
set {
NotifyValueChanged ("FileSystemEntries", FileSystemEntries);
}
}
- [XmlAttributeAttribute][DefaultValue("/")]
+ [DefaultValue("/")]
public virtual string CurrentDirectory {
get { return currentDirectory; }
set {
}
#region Public properties
- [XmlAttributeAttribute][DefaultValue("#Crow.Images.Icons.expandable.svg")]
+ [DefaultValue("#Crow.Images.Icons.expandable.svg")]
public string Image {
get { return image; }
set {
public string SelectedFileFullPath {
get { return Path.Combine (SelectedDirectory, SelectedFile); }
}
- [XmlAttributeAttribute][DefaultValue("/home")]
+ [DefaultValue("/home")]
public virtual string CurrentDirectory {
get { return curDir; }
set {
}
}
- [XmlAttributeAttribute][DefaultValue("*")]
+ [DefaultValue("*")]
public virtual string SearchPattern {
get { return searchPattern; }
set {
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool ShowHidden {
get { return showHidden; }
set {
NotifyValueChanged ("ShowHidden", showHidden);
}
}
- [XmlAttributeAttribute()][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool ShowFiles {
get { return showFiles; }
set {
NotifyValueChanged ("ShowFiles", showFiles);
}
}
- [XmlAttributeAttribute]public string SelectedFile {
+ public string SelectedFile {
get { return _selectedFile; }
set {
if (value == _selectedFile)
NotifyValueChanged ("SelectedFile", _selectedFile);
}
}
- [XmlAttributeAttribute]public string SelectedDirectory {
+ public string SelectedDirectory {
get { return _selectedDir; }
set {
if (value == _selectedDir)
#endregion
#region Public Properties
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [DefaultValue(2)]
public int Spacing
{
get { return _spacing; }
RegisterForLayouting (LayoutingType.Sizing|LayoutingType.ArrangeChildren);
}
}
- [XmlAttributeAttribute()][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation
{
get { return _orientation; }
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
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);
}
#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; }
this.RegisterForLayouting (LayoutingType.ArrangeChildren);
}
}
- [XmlAttributeAttribute()][DefaultValue(2)]
+ [DefaultValue(2)]
public virtual int RowCount
{
get { return _rowCount; }
public virtual List<GraphicObject> Children {
get { return children; }
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool MultiSelect
{
get { return _multiSelect; }
Orientation _orientation;
double hue;
- [XmlAttributeAttribute][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation
{
get { return _orientation; }
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double Hue {
get { return hue; }
set {
/// <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 {
/// <summary>
/// If image is scaled, proportions will be preserved.
/// </summary>
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public virtual bool KeepProportions {
get { return keepProps; }
set {
/// <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 {
/// 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 {
/// 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 {
/// 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 {
protected TextExtents te;
#endregion
-
- [XmlAttributeAttribute][DefaultValue("SteelBlue")]
+ [DefaultValue("SteelBlue")]
public virtual Color SelectionBackground {
get { return selBackground; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue("White")]
+ [DefaultValue("White")]
public virtual Color SelectionForeground {
get { return selForeground; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(Alignment.Left)]
+ [DefaultValue(Alignment.Left)]
public Alignment TextAlignment
{
get { return _textAlignment; }
NotifyValueChanged ("TextAlignment", _textAlignment);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool HorizontalStretch {
get { return horizontalStretch; }
set {
NotifyValueChanged ("HorizontalStretch", horizontalStretch);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool VerticalStretch {
get { return verticalStretch; }
set {
NotifyValueChanged ("VerticalStretch", verticalStretch);
}
}
- [XmlAttributeAttribute][DefaultValue("label")]
+ [DefaultValue("label")]
public string Text
{
get {
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool Selectable
{
get { return _selectable; }
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool Multiline
{
get { return _multiline; }
RegisterForGraphicUpdate();
}
}
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public int CurrentColumn{
get { return _currentCol; }
set {
NotifyValueChanged ("CurrentColumn", _currentCol);
}
}
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public int CurrentLine{
get { return _currentLine; }
set {
/// <summary>
/// Selection begin position in char units
/// </summary>
- [XmlAttributeAttribute][DefaultValue("-1")]
+ [DefaultValue("-1")]
public Point SelBegin {
get {
return _selBegin;
NotifyValueChanged ("SelectedText", SelectedText);
}
}
- [XmlAttributeAttribute][DefaultValue("-1")]
+ [DefaultValue("-1")]
public Point SelRelease {
get {
return _selRelease;
bool autoOpen = false;
#region Public properties
- [XmlAttributeAttribute][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public Orientation Orientation {
get { return orientation; }
set {
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 {
NotifyValueChanged ("Icon", icon);
}
}
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopWidth {
get { return popWidth; }
set {
NotifyValueChanged ("PopWidth", popWidth);
}
}
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopHeight {
get { return popHeight; }
set {
#endregion
#region public properties
- [XmlAttributeAttribute][DefaultValue(2)]
+ [DefaultValue(2)]
public int Decimals
{
get { return _decimals; }
RegisterForGraphicUpdate();
}
}
- [XmlAttributeAttribute][DefaultValue(0.0)]
+ [DefaultValue(0.0)]
public virtual double Minimum {
get { return minValue; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(100.0)]
+ [DefaultValue(100.0)]
public virtual double Maximum
{
get { return maxValue; }
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public virtual double SmallIncrement
{
get { return smallStep; }
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(5.0)]
+ [DefaultValue(5.0)]
public virtual double LargeIncrement
{
get { return bigStep; }
public event EventHandler Unpoped;
#region Public Properties
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopWidth {
get { return popWidth; }
set {
NotifyValueChanged ("PopWidth", popWidth);
}
}
- [XmlAttributeAttribute()][DefaultValue("Fit")]
+ [DefaultValue("Fit")]
public virtual Measure PopHeight {
get { return popHeight; }
set {
NotifyValueChanged ("PopHeight", popHeight);
}
}
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsPopped
{
get { return _isPopped; }
}
}
- [XmlAttributeAttribute()][DefaultValue(true)]
+ [DefaultValue(true)]
public bool CanPop
{
get { return _canPop; }
NotifyValueChanged ("CanPop", _canPop);
}
}
- [XmlAttributeAttribute()][DefaultValue(Alignment.Bottom)]
+ [DefaultValue(Alignment.Bottom)]
public virtual Alignment PopDirection {
get { return popDirection; }
set {
}
#endregion
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsChecked
{
get { return isChecked; }
double v, s;
- [XmlAttributeAttribute()]
+
public virtual double V {
get { return v; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()]
+
public virtual double S {
get { return s; }
set {
public ScrollBar(Interface iface) : base(iface) {}
#endregion
- [XmlAttributeAttribute()][DefaultValue(Orientation.Vertical)]
+ [DefaultValue(Orientation.Vertical)]
public virtual Orientation Orientation
{
get { return _orientation; }
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()][DefaultValue(20)]
+ [DefaultValue(20)]
public virtual int CursorSize {
get { return _cursorSize; }
set {
#region public properties
/// <summary> Horizontal Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollX {
get { return scrollX; }
set {
}
}
/// <summary> Vertical Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollY {
get { return scrollY; }
set {
}
}
/// <summary> Horizontal Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollX {
get { return maxScrollX; }
set {
}
}
/// <summary> Vertical Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollY {
get { return maxScrollY; }
set {
}
}
/// <summary> Mouse Wheel Scrolling multiplier </summary>
- [XmlAttributeAttribute][DefaultValue(50)]
+ [DefaultValue(50)]
public virtual int ScrollSpeed {
get { return scrollSpeed; }
set {
protected bool KeyEventsOverrides = false;
/// <summary> Horizontal Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollX {
get { return scrollX; }
set {
}
}
/// <summary> Vertical Scrolling Position </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int ScrollY {
get { return scrollY; }
set {
}
}
/// <summary> Horizontal Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollX {
get { return maxScrollX; }
set {
}
}
/// <summary> Vertical Scrolling maximum value </summary>
- [XmlAttributeAttribute][DefaultValue(0)]
+ [DefaultValue(0)]
public virtual int MaxScrollY {
get { return maxScrollY; }
set {
}
}
/// <summary> Mouse Wheel Scrolling multiplier </summary>
- [XmlAttributeAttribute][DefaultValue(1)]
+ [DefaultValue(1)]
public virtual int MouseWheelSpeed {
get { return mouseWheelSpeed; }
set {
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public double StokeWidth {
get { return strokeWidth; }
set {
int thickness;
- [XmlAttributeAttribute][DefaultValue(1)]
+ [DefaultValue(1)]
public virtual int Thickness {
get { return thickness; }
set {
/// Template path
/// </summary>
//TODO: this property should be renamed 'TemplatePath'
- [XmlAttributeAttribute][DefaultValue(null)]
+ [DefaultValue(null)]
public string Template {
get { return _template; }
set {
/// <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 {
/// ItemTemplate enclosing tag, or several item templates each enclosed
/// in a separate tag.
/// </summary>
- [XmlAttributeAttribute]
+
public string ItemTemplate {
get { return _itemTemplate; }
set {
/// 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 {
[XmlIgnore]public bool HasItems {
get { return Items.Count > 0; }
}
- [XmlAttributeAttribute]public IList Data {
+ public IList Data {
get { return data; }
set {
if (value == data)
loadItem (e.Element, items, dataTest);
}
- [XmlAttributeAttribute][DefaultValue("SteelBlue")]
+ [DefaultValue("SteelBlue")]
public virtual Color SelectionBackground {
get { return selBackground; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue("White")]
+ [DefaultValue("White")]
public virtual Color SelectionForeground {
get { return selForeground; }
set {
#endregion
- [XmlAttributeAttribute ()]
+
[DefaultValue (Alignment.Left)]
public Alignment TextAlignment {
get { return _textAlignment; }
set { _textAlignment = value; }
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public virtual bool HorizontalStretch {
get { return horizontalStretch; }
NotifyValueChanged ("HorizontalStretch", horizontalStretch);
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public virtual bool VerticalStretch {
get { return verticalStretch; }
NotifyValueChanged ("VerticalStretch", verticalStretch);
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue ("label")]
public string Text {
get {
lines = getLines;
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public bool Multiline {
get { return _multiline; }
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute ()]
+
[DefaultValue (false)]
public bool WordWrap {
get {
}
#endregion
- [XmlAttributeAttribute()][DefaultValue(false)]
+ [DefaultValue(false)]
public virtual bool IsRoot {
get { return isRoot; }
set {
AddValue (value);
}
}
- [XmlAttributeAttribute()][DefaultValue(400)]
+ [DefaultValue(400)]
public virtual int NbValues {
get { return nbValues; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(0.0)]
+ [DefaultValue(0.0)]
public virtual double Minimum {
get { return minValue; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(100.0)]
+ [DefaultValue(100.0)]
public virtual double Maximum
{
get { return maxValue; }
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue(1.0)]
+ [DefaultValue(1.0)]
public virtual double LowThreshold {
get { return lowThreshold; }
set {
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()][DefaultValue(80.0)]
+ [DefaultValue(80.0)]
public virtual double HighThreshold {
get { return highThreshold; }
set {
RegisterForGraphicUpdate ();
}
}
- [XmlAttributeAttribute()][DefaultValue("DarkRed")]
+ [DefaultValue("DarkRed")]
public virtual Fill LowThresholdFill {
get { return lowThresholdFill; }
set {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute()][DefaultValue("DarkGreen")]
+ [DefaultValue("DarkGreen")]
public virtual Fill HighThresholdFill {
get { return highThresholdFill; }
set {
}
#endregion
- [System.Xml.Serialization.XmlIgnore]
+ [XmlIgnore]
public override Orientation Orientation
{
get { return Orientation.Vertical; }
#endregion
#region public properties
- [XmlAttributeAttribute][DefaultValue("#Crow.Images.Icons.crow.png")]
+ [DefaultValue("#Crow.Images.Icons.crow.png")]
public string Icon {
get { return _icon; }
set {
/// <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 {
/// <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 {
RegisterForRedraw ();
}
}
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public bool Resizable {
get {
return resizable;
NotifyValueChanged ("Resizable", resizable);
}
}
- [XmlAttributeAttribute][DefaultValue(true)]
+ [DefaultValue(true)]
public bool Movable {
get {
return movable;
NotifyValueChanged ("Movable", movable);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool Modal {
get {
return modal;
NotifyValueChanged ("Modal", modal);
}
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool IsMinimized {
get { return _minimized; }
set{
[XmlIgnore]public bool IsNormal {
get { return !(IsMaximized|_minimized); }
}
- [XmlAttributeAttribute][DefaultValue(false)]
+ [DefaultValue(false)]
public bool AlwaysOnTop {
get {
return modal ? true : alwaysOnTop;
NotifyValueChanged ("AlwaysOnTop", AlwaysOnTop);
}
}
-// [XmlAttributeAttribute()][DefaultValue(WindowState.Normal)]
+// [DefaultValue(WindowState.Normal)]
// public virtual WindowState State {
// get { return _state; }
// set {
--- /dev/null
+//
+// 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
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);
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
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)
namespace Crow.IML2
{
- public class Reader : XmlTextReader
+ public class Reader : XmlReader
{
static List<Type> CrowTypes = new List<Type> ();
il.Emit(OpCodes.Ret);
loader = (InstanciatorInvoker)dm.CreateDelegate (typeof(InstanciatorInvoker));
return loader;
+ XmlReader r = XmlReader.Create("test.xml");
}
protected int curDepth {
#endregion
using System;
-#if !MINIMAL
-using System.Drawing;
-#endif
namespace Crow
{
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
#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) {
/// <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;
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);
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
#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
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
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
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);
//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
//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
#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(
Keyboard.KeyUp += Keyboard_KeyUp;
Keyboard.KeyPress += Keyboard_KeyPress;
- initTooltip ();
- initContextMenus ();
+ //initTooltip ();
+ //initContextMenus ();
running = true;
//dynamically and fetch
il.Emit (OpCodes.Ldstr, fetchMethodName);
- il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataTypeAndFetch);
+ il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
}else
emitGetSubData(il, dataType);
}
//dynamically and fetch
il.Emit (OpCodes.Ldstr, fetchMethodName);
- il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataTypeAndFetch);
+ il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
}else
emitGetSubData(il, dataType);
}
-//
+//
// Mono.Cairo.Antialias.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum Antialias
{
Default,
-//
+//
// Mono.Cairo.Content.cs
//
// Authors:
namespace Cairo
{
//[Flags]
- [Serializable]
+
public enum Content
{
Color = 0x1000,
using System;
using System.Runtime.InteropServices;
using System.Text;
-using Cairo;
using Color = Crow.Color;
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 ||
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)
}
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){
-//
+//
// Mono.Cairo.Extend.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum Extend
{
None,
-//
+//
// Mono.Cairo.FillRule.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum FillRule
{
Winding,
-//
+//
// Mono.Cairo.Filter.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum Filter
{
Fast,
-//
+//
// Mono.Cairo.FontSlant.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum FontSlant
{
Normal,
-//
+//
// Mono.Cairo.FontType.cs
//
// Authors:
namespace Cairo {
- [Serializable]
+
public enum FontType
{
Toy,
-//
+//
// Mono.Cairo.FontWeight.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum FontWeight
{
Normal,
-//
+//
// Mono.Cairo.Format.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
namespace Cairo
{
- [Serializable]
+
public enum Format
{
Argb32 = 0,
-//
+//
// Mono.Cairo.HintMetrics.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
namespace Cairo
{
- [Serializable]
+
public enum HintMetrics
{
Default,
-//
+//
// Mono.Cairo.HintStyle.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
namespace Cairo
{
- [Serializable]
+
public enum HintStyle
{
Default,
-//
+//
// Mono.Cairo.LineCap.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
namespace Cairo
{
- [Serializable]
+
public enum LineCap
{
Butt,
-//
+//
// Mono.Cairo.LineJoin.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
namespace Cairo
{
- [Serializable]
+
public enum LineJoin
{
Miter,
namespace Cairo {
[StructLayout(LayoutKind.Sequential)]
- public class Matrix : ICloneable
+ public class Matrix //: ICloneable
{
public double Xx;
public double Yx;
#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)]
-//
+//
// Mono.Cairo.Operator.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
namespace Cairo
{
- [Serializable]
+
public enum Operator
{
Clear,
-//
+//
// Mono.Cairo.PatternType.cs
//
// Authors:
namespace Cairo {
- [Serializable]
+
public enum PatternType
{
Solid,
-//
+//
// Mono.Cairo.Status.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum Status
{
Success = 0,
-//
+//
// Mono.Cairo.Cairo.cs
//
// Authors:
namespace Cairo
{
- [Serializable]
+
public enum SubpixelOrder
{
Default,
public class Surface : IDisposable
{
- [Obsolete]
- protected static Hashtable surfaces = new Hashtable ();
-
IntPtr handle = IntPtr.Zero;
[Obsolete]
-//
+//
// Mono.Cairo.SurfaceType.cs
//
// Authors:
namespace Cairo {
- [Serializable]
+
public enum SurfaceType
{
Image,
-//
+//
// Mono.Cairo.SvgVersion.cs
//
// Authors:
namespace Cairo {
- [Serializable]
+
public enum SvgVersion
{
// FIXME: yuck
{
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);
-// 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.
}
[StructLayout (LayoutKind.Sequential)]
- [Serializable]
+
public class XPoint
{
public short X;
}
[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)