2003-01-06 Pedro Abelleira Seco <pedroabelleira@yahoo.es>
* pango/Layout.custom: Add Size get property and add some nicer overloads to avoid explicit passing in the string length svn path=/trunk/gtk-sharp/; revision=10231
This commit is contained in:
parent
4afe3261ae
commit
e059803b19
4 changed files with 37 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-01-06 Pedro Abelleira Seco <pedroabelleira@yahoo.es>
|
||||
|
||||
* 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 <pedroabelleira@yahoo.es>
|
||||
|
||||
* gdk/Drawable.custom: Add Size get property
|
||||
|
|
|
@ -370,8 +370,8 @@
|
|||
<method name="GetPixelSize" cname="pango_layout_get_pixel_size">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="int*" name="width"/>
|
||||
<parameter type="int*" name="height"/>
|
||||
<parameter type="int*" name="width" pass_as="out"/>
|
||||
<parameter type="int*" name="height" pass_as="out"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="GetSingleParagraphMode" cname="pango_layout_get_single_paragraph_mode">
|
||||
|
@ -380,8 +380,8 @@
|
|||
<method name="GetSize" cname="pango_layout_get_size">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="int*" name="width"/>
|
||||
<parameter type="int*" name="height"/>
|
||||
<parameter type="int*" name="width" pass_as="out"/>
|
||||
<parameter type="int*" name="height" pass_as="out"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="GetSpacing" cname="pango_layout_get_spacing">
|
||||
|
|
27
pango/Layout.custom
Normal file
27
pango/Layout.custom
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Pango.Layout.custom - Pango Layout class customizations
|
||||
//
|
||||
// Author: Pedro Abelleira Seco <pedroabelleira@yahoo.es>
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
|
||||
|
||||
/// <summary> Size property </summary>
|
||||
/// <remarks> Returns the size of the Layout </remarks>
|
||||
public System.Drawing.Size Size {
|
||||
get {
|
||||
int width, height;
|
||||
GetSize (out width, out height);
|
||||
return new System.Drawing.Size (width, height);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> SetText Method, overloaded to not having to calculate string length </summary>
|
||||
public void SetText(string text) {
|
||||
SetText(text, text.Length);
|
||||
}
|
||||
|
||||
/// <summary> SetMarkup Method, overloaded to not having to calculate string length </summary>
|
||||
public void SetMarkup(string markup) {
|
||||
SetText(markup, markup.Length);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue