Sha256: 7be511bf1be7f2b84c206c467dbe522002675a3c1d3c8024fd5bc6af49db30b5

Contents?: true

Size: 971 Bytes

Versions: 4

Compression:

Stored size: 971 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.
# 
# Some parts are
# Copyright 2004-2007, wxRuby development team
# released under the MIT-like wxRuby2 license

# Adapted for wxRuby3
###

require 'wx'

module EmptySample

  include WxRuby::Sample if defined? WxRuby::Sample

  def self.describe
    { file: __FILE__,
      summary: 'Empty wxRuby example.',
      description: 'wxRuby example displaying empty frame window.' }
  end

  def self.activate
    frame = Wx::Frame.new(nil, title: "Empty wxRuby App")
    frame.icon = Wx.Icon(:sample, Wx::BITMAP_TYPE_XPM, art_path: File.join(__dir__, '..'))
    frame.show
    frame
  end

  def self.run
    execute(__FILE__)
  end

end

if $0 == __FILE__
  # This is the minimum code to start a WxRuby app - create a Frame, and
  # show it.
  Wx::App.run do
    self.app_name = 'Nothing'
    EmptySample.activate
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt samples/minimal/nothing.rb
wxruby3-0.9.5-x64-mingw-ucrt samples/minimal/nothing.rb
wxruby3-0.9.4-x64-mingw-ucrt samples/minimal/nothing.rb
wxruby3-0.9.3-x64-mingw-ucrt samples/minimal/nothing.rb