Class: VR::ObjectInspector::ObjectInspectorGUI

Inherits:
Object
  • Object
show all
Includes:
GladeGUI
Defined in:
lib/oinspect/ObjectInspectorGUI.rb

Overview

ObjectInspector isn't meant to be called directly, see #oinspect for API.

Instance Attribute Summary

Attributes included from GladeGUI

#builder

Instance Method Summary collapse

Methods included from GladeGUI

#buttonCancel__clicked, #extract_key, #get_glade_active_record, #get_glade_all, #get_glade_variables, #load_glade, #parse_signals, #set_drag_drop, #set_glade_active_record, #set_glade_all, #set_glade_hash, #set_glade_variables, #show_glade, #try_to_select_text_in_combobox, #window1__destroy, #window1__key_press_event

Constructor Details

#initialize(obj = self) ⇒ ObjectInspectorGUI

Returns a new instance of ObjectInspectorGUI



9
10
11
12
13
14
# File 'lib/oinspect/ObjectInspectorGUI.rb', line 9

def initialize(obj=self)
  @obj = obj
  @obj_to_s = obj.to_s
  @meth_view = MethodsListView.new(@obj)
  @var_view = VariablesListView.new(@obj)
end

Instance Method Details

#before_showObject



16
17
18
19
20
21
22
# File 'lib/oinspect/ObjectInspectorGUI.rb', line 16

def before_show()
  @headline = "<big><big>#{@obj.class.name}  (ID:  #{@obj.__id__})</big></big>"
  @builder[:scrolledwindow1].add @meth_view
  @builder[:scrolledwindow2].add @var_view
  @builder[:paned1].position = 400
  @builder[:window1].show_all
end

#var_view__row_activated(*args) ⇒ Object



24
25
26
27
# File 'lib/oinspect/ObjectInspectorGUI.rb', line 24

def var_view__row_activated(*args)
  row = @var_view.selected_rows.first
  oinspect row[:obj] 
end