学习gtkmm有几周了,英语太烂了,硬着头皮边看边记,还没把握,发上来,大家斧正
7.1.4. AspectFrame
The AspectFrame widget looks like a Frame widget, but it also enforces the aspect ratio (the ratio of the width to the height) of the child widget, adding extra space if necessary. For instance, this would allow you to display a photograph without allowing the user to distort it horizontally or vertically while resizing.
AspectFrame(比例?外观框架)看起来像Frame控件,但它强制子控件的外观比例(长宽比例),必要时扩展显示空间。例如,显示一幅图片而缩放时不允许改变长宽比例。
§ 7.1.4.1. 示例
The following program uses a Gtk::AspectFrame to present a drawing area whose aspect ratio will always be 2:1, no matter how the user resizes the top-level window.
下例使用Gtk::AspectFrame显示一个不管顶层窗口如何改变长宽比总为2:1的空白绘图区。