Module: Naksh::Interfaces::Wxw

Defined in:
lib/naksh/interfaces/wxw.rb,
lib/naksh/interfaces/wxw/io.rb,
lib/naksh/interfaces/wxw/abtwin.rb,
lib/naksh/interfaces/wxw/optwin.rb,
lib/naksh/interfaces/wxw/helpwin.rb,
lib/naksh/interfaces/wxw/mainwin.rb,
lib/naksh/interfaces/wxw/mainwin/sessions.rb,
lib/naksh/interfaces/wxw/mainwin/main_menu.rb

Defined Under Namespace

Classes: MainApp

Class Method Summary collapse

Class Method Details

.aboutObject



30
31
32
# File 'lib/naksh/interfaces/wxw/abtwin.rb', line 30

def Wxw.about
  @abtwin
end

.errObject



53
54
55
# File 'lib/naksh/interfaces/wxw/io.rb', line 53

def Wxw.err
  @err
end

.helpObject



32
33
34
# File 'lib/naksh/interfaces/wxw/helpwin.rb', line 32

def Wxw.help
  @helpwin
end

.inObject

duplicate of the current input, modifications are ignored if the user pressed ‘return’ right now, this is what would be sent to syntax.execute



28
29
30
# File 'lib/naksh/interfaces/wxw/io.rb', line 28

def Wxw.in
  @in
end

.in=(str) ⇒ Object



32
33
34
35
# File 'lib/naksh/interfaces/wxw/io.rb', line 32

def Wxw.in= str


end

.mainObject

the principal Terminal Emulator window



36
37
38
# File 'lib/naksh/interfaces/wxw/mainwin.rb', line 36

def Wxw.main
  @mainwin
end

.new_tab(session = Naksh::Session.new, give_focus = true) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/naksh/interfaces/wxw/mainwin/sessions.rb', line 32

def Wxw.new_tab session=Naksh::Session.new, give_focus=true
  current_tab=Tab.new
  current_tab.textbox = Wx::TextCtrl.new(
    @notebook,
    "11#{current_tab.number.to_s.pad(3,'0')}".to_i(10),
    'a simple value for console '<<current_tab.number.to_s,
    Wx::DEFAULT_POSITION,
    Wx::DEFAULT_SIZE,
    Wx::TE_MULTILINE,
    Wx::DEFAULT_VALIDATOR,
    "Console #{current_tab.number} TextCtrl")
  @notebook.add_page current_tab.textbox,"Page #{current_tab.number}",give_focus
  true
end

.optionsObject



29
30
31
# File 'lib/naksh/interfaces/wxw/optwin.rb', line 29

def Wxw.options
  @optwin
end

.outObject



48
49
50
# File 'lib/naksh/interfaces/wxw/io.rb', line 48

def Wxw.out
  @out
end

.preloaded_sessionsObject



52
53
54
55
56
# File 'lib/naksh/interfaces/wxw.rb', line 52

def Wxw.preloaded_sessions
  r=@preloaded_sessions
  @preloaded_sessions=nil
  r
end

.quit(return_value = nil) ⇒ Object



65
66
67
68
69
# File 'lib/naksh/interfaces/wxw.rb', line 65

def Wxw.quit return_value=nil
  @mainwin.destroy
  #MainApp.exit_main_loop
  return_value
end

.run(*a) ⇒ Object

run the Wx GUI with main window



59
60
61
62
# File 'lib/naksh/interfaces/wxw.rb', line 59

def Wxw.run(*a)
  @preloaded_sessions=a
  @app.main_loop
end

.setup_helpwinObject



26
27
28
29
# File 'lib/naksh/interfaces/wxw/helpwin.rb', line 26

def Wxw.setup_helpwin
  @helpwin=nil
  0
end

.tabsObject



27
28
29
# File 'lib/naksh/interfaces/wxw/mainwin/sessions.rb', line 27

def Wxw.tabs
  Tab.tabs
end