Module: Naksh::Interfaces::Rbgtk
- Defined in:
- lib/naksh/interfaces/gtk.rb,
lib/naksh/interfaces/gtk/io.rb,
lib/naksh/interfaces/gtk/abtwin.rb,
lib/naksh/interfaces/gtk/optwin.rb,
lib/naksh/interfaces/gtk/helpwin.rb,
lib/naksh/interfaces/gtk/mainwin.rb,
lib/naksh/interfaces/gtk/gnomeapp.rb,
lib/naksh/interfaces/gtk/mainwin/console.rb,
lib/naksh/interfaces/gtk/mainwin/main_menu.rb
Defined Under Namespace
Classes: GtkRuBuffer, HelpWindowInterface
Class Method Summary
collapse
Class Method Details
.about ⇒ Object
47
48
49
|
# File 'lib/naksh/interfaces/gtk/abtwin.rb', line 47
def Rbgtk.about
@abtwin
end
|
.back ⇒ Object
62
63
64
|
# File 'lib/naksh/interfaces/gtk.rb', line 62
def Rbgtk.back
(@console.buffer.get_iter_at_mark(@console.buffer.get_mark('current_input_start'))==@console.buffer.get_iter_at_mark(@console.buffer.get_mark('insert'))) ? true : false
end
|
.console ⇒ Object
67
68
69
|
# File 'lib/naksh/interfaces/gtk.rb', line 67
def Rbgtk.console
@console
end
|
.err ⇒ Object
88
89
90
|
# File 'lib/naksh/interfaces/gtk/io.rb', line 88
def Rbgtk.err
@err
end
|
.help ⇒ Object
63
64
65
|
# File 'lib/naksh/interfaces/gtk/helpwin.rb', line 63
def Rbgtk.help
@helpwin
end
|
.in ⇒ Object
duplicate of the current input, modifications are ignored if the user pressed ‘return’ right now, this is what would be sent to syntax.execute
30
31
32
|
# File 'lib/naksh/interfaces/gtk/io.rb', line 30
def Rbgtk.in
@console.buffer.get_slice(@console.buffer.get_iter_at_mark(@console.buffer.get_mark('current_input_start')),@console.buffer.end_iter,true)
end
|
.in=(str) ⇒ Object
35
36
37
38
|
# File 'lib/naksh/interfaces/gtk/io.rb', line 35
def Rbgtk.in= str
@console.buffer.delete @console.buffer.get_iter_at_mark(@console.buffer.get_mark('current_input_start')),@console.buffer.end_iter
@console.buffer.insert @console.buffer.end_iter,str.to_str
end
|
.main ⇒ Object
the principal Terminal Emulator window
49
50
51
|
# File 'lib/naksh/interfaces/gtk/mainwin.rb', line 49
def Rbgtk.main
@mainwin
end
|
.new_prompt ⇒ Object
73
74
75
76
77
|
# File 'lib/naksh/interfaces/gtk.rb', line 73
def Rbgtk.new_prompt
@console.buffer.text=@console.buffer.text<<Naksh.replace_vars(Naksh.config['/interface/tty/prompt'])
@console.buffer.create_mark('current_input_start',@console.buffer.end_iter,true)
@console.scroll_to_mark @console.buffer.get_mark('current_input_start'),0.3,false,1,1
end
|
.on_pre_submit ⇒ Object
35
36
37
|
# File 'lib/naksh/interfaces/gtk.rb', line 35
def Rbgtk.on_pre_submit
@console.buffer.insert(@console.buffer.end_iter,"\n")
end
|
.options ⇒ Object
71
72
73
|
# File 'lib/naksh/interfaces/gtk/optwin.rb', line 71
def Rbgtk.options
@optwin
end
|
.out ⇒ Object
84
85
86
|
# File 'lib/naksh/interfaces/gtk/io.rb', line 84
def Rbgtk.out
@out
end
|
.potential_autocomplete_key(config_entry) ⇒ Object
.quit ⇒ Object
28
29
30
31
|
# File 'lib/naksh/interfaces/gtk.rb', line 28
def Rbgtk.quit
Gtk.main_quit
true
end
|
.run(*a) ⇒ Object
run the Gtk GUI with main window
88
89
90
91
92
93
|
# File 'lib/naksh/interfaces/gtk.rb', line 88
def Rbgtk.run *a
a.each do |i|
end
Gtk.main
end
|