Class Ui::WxWidgets::Widgets::HostsBrowser
In: ui/wx/widgets/hoststree.rb
Parent: Wx::TreeCtrl

Methods

new   update_view  

Included Modules

HostsBrowserInterface

Public Class methods

=============================================== public methods

[Source]

# File ui/wx/widgets/hoststree.rb, line 291
        def initialize(parent=nil)
          super(parent, 
            Wx::ID_ANY, 
            Wx::DEFAULT_POSITION,
            Wx::Size.new(200, 250),
            Wx::TR_DEFAULT_STYLE|Wx::NO_BORDER|Wx::TR_HIDE_ROOT|Wx::TR_EDIT_LABELS)
          
          setup_menus
          setup_images
          setup_events
        
          # setup_dummy_content
          self.disable
          
          # initialize instance vars
          @old_label = nil
        end

Public Instance methods

[Source]

# File ui/wx/widgets/hoststree.rb, line 309
        def update_view(model)
          self.disable
          self.delete_all_items
          @selected_node = nil
          
          @model = model
          root = self.add_root('dradis', 0)
          # find the root nodes (parent_id == nil)
          @model.node_children(nil).each do |node|
            add_node(root, node)
          end
          self.expand_all
          self.enable
        end

[Validate]