Sha256: e6b5c79af44cddc0bca2b776c2b94f77f95580a31f229eb7972cc448532df832

Contents?: true

Size: 1.92 KB

Versions: 9

Compression:

Stored size: 1.92 KB

Contents

# Wx core package loader for wxRuby3
# Copyright (c) M.J.N. Corino, The Netherlands

require_relative './startup' if File.exist?(File.join(__dir__, 'startup.rb'))

require 'wxruby_core'

# Load the version information (should be bundled with all released versions)
begin
  require 'wx/version'
rescue LoadError
  Wx::WXRUBY_VERSION = '0.0.0'
end

# decompose wxRuby version
Wx::WXRUBY_RELEASE_TYPE = (/\d+\.\d+\.\d+-?(.+)/ =~ Wx::WXRUBY_VERSION ? $1 : '')
Wx::WXRUBY_MAJOR,
  Wx::WXRUBY_MINOR,
  Wx::WXRUBY_RELEASE = Wx::WXRUBY_VERSION.split('.').collect { |v| v.to_i }

# Convenience string for WxWidgets version info
Wx::WXWIDGETS_VERSION = '%i.%i.%i' % [ Wx::WXWIDGETS_MAJOR_VERSION,
                                       Wx::WXWIDGETS_MINOR_VERSION,
                                       Wx::WXWIDGETS_RELEASE_NUMBER ]

# Helper functions
require 'wx/helpers'

# Accessor automagic
require 'wx/accessors'

# Global constant compatibility helper
require 'wx/global_const'

# ctor syntax sweeteners support
require 'wx/keyword_ctors'

# Load in all the class extension methods written in ruby
# evthandler must be required first b/c it sets up methods modified elsewhere
require 'wx/core/evthandler.rb'
class_files = File.join( File.dirname(__FILE__), 'core', '*.rb')
Dir.glob(class_files) do | class_file |
  require 'wx/core/' + File.basename(class_file)
end

::Wx.include(WxRubyStyleAccessors)

::Wx.include((defined?(::WX_GLOBAL_CONSTANTS) && ::WX_GLOBAL_CONSTANTS) ? WxGlobalConstants : WxEnumConstants)

# Load in syntax sweeteners
require 'wx/keyword_defs'

# If a program is ended by ruby's exit, it can bypass doing the proper
# Wx clean-up routines called by Wx::App#on_exit. This can under some
# circumstances cause crashes as the application ends.
Kernel::at_exit do
  # These are set at App startup and wxRuby shut down respectively - see App.i
  if Wx::const_defined?(:THE_APP) and Wx::THE_APP.is_running
    Wx::THE_APP.wx_ruby_cleanup
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wxruby3-0.9.0.pre.rc.3 lib/wx/core.rb
wxruby3-0.9.0.pre.rc.2 lib/wx/core.rb
wxruby3-0.9.0.pre.rc.1 lib/wx/core.rb
wxruby3-0.9.0.pre.beta.14 lib/wx/core.rb
wxruby3-0.9.0.pre.beta.13 lib/wx/core.rb
wxruby3-0.9.0.pre.beta.11 lib/wx/core.rb
wxruby3-0.9.0.pre.beta.10 lib/wx/core.rb
wxruby3-0.9.0.pre.beta.9 lib/wx/core.rb
wxruby3-0.9.0.pre.beta.8 lib/wx/core.rb