* gtk/Widget.custom: Add a nice overload, rename it to

'RequestSize' instead of 'SizeRequest' to avoid a name clash.

* api/gtk-api.xml:
* sources/Gtk.metadata: out param for gtk_widget_get_size_request.

svn path=/trunk/gtk-sharp/; revision=11046
This commit is contained in:
Duncan Mak 2003-01-30 02:56:49 +00:00
parent 87387bc38b
commit 4d694b215f
4 changed files with 30 additions and 14 deletions

View file

@ -9477,8 +9477,8 @@
<method name="GetSizeRequest" cname="gtk_widget_get_size_request"> <method name="GetSizeRequest" cname="gtk_widget_get_size_request">
<return-type type="void"/> <return-type type="void"/>
<parameters> <parameters>
<parameter type="gint*" name="width"/> <parameter type="gint*" name="width" pass_as="out"/>
<parameter type="gint*" name="height"/> <parameter type="gint*" name="height" pass_as="out"/>
</parameters> </parameters>
</method> </method>
<method name="GetStyle" cname="gtk_widget_get_style" needs_ref="1"> <method name="GetStyle" cname="gtk_widget_get_style" needs_ref="1">

View file

@ -29,4 +29,19 @@ public Gdk.Window GdkWindow {
} }
return null; return null;
} }
} }
public System.Drawing.Size RequestSize {
get {
int x, y;
GetSizeRequest (out x, out y);
return new System.Drawing.Size (x, y);
}
set {
int x = value.Width;
int y = value.Height;
SetSizeRequest (x, y);
}
}

View file

@ -40,17 +40,6 @@
} }
} }
public System.Drawing.Size SizeRequest {
get {
return new System.Drawing.Size (
DefaultWidth, DefaultHeight);
}
set {
DefaultWidth = value.Width;
DefaultHeight = value.Height;
}
}
public System.Drawing.Size Position { public System.Drawing.Size Position {
get { get {
int x, y; int x, y;

View file

@ -1881,6 +1881,18 @@ z<rule>
</attribute> </attribute>
</data> </data>
</rule> </rule>
<rule>
<class name="GtkWidget">
<method>GetSizeRequest</method>
</class>
<data>
<attribute target="param">
<filter level="type">gint*</filter>
<name>pass_as</name>
<value>out</value>
</attribute>
</data>
</rule>
<rule> <rule>
<class name="GtkMenuItem"> <class name="GtkMenuItem">
<method>SetSubmenu</method> <method>SetSubmenu</method>