//-----------------------------------------------------------------------------
// wx.NET/Utils - CustomWidgetObject.cs
//
// wx.NET "CustomWidgetObject".
//
// Written by Alexander Olk (xenomorph2@onlinehome.de)
// (C) 2004 Alexander Olk
// Licensed under the wxWidgets license, see LICENSE.txt for details.
//
// $Id: CustomWidgetObject.cs,v 1.3 2004/06/14 19:56:36 t9mike Exp $
//-----------------------------------------------------------------------------
using System;
using System.Xml;
using System.Collections;
using System.Collections.Specialized;
using System.Text;
namespace wx.ToWxNet{
public class CustomWidgetObject : WxObjectBase
{
public override void GenerateCSharpCode()
{
StringBuilder ctorline = new StringBuilder();
ctorline.Append( "\t\t\t" + name + " = new " + classname + "( " );
if (arguments.Count != 4)
{
ctorline.Append( GetParent( parent ) + ", " );
ctorline.Append( id.Length > 0 ? "(int)Cmd." + id : "-1" );
}
else
{
ctorline.Append( arguments[0] + ", " );
ctorline.Append( "(int)Cmd." + arguments[1] + ", " );
ctorline.Append( "wxDefaultPosition, " );
ctorline.Append( "new Size( " + arguments[2] + ", " + arguments[3] + " )" );
}
ctorline.Append( ");" );
ctorlines.Add( ctorline.ToString() );
AddProperties( propertylines );
}
//---------------------------------------------------------------------
public override void GenerateBasicCode()
{
StringBuilder ctorline = new StringBuilder();
ctorline.Append( "\t\t\t" + name + " = New " + classname + "( " );
if (arguments.Count != 4)
{
ctorline.Append( GetParent( parent ) + ", " );
ctorline.Append( id.Length > 0 ? "Cmd." + id : "-1" );
}
else
{
ctorline.Append( arguments[0] + ", " );
ctorline.Append( arguments[1] + ", " );
ctorline.Append( "wxDefaultPosition, " );
ctorline.Append( "new Size( " + arguments[2] + ", " + arguments[3] + " )" );
}
ctorline.Append( ")" );
ctorlines.Add( ctorline.ToString() );
AddProperties( propertylines );
}
}
//---------------------------------------------------------------------
public class CustomControlObject : WxObjectBase
{
}
}
|