GTK+ 3.14 はマルチタッチをサポートしているのようです。
GtkGesture という名前か、マウスジェスチャはもう過去の遺物だな。
よし早速、ってタッチパネルのパソコンなんて持っていないよ。
後二年もすれば五万円台で ASER か ASUS が普通に出してくるのだろう。
コイツはそれからでいいや。
Gtk 3.12 のほうを見ると GtkActionBar, GtkPopover, GtkFlowBox
全部コンテナか、そんなに沢山の種類が必要なのかな?
GtkFlowBox はコンテナサイズで複数 Widget の位置を調節してくれる。
という解釈でいいのかな、GtkIconView とは違うのかな。
ちと試してみよう。
2015.03.05 修正
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/env python3 from gi.repository import Gtk, Gio class FBox(Gtk.Window): """ Minimum width is standard ? """ def __init__( self ): Gtk.Window.__init__( self ) # self .flowbox = Gtk.FlowBox.new() button = Gtk.Button.new_with_label( "Insert Label" ) button.connect( "clicked" , self .on_insert_button_clicked) # pack vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, 0 ) vbox.pack_start(button, False , False , 0 ) vbox.pack_start( self .flowbox, True , True , 0 ) # self self .index = 0 self .add(vbox) self .connect( "delete-event" , Gtk.main_quit) self .resize( 400 , 1 ) self .show_all() def on_insert_button_clicked( self , widget): label = Gtk.Label( "Label" ) label.show() self .flowbox.insert(label, self .index) self .index + = 1 FBox() Gtk.main() |
3 クリック目から横に余裕があるのに縦に広がってしまう。
どうも横幅を最小値にした場合を常に計算しているようで。
ついでに、GtkListBox 同様に選択もできます。
どんな場面に便利か思いつかないのは筆者の想像力が足りないのだろう。
昨今の Web ページではよく見かけるのですけどね。