diff --git a/ChangeLog b/ChangeLog index 1dc26e08e..d0cc1b516 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-01-06 Pedro Abelleira Seco + + * pango/Layout.custom: Add Size get property and add some nicer overloads + to avoid explicit passing in the string length + 2003-01-05 Pedro Abelleira Seco * gdk/Drawable.custom: Add Size get property diff --git a/api/pango-api.xml b/api/pango-api.xml index 94857bd72..995e61c72 100644 --- a/api/pango-api.xml +++ b/api/pango-api.xml @@ -370,8 +370,8 @@ - - + + @@ -380,8 +380,8 @@ - - + + diff --git a/pango/Layout.custom b/pango/Layout.custom new file mode 100644 index 000000000..9ec5b8939 --- /dev/null +++ b/pango/Layout.custom @@ -0,0 +1,27 @@ +// Pango.Layout.custom - Pango Layout class customizations +// +// Author: Pedro Abelleira Seco +// +// This code is inserted after the automatically generated code. + + +/// Size property +/// Returns the size of the Layout +public System.Drawing.Size Size { + get { + int width, height; + GetSize (out width, out height); + return new System.Drawing.Size (width, height); + } +} + +/// SetText Method, overloaded to not having to calculate string length +public void SetText(string text) { + SetText(text, text.Length); +} + +/// SetMarkup Method, overloaded to not having to calculate string length +public void SetMarkup(string markup) { + SetText(markup, markup.Length); +} + diff --git a/pango/Makefile.in b/pango/Makefile.in index dd15ee659..f0851c542 100644 --- a/pango/Makefile.in +++ b/pango/Makefile.in @@ -9,7 +9,7 @@ windows: linux: pango-sharp.dll pango-sharp.dll: generated/*.cs - $(MCS) --unsafe --target library -L ../glib -r glib-sharp.dll -o pango-sharp.dll --recurse '*.cs' + $(MCS) --unsafe --target library -L ../glib -r glib-sharp.dll -r System.Drawing -o pango-sharp.dll --recurse '*.cs' clean: rm -f *.dll