wxruby3 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/wx/aui/auinotebook.rb +26 -17
- data/lib/wx/core/dialog.rb +28 -0
- data/lib/wx/version.rb +1 -1
- data/rakelib/lib/director/aui_manager.rb +82 -4
- data/rakelib/lib/director/aui_tab_art.rb +52 -1
- data/rakelib/lib/director/defs.rb +1 -1
- data/rakelib/lib/director/dialog.rb +22 -1
- data/rakelib/lib/generate/doc/aui_manager.yaml +7 -0
- data/tests/test_dialog.rb +61 -0
- data/tests/test_file_dialog.rb +0 -2
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3ea544cb7fe32dce3bbef74d16dc56ebe6fe8cb0ff381cbeee3a5ee9a37471d5
         | 
| 4 | 
            +
              data.tar.gz: 2afddf4097dffcf4ee6bb4ed649d86165dd5e1decea9f330c27792e95eb2447d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 03f848a8b259e10f1a7dfe74505361825e2819cbc8fd2f20d5ca1f1990afa9d9fea4abecaa5bbdda4129864c4f24aa22fb7b1508fc2632839f0d7ffa89919cba
         | 
| 7 | 
            +
              data.tar.gz: e187a4d0fd6c3f4985afae321228e6956e56df349001e2f6478ea458bafaf4bd5e8210d94de963270820eaedc7ff8de9f3b60684cc493415ce5ad67d4741a228
         | 
    
        data/lib/wx/aui/auinotebook.rb
    CHANGED
    
    | @@ -4,27 +4,36 @@ | |
| 4 4 |  | 
| 5 5 | 
             
            # Advanced User Interface Notebook - draggable panes etc
         | 
| 6 6 |  | 
| 7 | 
            -
             | 
| 7 | 
            +
            module  Wx
         | 
| 8 | 
            +
              module AUI
         | 
| 8 9 |  | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
              # that designates the event skipped.
         | 
| 12 | 
            -
              if Wx::WXWIDGETS_VERSION < '3.3'
         | 
| 13 | 
            -
                wx_initialize = instance_method :initialize
         | 
| 14 | 
            -
                wx_redefine_method :initialize do |*args|
         | 
| 15 | 
            -
                  wx_initialize.bind(self).call(*args)
         | 
| 16 | 
            -
                  evt_window_destroy { |evt| evt.skip }
         | 
| 10 | 
            +
                if Wx::WXWIDGETS_VERSION >= '3.3'
         | 
| 11 | 
            +
                  AuiDefaultTabArt = AuiFlatTabArt
         | 
| 17 12 | 
             
                end
         | 
| 18 | 
            -
              end
         | 
| 19 13 |  | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
                   | 
| 24 | 
            -
             | 
| 14 | 
            +
                class AuiNotebook
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                  # Before wxWidgets 3.3 the AUI manager of this control would prevent
         | 
| 17 | 
            +
                  # WindowDestroyEvent propagation so we 'patch' in a std event handler
         | 
| 18 | 
            +
                  # that designates the event skipped.
         | 
| 19 | 
            +
                  if Wx::WXWIDGETS_VERSION < '3.3'
         | 
| 20 | 
            +
                    wx_initialize = instance_method :initialize
         | 
| 21 | 
            +
                    wx_redefine_method :initialize do |*args|
         | 
| 22 | 
            +
                      wx_initialize.bind(self).call(*args)
         | 
| 23 | 
            +
                      evt_window_destroy { |evt| evt.skip }
         | 
| 24 | 
            +
                    end
         | 
| 25 | 
            +
                  end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                  # Convenience method for iterating pages
         | 
| 28 | 
            +
                  def each_page
         | 
| 29 | 
            +
                    if block_given?
         | 
| 30 | 
            +
                      0.upto(get_page_count - 1) do | i |
         | 
| 31 | 
            +
                        yield get_page(i)
         | 
| 32 | 
            +
                      end
         | 
| 33 | 
            +
                    else
         | 
| 34 | 
            +
                      ::Enumerator.new { |y| each_page { |pg| y << pg } }
         | 
| 35 | 
            +
                    end
         | 
| 25 36 | 
             
                  end
         | 
| 26 | 
            -
                else
         | 
| 27 | 
            -
                  ::Enumerator.new { |y| each_page { |pg| y << pg } }
         | 
| 28 37 | 
             
                end
         | 
| 29 38 | 
             
              end
         | 
| 30 39 | 
             
            end
         | 
    
        data/lib/wx/core/dialog.rb
    CHANGED
    
    | @@ -21,6 +21,34 @@ class Wx::Dialog | |
| 21 21 |  | 
| 22 22 | 
             
              end
         | 
| 23 23 |  | 
| 24 | 
            +
              def create_button_sizer(flags)
         | 
| 25 | 
            +
                if Wx.has_feature?(:USE_BUTTON)
         | 
| 26 | 
            +
                  create_std_dialog_button_sizer(flags)
         | 
| 27 | 
            +
                else
         | 
| 28 | 
            +
                  nil
         | 
| 29 | 
            +
                end
         | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
              def create_separated_sizer(sizer)
         | 
| 33 | 
            +
                # Mac Human Interface Guidelines recommend not to use static lines as
         | 
| 34 | 
            +
                # grouping elements
         | 
| 35 | 
            +
                if Wx.has_feature?(:USE_STATLINE) && Wx::PLATFORM != 'WXOSX'
         | 
| 36 | 
            +
                  topsizer = Wx::VBoxSizer.new
         | 
| 37 | 
            +
                  topsizer.add(Wx::StaticLine.new(self),
         | 
| 38 | 
            +
                               Wx::SizerFlags.new.expand.double_border(Wx::BOTTOM))
         | 
| 39 | 
            +
                  topsizer.add(sizer, Wx::SizerFlags.new.expand)
         | 
| 40 | 
            +
                  sizer = topsizer
         | 
| 41 | 
            +
                end
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                sizer
         | 
| 44 | 
            +
              end
         | 
| 45 | 
            +
             | 
| 46 | 
            +
              def create_separated_button_sizer(flags)
         | 
| 47 | 
            +
                  sizer = create_button_sizer(flags)
         | 
| 48 | 
            +
                  return create_separated_sizer(sizer) if sizer
         | 
| 49 | 
            +
                  nil
         | 
| 50 | 
            +
              end
         | 
| 51 | 
            +
             | 
| 24 52 | 
             
              module Functor
         | 
| 25 53 | 
             
                def self.included(klass)
         | 
| 26 54 | 
             
                  scope = klass.name.split('::')
         | 
    
        data/lib/wx/version.rb
    CHANGED
    
    
| @@ -62,7 +62,7 @@ module WXRuby3 | |
| 62 62 | 
             
                            rb_raise(rb_eTypeError, "Expected Array of Integer for 1");
         | 
| 63 63 | 
             
                          }
         | 
| 64 64 | 
             
                        } 
         | 
| 65 | 
            -
             | 
| 65 | 
            +
                      __HEREDOC
         | 
| 66 66 | 
             
                      spec.map 'std::vector<wxAuiPaneLayoutInfo>' => 'Array<Wx::AuiPaneLayoutInfo>' do
         | 
| 67 67 | 
             
                        map_out code: <<~__CODE
         | 
| 68 68 | 
             
                          $result = rb_ary_new();
         | 
| @@ -72,7 +72,7 @@ module WXRuby3 | |
| 72 72 | 
             
                            VALUE r_pane = SWIG_NewPointerObj(new wxAuiPaneLayoutInfo(pane), SWIGTYPE_p_wxAuiPaneLayoutInfo, SWIG_POINTER_OWN);
         | 
| 73 73 | 
             
                            rb_ary_push($result, r_pane);
         | 
| 74 74 | 
             
                          }
         | 
| 75 | 
            -
             | 
| 75 | 
            +
                        __CODE
         | 
| 76 76 | 
             
                        map_directorout code: <<~__CODE
         | 
| 77 77 | 
             
                          if (TYPE($input) == T_ARRAY)
         | 
| 78 78 | 
             
                          {
         | 
| @@ -88,7 +88,7 @@ module WXRuby3 | |
| 88 88 | 
             
                              $result.push_back(*pane);
         | 
| 89 89 | 
             
                            }
         | 
| 90 90 | 
             
                          }
         | 
| 91 | 
            -
             | 
| 91 | 
            +
                        __CODE
         | 
| 92 92 | 
             
                      end
         | 
| 93 93 | 
             
                      spec.map 'std::vector<wxAuiTabLayoutInfo>' => 'Array<Wx::AuiTabLayoutInfo>' do
         | 
| 94 94 | 
             
                        map_out code: <<~__CODE
         | 
| @@ -99,7 +99,7 @@ module WXRuby3 | |
| 99 99 | 
             
                            VALUE r_tab = SWIG_NewPointerObj(new wxAuiTabLayoutInfo(tab), SWIGTYPE_p_wxAuiTabLayoutInfo, SWIG_POINTER_OWN);
         | 
| 100 100 | 
             
                            rb_ary_push($result, r_tab);
         | 
| 101 101 | 
             
                          }
         | 
| 102 | 
            -
             | 
| 102 | 
            +
                        __CODE
         | 
| 103 103 | 
             
                        map_directorout code: <<~__CODE
         | 
| 104 104 | 
             
                          if (TYPE($input) == T_ARRAY)
         | 
| 105 105 | 
             
                          {
         | 
| @@ -115,8 +115,86 @@ module WXRuby3 | |
| 115 115 | 
             
                              $result.push_back(*tab);
         | 
| 116 116 | 
             
                            }
         | 
| 117 117 | 
             
                          }
         | 
| 118 | 
            +
                        __CODE
         | 
| 119 | 
            +
                      end
         | 
| 120 | 
            +
                      # For wxAuiDeserialize::HandleOrphanedPage: the ruby method is passed the AuiNotebook
         | 
| 121 | 
            +
                      # and the page and should return either true if the orphaned page should just be appended
         | 
| 122 | 
            +
                      # to the main tab, a tuple with an AuiTabCtrl and a tab index to place the orphaned page in
         | 
| 123 | 
            +
                      # or false if the orphaned page should be removed.
         | 
| 124 | 
            +
                      spec.map 'int page, wxAuiTabCtrl **tabCtrl, int * tabIndex' do
         | 
| 125 | 
            +
             | 
| 126 | 
            +
                        add_header_code <<~__CODE
         | 
| 127 | 
            +
                          static WxRuby_ID s_AuiTabCtrl_id("AuiTabCtrl");
         | 
| 128 | 
            +
                          __CODE
         | 
| 129 | 
            +
             | 
| 130 | 
            +
                        map_in from: {type: 'Integer', index: 0}, temp: 'wxAuiTabCtrl *tab_ctrl, int tab_ix', code: <<~__CODE
         | 
| 131 | 
            +
                          $1 = NUM2INT($input);
         | 
| 132 | 
            +
                          tab_ctrl = nullptr; tab_ix = 0;
         | 
| 133 | 
            +
                          $2 = &tab_ctrl;
         | 
| 134 | 
            +
                          $3 = &tab_ix;
         | 
| 135 | 
            +
                          __CODE
         | 
| 136 | 
            +
             | 
| 137 | 
            +
                        # ignore C defined return value entirely (also affects directorout)
         | 
| 138 | 
            +
                        map_out ignore: 'bool'
         | 
| 139 | 
            +
             | 
| 140 | 
            +
                        map_argout as: {type: 'Boolean,Array(Wx::AUI::AuiTabCtrl, Integer)', index: 1}, code: <<~__CODE
         | 
| 141 | 
            +
                          if (result)
         | 
| 142 | 
            +
                          {
         | 
| 143 | 
            +
                            if (tab_ctrl$argnum)
         | 
| 144 | 
            +
                            {
         | 
| 145 | 
            +
                              VALUE rb_klass = rb_const_get(mWxAuiManager, s_AuiTabCtrl_id());
         | 
| 146 | 
            +
                              swig_type_info* swig_type = wxRuby_GetSwigTypeForClass(rb_klass);
         | 
| 147 | 
            +
                              $result = rb_ary_new();
         | 
| 148 | 
            +
                              rb_ary_push($result, SWIG_NewPointerObj(SWIG_as_voidptr(tab_ctrl$argnum), swig_type,  0));
         | 
| 149 | 
            +
                              rb_ary_push($result, INT2NUM(tab_ix$argnum));
         | 
| 150 | 
            +
                            }
         | 
| 151 | 
            +
                            else
         | 
| 152 | 
            +
                              $result = Qtrue;
         | 
| 153 | 
            +
                          }
         | 
| 154 | 
            +
                          else
         | 
| 155 | 
            +
                            $result = Qfalse;
         | 
| 118 156 | 
             
                          __CODE
         | 
| 157 | 
            +
             | 
| 158 | 
            +
                        # convert page and ignore rest for now
         | 
| 159 | 
            +
                        map_directorin code: '$input = INT2NUM(page);'
         | 
| 160 | 
            +
             | 
| 161 | 
            +
                        map_directorargout code: <<~__CODE
         | 
| 162 | 
            +
                          if (result != Qfalse)
         | 
| 163 | 
            +
                          {
         | 
| 164 | 
            +
                            if (result == Qtrue)
         | 
| 165 | 
            +
                            {
         | 
| 166 | 
            +
                              c_result = true;
         | 
| 167 | 
            +
                              *tabCtrl = nullptr;
         | 
| 168 | 
            +
                              *tabIndex = 0; 
         | 
| 169 | 
            +
                            }
         | 
| 170 | 
            +
                            else if (TYPE(result) == T_ARRAY && RARRAY_LEN(result) == 2)
         | 
| 171 | 
            +
                            {
         | 
| 172 | 
            +
                              VALUE rb_klass = rb_const_get(mWxAuiManager, s_AuiTabCtrl_id());
         | 
| 173 | 
            +
                              swig_type_info* swig_type = wxRuby_GetSwigTypeForClass(rb_klass);
         | 
| 174 | 
            +
                              void *tab_ctrl;
         | 
| 175 | 
            +
                              int res = SWIG_ConvertPtr(rb_ary_entry(result, 0), &tab_ctrl, swig_type, 0);
         | 
| 176 | 
            +
                              if (!SWIG_IsOK(res)) 
         | 
| 177 | 
            +
                              {
         | 
| 178 | 
            +
                                Swig::DirectorTypeMismatchException::raise(swig_get_self(), "$symname", rb_eTypeError, 
         | 
| 179 | 
            +
                                                                           "HandleOrphanedPage should return false, true or Array(Wx::AUI::AuiTabCtrl, Integer)");
         | 
| 180 | 
            +
                              }
         | 
| 181 | 
            +
                              *tabCtrl = reinterpret_cast<wxAuiTabCtrl*>(tab_ctrl);
         | 
| 182 | 
            +
                              *tabIndex = NUM2INT(rb_ary_entry(result, 1));
         | 
| 183 | 
            +
                              c_result = true;
         | 
| 184 | 
            +
                            }
         | 
| 185 | 
            +
                            else
         | 
| 186 | 
            +
                            {
         | 
| 187 | 
            +
                              Swig::DirectorTypeMismatchException::raise(swig_get_self(), "$symname", rb_eTypeError, 
         | 
| 188 | 
            +
                                                                         "HandleOrphanedPage should return false, true or Array(Wx::AUI::AuiTabCtrl, Integer)");
         | 
| 189 | 
            +
                            }
         | 
| 190 | 
            +
                          }
         | 
| 191 | 
            +
                          else
         | 
| 192 | 
            +
                            c_result = false;
         | 
| 193 | 
            +
                        __CODE
         | 
| 194 | 
            +
             | 
| 119 195 | 
             
                      end
         | 
| 196 | 
            +
                      spec.suppress_warning(473, 'wxAuiDeserializer::CreatePaneWindow')
         | 
| 197 | 
            +
             | 
| 120 198 | 
             
                    end
         | 
| 121 199 | 
             
                    # need a custom implementation to handle (event handler proc) cleanup
         | 
| 122 200 | 
             
                    spec.add_header_code <<~__HEREDOC
         | 
| @@ -14,7 +14,12 @@ module WXRuby3 | |
| 14 14 |  | 
| 15 15 | 
             
                  def setup
         | 
| 16 16 | 
             
                    super
         | 
| 17 | 
            -
                     | 
| 17 | 
            +
                    if Config.instance.wx_version >= '3.3.0'
         | 
| 18 | 
            +
                      spec.items << 'wxAuiFlatTabArt' << 'wxAuiSimpleTabArt'
         | 
| 19 | 
            +
                      spec.ignore 'wxAuiDefaultTabArt', 'wxAuiNativeTabArt'
         | 
| 20 | 
            +
                    else
         | 
| 21 | 
            +
                      spec.items << 'wxAuiDefaultTabArt' << 'wxAuiSimpleTabArt'
         | 
| 22 | 
            +
                    end
         | 
| 18 23 | 
             
                    spec.gc_as_object
         | 
| 19 24 | 
             
                    spec.disable_proxies
         | 
| 20 25 | 
             
                    # missing from interface documentation
         | 
| @@ -92,8 +97,54 @@ module WXRuby3 | |
| 92 97 | 
             
                                          'wxAuiSimpleTabArt::Clone')
         | 
| 93 98 | 
             
                    spec.do_not_generate(:variables, :defines, :enums, :functions)
         | 
| 94 99 | 
             
                  end
         | 
| 100 | 
            +
             | 
| 101 | 
            +
             | 
| 102 | 
            +
                  def generator
         | 
| 103 | 
            +
                    WXRuby3::AuiTabArtGenerator.new(self)
         | 
| 104 | 
            +
                  end
         | 
| 105 | 
            +
                  protected :generator
         | 
| 106 | 
            +
             | 
| 107 | 
            +
                  def doc_generator
         | 
| 108 | 
            +
                    WXRuby3::AuiTabArtDocGenerator.new(self)
         | 
| 109 | 
            +
                  end
         | 
| 110 | 
            +
                  protected :doc_generator
         | 
| 111 | 
            +
             | 
| 95 112 | 
             
                end # class AuiTabArt
         | 
| 96 113 |  | 
| 97 114 | 
             
              end # class Director
         | 
| 98 115 |  | 
| 116 | 
            +
              class AuiTabArtGenerator < InterfaceGenerator
         | 
| 117 | 
            +
             | 
| 118 | 
            +
                def gen_interface_classes(fout)
         | 
| 119 | 
            +
                  super
         | 
| 120 | 
            +
                  if Config.instance.wx_version >= '3.3.0'
         | 
| 121 | 
            +
                    fout.puts
         | 
| 122 | 
            +
                    fout.puts 'class wxAuiNativeTabArt : public wxAuiTabArt'
         | 
| 123 | 
            +
                    fout.puts '{'
         | 
| 124 | 
            +
                    fout.puts '};'
         | 
| 125 | 
            +
                  end
         | 
| 126 | 
            +
                end
         | 
| 127 | 
            +
             | 
| 128 | 
            +
              end
         | 
| 129 | 
            +
             | 
| 130 | 
            +
              class AuiTabArtDocGenerator < DocGenerator
         | 
| 131 | 
            +
                def gen_class_doc(fdoc)
         | 
| 132 | 
            +
                  super
         | 
| 133 | 
            +
                  if Config.instance.wx_version >= '3.3.0'
         | 
| 134 | 
            +
                    fdoc.doc.puts 'Wx::AUI::AuiNativeTabArt is either an art provider providing native-like appearance (WXMSW and WXGTK) or a generic Tab Art provider if not available.'
         | 
| 135 | 
            +
                    fdoc.puts 'class AuiNativeTabArt < AuiTabArt; end'
         | 
| 136 | 
            +
                    fdoc.puts
         | 
| 137 | 
            +
                  end
         | 
| 138 | 
            +
                end
         | 
| 139 | 
            +
                def gen_constants_doc(fdoc)
         | 
| 140 | 
            +
                  super
         | 
| 141 | 
            +
                  if Config.instance.wx_version >= '3.3.0'
         | 
| 142 | 
            +
                    fdoc.doc.puts 'Wx::AUI::AuiDefaultTabArt is an alias for the tab art provider used by {Wx::AUI::AuiNotebook} by default.'
         | 
| 143 | 
            +
                    fdoc.doc.puts 'Since wxWidgets 3.3.0, this is {Wx::AUI::AuiFlatTabArt} under all platforms. In the previous versions, this was wxAuiNativeTabArt.'
         | 
| 144 | 
            +
                    fdoc.puts 'AuiDefaultTabArt = Wx::AUI::AuiFlatTabArt'
         | 
| 145 | 
            +
                    fdoc.puts
         | 
| 146 | 
            +
                  end
         | 
| 147 | 
            +
                end
         | 
| 148 | 
            +
              end
         | 
| 149 | 
            +
             | 
| 99 150 | 
             
            end # module WXRuby3
         | 
| @@ -34,7 +34,28 @@ module WXRuby3 | |
| 34 34 | 
             
                        extern VALUE wxRuby_GetDialogClass() {
         | 
| 35 35 | 
             
                          return SwigClassWxDialog.klass;
         | 
| 36 36 | 
             
                        }
         | 
| 37 | 
            -
             | 
| 37 | 
            +
                        __HEREDOC
         | 
| 38 | 
            +
                      spec.ignore 'wxDialog::CreateButtonSizer',            # pure Ruby impl
         | 
| 39 | 
            +
                                  'wxDialog::CreateSeparatedButtonSizer',   # pure Ruby impl
         | 
| 40 | 
            +
                                  'wxDialog::CreateSeparatedSizer',         # pure Ruby impl
         | 
| 41 | 
            +
                                  'wxDialog::CreateTextSizer',              # custom impl
         | 
| 42 | 
            +
                                  ignore_doc: false
         | 
| 43 | 
            +
                      spec.new_object 'wxDialog::CreateStdDialogButtonSizer' if Config.instance.features_set?('USE_BUTTON')
         | 
| 44 | 
            +
                      spec.add_extend_code 'wxDialog', <<~__HEREDOC
         | 
| 45 | 
            +
                        VALUE CreateTextSizer(const wxString& message, int widthMax)
         | 
| 46 | 
            +
                        {
         | 
| 47 | 
            +
                          wxSizer* txt_szr = $self->CreateTextSizer(message, widthMax);
         | 
| 48 | 
            +
                          if (txt_szr) 
         | 
| 49 | 
            +
                          {
         | 
| 50 | 
            +
                            // Get the wx class
         | 
| 51 | 
            +
                            wxString class_name( txt_szr->GetClassInfo()->GetClassName() );
         | 
| 52 | 
            +
                            swig_type_info* swig_type = wxRuby_GetSwigTypeForClassName(class_name);
         | 
| 53 | 
            +
                            if (swig_type)
         | 
| 54 | 
            +
                              return SWIG_NewPointerObj(SWIG_as_voidptr(txt_szr), swig_type, SWIG_POINTER_OWN |  0 );
         | 
| 55 | 
            +
                          } 
         | 
| 56 | 
            +
                          return Qnil;
         | 
| 57 | 
            +
                        }
         | 
| 58 | 
            +
                        __HEREDOC
         | 
| 38 59 | 
             
                    when 'wxMessageDialog'
         | 
| 39 60 | 
             
                      spec.ignore 'wxMessageDialog::ButtonLabel'
         | 
| 40 61 | 
             
                      spec.map 'const ButtonLabel&' => 'String,Integer' do
         | 
| @@ -19,3 +19,10 @@ | |
| 19 19 | 
             
                        ```ruby
         | 
| 20 20 | 
             
                          @mgr.get_pane(@text1).float
         | 
| 21 21 | 
             
                        ```
         | 
| 22 | 
            +
            :wxAuiBookDeserializer.HandleOrphanedPage:
         | 
| 23 | 
            +
              :detail:
         | 
| 24 | 
            +
                :pre:
         | 
| 25 | 
            +
                  :para:
         | 
| 26 | 
            +
                    - :pattern: !ruby/regexp /The overridden version may return true but modify.*appending them./
         | 
| 27 | 
            +
                      :replace: |
         | 
| 28 | 
            +
                        The overridden version may return a 2-element array with an AuiTabCtrl and tab index instead to change where the page should be inserted, e.g. by returning a tab index of 0 to insert the new pages at the beginning instead of appending them.
         | 
    
        data/tests/test_dialog.rb
    CHANGED
    
    | @@ -16,5 +16,66 @@ class DialogTests < Test::Unit::TestCase | |
| 16 16 | 
             
                dlg = TestDialog.new
         | 
| 17 17 | 
             
                assert_kind_of(Wx::Dialog, dlg)
         | 
| 18 18 | 
             
                assert_kind_of(Wx::Window, dlg)
         | 
| 19 | 
            +
                dlg.destroy
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
              class  TestDialog2 < Wx::Dialog
         | 
| 23 | 
            +
                def initialize
         | 
| 24 | 
            +
                  super(nil, -1,  'Test Dialog')
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                  sizer_top = Wx::VBoxSizer.new
         | 
| 27 | 
            +
                  sizer_top.add(Wx::StaticText.new(self, label: 'Some text ...'))
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                  sizer_btn = Wx::HBoxSizer.new
         | 
| 30 | 
            +
                  btn_focused = Wx::Button.new(self, -1, "Default button")
         | 
| 31 | 
            +
                  btn_other = Wx::Button.new(self, -1, "&Another button")
         | 
| 32 | 
            +
                  btn_close = Wx::Button.new(self, Wx::ID_CANCEL, "&Close")
         | 
| 33 | 
            +
                  sizer_btn.add(btn_focused, 0, Wx::ALIGN_CENTER | Wx::ALL, 5)
         | 
| 34 | 
            +
                  sizer_btn.add(btn_other, 0, Wx::ALIGN_CENTER | Wx::ALL, 5)
         | 
| 35 | 
            +
                  sizer_btn.add(btn_close, 0, Wx::ALIGN_CENTER | Wx::ALL, 5)
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                  sizer_top.add(create_separated_sizer(sizer_btn))
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                  set_auto_layout(true)
         | 
| 40 | 
            +
                  set_sizer(sizer_top)
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                  sizer_top.set_size_hints(self)
         | 
| 43 | 
            +
                  sizer_top.fit(self)
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                  btn_focused.set_focus
         | 
| 46 | 
            +
                  btn_focused.set_default
         | 
| 47 | 
            +
                end
         | 
| 48 | 
            +
              end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
              def test_dialog_with_separated_sizer
         | 
| 51 | 
            +
                dlg = TestDialog2.new
         | 
| 52 | 
            +
                dlg.show(true)
         | 
| 53 | 
            +
                200.times { Wx.get_app.yield }
         | 
| 54 | 
            +
                sleep(2) unless is_ci_build?
         | 
| 55 | 
            +
                dlg.destroy
         | 
| 56 | 
            +
              end
         | 
| 57 | 
            +
             | 
| 58 | 
            +
              class TestDialog3 < Wx::Dialog
         | 
| 59 | 
            +
                def initialize
         | 
| 60 | 
            +
                  super(nil, -1,  'Test Dialog')
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                  sizer_top = Wx::VBoxSizer.new
         | 
| 63 | 
            +
                  sizer_top.add(Wx::StaticText.new(self, label: 'Some text ...'))
         | 
| 64 | 
            +
                  sizer_top.add(create_separated_button_sizer(Wx::YES_NO|Wx::CANCEL))
         | 
| 65 | 
            +
             | 
| 66 | 
            +
                  set_auto_layout(true)
         | 
| 67 | 
            +
                  set_sizer(sizer_top)
         | 
| 68 | 
            +
             | 
| 69 | 
            +
                  sizer_top.set_size_hints(self)
         | 
| 70 | 
            +
                  sizer_top.fit(self)
         | 
| 71 | 
            +
                end
         | 
| 72 | 
            +
              end
         | 
| 73 | 
            +
             | 
| 74 | 
            +
              def test_dialog_with_button_sizer
         | 
| 75 | 
            +
                dlg = TestDialog3.new
         | 
| 76 | 
            +
                dlg.show(true)
         | 
| 77 | 
            +
                200.times { Wx.get_app.yield }
         | 
| 78 | 
            +
                sleep(2) unless is_ci_build?
         | 
| 79 | 
            +
                dlg.destroy
         | 
| 19 80 | 
             
              end
         | 
| 20 81 | 
             
            end
         | 
    
        data/tests/test_file_dialog.rb
    CHANGED
    
    | @@ -18,7 +18,6 @@ class FileDialogTests < Test::Unit::TestCase | |
| 18 18 | 
             
              end
         | 
| 19 19 |  | 
| 20 20 | 
             
              # temporary as wxw >= 3.3.0 introduced a bug
         | 
| 21 | 
            -
              if Wx::WXWIDGETS_VERSION < '3.3.0'
         | 
| 22 21 | 
             
              def test_file_dialog
         | 
| 23 22 | 
             
                dlg = Wx::FileDialog.new(nil, 'Select file')
         | 
| 24 23 | 
             
                assert_kind_of(Wx::FileDialog, dlg)
         | 
| @@ -26,7 +25,6 @@ class FileDialogTests < Test::Unit::TestCase | |
| 26 25 | 
             
                assert_kind_of(Wx::Window, dlg)
         | 
| 27 26 | 
             
                assert_equal(Wx::ID_OK, dialog_tester(dlg))
         | 
| 28 27 | 
             
              end
         | 
| 29 | 
            -
              end
         | 
| 30 28 |  | 
| 31 29 | 
             
              class FileDialogTestCustomization < Wx::FileDialogCustomizeHook
         | 
| 32 30 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: wxruby3
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.5. | 
| 4 | 
            +
              version: 1.5.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Martin Corino
         | 
| 8 8 | 
             
            bindir: bin
         | 
| 9 9 | 
             
            cert_chain: []
         | 
| 10 | 
            -
            date:  | 
| 10 | 
            +
            date: 1980-01-02 00:00:00.000000000 Z
         | 
| 11 11 | 
             
            dependencies:
         | 
| 12 12 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 13 13 | 
             
              name: nokogiri
         | 
| @@ -1210,7 +1210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 1210 1210 | 
             
                - !ruby/object:Gem::Version
         | 
| 1211 1211 | 
             
                  version: '0'
         | 
| 1212 1212 | 
             
            requirements: []
         | 
| 1213 | 
            -
            rubygems_version: 3.6. | 
| 1213 | 
            +
            rubygems_version: 3.6.7
         | 
| 1214 1214 | 
             
            specification_version: 4
         | 
| 1215 1215 | 
             
            summary: wxWidgets extension for Ruby
         | 
| 1216 1216 | 
             
            test_files: []
         |