Sha256: c1b492cd8cab6346b6e9ab62bed794fa6db6b572440c0b68a5a3a1d728234719

Contents?: true

Size: 1.96 KB

Versions: 7

Compression:

Stored size: 1.96 KB

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

class Wx::RTC::SymbolPickerDialog

  # special handling for keyword ctor extension here
  # as this class deviates from 'normal' window ctors
  Wx::define_keyword_ctors(Wx::RTC::SymbolPickerDialog) do
    wx_ctor_params :id, :caption => 'Symbols'
    wx_ctor_params :pos, :size => [400,300]
    wx_ctor_params :style => Wx::DEFAULT_DIALOG_STYLE|Wx::RESIZE_BORDER|Wx::CLOSE_BOX
  end

  # now redefine the overridden ctor to account for deviating arglist
  def initialize(symbol, initialFont, normalTextFont, parent = nil, *mixed_args, &block)
    real_args = begin
                  [ symbol, initialFont, normalTextFont, parent ] + self.class.args_as_list(*mixed_args)
                rescue => err
                  msg = "Error initializing #{self.inspect}\n"+
                    " : #{err.message} \n" +
                    "Provided are #{[ symbol, initialFont, normalTextFont, parent ] + mixed_args} \n" +
                    "Correct parameters for #{self.class.name}.new are:\n" +
                    self.class.describe_constructor(
                      ":symbol => (String)\n:initialFont => (String)\n:normalTextFont => (String)\n:parent => (Wx::Window)\n")

                  new_err = err.class.new(msg)
                  new_err.set_backtrace(caller)
                  Kernel.raise new_err
                end
    begin
      pre_wx_kwctor_init(*real_args)
    rescue => err
      msg = "Error initializing #{self.inspect}\n"+
        " : #{err.message} \n" +
        "Provided are #{real_args} \n" +
        "Correct parameters for #{self.class.name}.new are:\n" +
        self.class.describe_constructor(
          ":symbol => (String)\n:initialFont => (String)\n:normalTextFont => (String)\n:parent => (Wx::Window)\n")

      new_err = err.class.new(msg)
      new_err.set_backtrace(caller)
      Kernel.raise new_err
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb
wxruby3-0.9.5-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb
wxruby3-0.9.4-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb
wxruby3-0.9.3-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/rtc/symbol_picker_dialog.rb