class ButtonGroup

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint(dpblnt@gmail.com)

Public Class Methods

new(holder,group) click to toggle source
Calls superclass method
# File lib/ListHolder/ListButtonHolder/ButtonGroup.rb, line 7
        def initialize(holder,group)
                @holder=holder
                @group=group
                super(@group)
                set_image(Gtk::Image.new(Gtk::Stock::DIRECTORY,Gtk::IconSize.from_name(get_conf(0,0,"button-size"))))
                set_relief(Gtk::ReliefStyle::NONE)
#               set_shadow_type(Gtk::SHADOW_NONE)
                @popup=Gtk::Window.new(Gtk::Window::POPUP).add(@widget=Gtk::VBox.new).set_modal(true).set_has_frame(false).
                        set_transient_for(@holder.list_holder.get_ancestor(Gtk::Window))

                @popup.signal_connect('leave-notify-event'){|me,e| me.hide if e.window == me.window}

                signal_connect('clicked'){|me|
                        x,y=get_ancestor(Gtk::Window).position
                        xd,yd=translate_coordinates(get_ancestor(Gtk::Window),x,y+allocation.height)
                        @popup.move(xd,yd).show_all
                        }
        end

Public Instance Methods

pack_start(*args) click to toggle source
# File lib/ListHolder/ListButtonHolder/ButtonGroup.rb, line 25
def pack_start(*args)
        @widget.pack_start(*args)
end
update(notifier) click to toggle source
# File lib/ListHolder/ListButtonHolder/ButtonGroup.rb, line 28
def update(notifier)
        @widget.each{|button| button.update(notifier)}
end