Class Ui::WxWidgets::DradisGui
In: ui/wx.rb
Parent: Wx::App

Main Wx Application, handles the creation of main window, window title, etc.

Methods

notify   on_init   run   setup   teardown  

Included Modules

Core::Interfaces::View

Public Instance methods

[Source]

# File ui/wx.rb, line 78
      def notify(event, *args)
        if @frame.nil?
          # an error accured during initialisation
          $logger.error{ event }
          $logger.error{ args }
        else
          @frame.notify(event, *args)
        end
      end

[Source]

# File ui/wx.rb, line 53
      def on_init
        @frame = Ui::WxWidgets::DradisWindow.new( nil, 
                           Wx::ID_ANY, 
                           "dradis",
                           Wx::DEFAULT_POSITION,
                           Wx::Size.new(800, 650) 
                        )
        set_top_window(@frame)
        @frame.controller = @controller
        @frame.show
        return true                       
      end

[Source]

# File ui/wx.rb, line 71
      def run()      
        main_loop
      end

[Source]

# File ui/wx.rb, line 65
      def setup(new_controller)
        @controller = new_controller
        # register the view as an observer of the exceptions thrown by the 
        # controller
        @controller.add_observer(:exception, self)
      end

[Source]

# File ui/wx.rb, line 74
      def teardown()
        @frame.teardown
      end

[Validate]