真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

Gtk調(diào)整widget部件大小size

原型

gtkmm

void set_size_request(int width =-1, int height =-1);


gtk

void
gtk_widget_set_size_request (
GtkWidget* widget,
int width,
int height
)


描述

設(shè)置小部件的最小大小。
也就是說(shuō),小部件的大小請(qǐng)求將至少是寬度乘以高度。您可以使用此函數(shù)強(qiáng)制小部件比正常情況下更大。
在大多數(shù)情況下,對(duì)于頂級(jí)窗口,gtk\u window\u set\u default\u size()是比此函數(shù)更好的選擇;設(shè)置默認(rèn)大小仍允許用戶縮小窗口。設(shè)置大小請(qǐng)求將強(qiáng)制他們離開窗口,至少與大小請(qǐng)求一樣大。
請(qǐng)注意,設(shè)置任何固定大小的固有危險(xiǎn)-主題、翻譯成其他語(yǔ)言、不同字體和用戶操作都可以更改給定小部件的適當(dāng)大小。因此,基本上不可能硬編碼始終正確的大小。
小部件的大小請(qǐng)求是小部件在正常工作和正確繪制自身時(shí)可以接受的最小大小。然而,在一些奇怪的情況下,小部件分配的空間可能小于其請(qǐng)求的大小,在許多情況下,小部件分配的空間可能大于其請(qǐng)求的空間。
如果給定方向上的大小請(qǐng)求為-1(未設(shè)置),則將使用小部件的“自然”大小請(qǐng)求。
此處設(shè)置的大小請(qǐng)求不包括來(lái)自屬性GtkWidget:margin start、GtkWidget:margin end、GtkWidget:margin top和GtkWidget:margin bottom的任何邊距,但它幾乎包括了GtkWidget的任何子類設(shè)置的所有其他填充或邊框?qū)傩浴?br>

Description

Sets the minimum size of a widget.

That is, the widget’s size request will be at least width by height. You can use this function to force a widget to be larger than it normally would be.

In most cases, gtk_window_set_default_size() is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request.

Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it’s basically impossible to hardcode a size that will always be correct.

The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested.

If the size request in a given direction is -1 (unset), then the “natural” size request of the widget will be used instead.

The size request set here does not include any margin from the properties GtkWidget:margin-start, GtkWidget:margin-end, GtkWidget:margin-top, and GtkWidget:margin-bottom, but it does include pretty much all other padding or border properties set by any subclass of GtkWidget.
本文標(biāo)題:Gtk調(diào)整widget部件大小size
文章轉(zhuǎn)載:http://weahome.cn/article/dsoijjg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部