class ListPanel

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

Attributes

list_filter[RW]
list_holder[RW]
list_sum[RW]
vbox[RW]
visibility[RW]

Public Class Methods

new(list_holder) click to toggle source
Calls superclass method
# File lib/ListHolder/ListPanel.rb, line 9
      def initialize(list_holder)
              @list_holder=list_holder
              super(list_holder.list_scroller.hadjustment,Gtk::Adjustment.new(0,0,0,0,0,0))
              set_resize_mode(Gtk::RESIZE_PARENT)
              set_width_request(1)
              set_no_show_all(true)
              
              add(@vbox=Gtk::VBox.new(false))
              vbox.pack_start(@list_sum=ListSum.new(list_holder),false,false,0)
              vbox.pack_end(@list_filter=MyListFilter.new(list_holder),false,false,0)
      
              signal_connect('destroy'){|me|
                      @list_sum.destroy if @list_sum
                      @list_filter.destroy if @list_filter
              }
end

Public Instance Methods

inspect() click to toggle source
# File lib/ListHolder/ListPanel.rb, line 53
def inspect
        "ListPanel of #{@list_holder}"
end
set_visibility() click to toggle source
# File lib/ListHolder/ListPanel.rb, line 39
        def set_visibility
                if visibility!=(list_holder.sum_button.active? || list_holder.advanced_filter.active?)
                        @visibility=list_holder.sum_button.active? || list_holder.advanced_filter.active?
                        set_visible(visibility)
                        vbox.set_visible(visibility)
                        list_holder.placeholder_button.set_visible(visibility)
#                       set_visible(list_holder.advanced_filter.active?)
#                       vbox.set_visible(list_holder.advanced_filter.active?)
                        edebug("#{self} visibility set to #{visibility}","list","info")
                end
                list_filter.set_visible(list_holder.advanced_filter.active?)
                list_sum.set_visible(list_holder.sum_button.active?)
        end
to_s() click to toggle source
# File lib/ListHolder/ListPanel.rb, line 56
def to_s
        inspect
end
update(notifier) click to toggle source
# File lib/ListHolder/ListPanel.rb, line 32
def update(notifier)
              list_filter.update(notifier)
              list_sum.update(notifier)
              set_visibility
              self
end