search for: rb_sizer

Displaying 5 results from an estimated 5 matches for "rb_sizer".

Did you mean: rb_size
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...at are known to belong to a still-alive window should be marked, -// not those picked up as marked by in-scope variables by -// Ruby. Otherwise, segfaults may result. Because Sizers are SWIG -// directors, they must be preserved from GC. -void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer, VALUE rb_sizer) -{ - // First, mark this sizer - rb_gc_mark( rb_sizer ); - - // Then loop over hte sizer''s content and mark each sub-sizer in turn - wxSizerItemList& children = wx_sizer->GetChildren(); - for ( wxwxSizerItemListNode *node = children.GetFirst(); -&nbsp&nbsp&nbsp&...
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...at are known to belong to a still-alive window should be marked, +// not those picked up as marked by in-scope variables by +// Ruby. Otherwise, segfaults may result. Because Sizers are SWIG +// directors, they must be preserved from GC. +void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer, VALUE rb_sizer) +{ + // First, mark this sizer + rb_gc_mark( rb_sizer ); + + // Then loop over hte sizer''s content and mark each sub-sizer in turn + wxSizerItemList& children = wx_sizer->GetChildren(); + for ( wxwxSizerItemListNode *node = children.GetFirst(); +&nbsp&nbsp&nbsp&...
2007 Jul 20
0
[1123] trunk/wxruby2/swig/wx.i: Check sizers being marked have a ruby rep and are not internal Wx-only,
...aults may result. Because Sizers are SWIG </span><span class="cx"> // directors, they must be preserved from GC. </span><del>-void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer) </del><ins>+void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer, VALUE rb_sizer) </ins><span class="cx"> { </span><span class="cx"> // First, mark this sizer </span><del>- rb_gc_mark( SWIG_RubyInstanceFor(wx_sizer) ); </del><ins>+ rb_gc_mark( rb_sizer ); </ins><span class="cx"> &lt...
2007 May 22
0
[1032] trunk/wxruby2/swig: Preserve Sizers associated with Windows from GC; fix several sample
...if ( GC_IsWindowDeleted(ptr) ) return; + + wxWindow* wx_win = (wxWindow*)ptr; + wxSizer* wx_sizer = wx_win->GetSizer(); + if ( wx_sizer ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUE rb_sizer = SWIG_RubyInstanceFor(wx_sizer); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_gc_mark(rb_sizer); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp} + + wxCaret* wx_caret = wx_win->GetCaret(); + if ( wx_caret ) +&nbsp&nbsp&nb...
2007 Jul 04
0
[1108] trunk/wxruby2/swig: Revised mem mgmt for Sizers to address more GC crashes in Sizers demo
...quot;> wxSizer* wx_sizer = wx_win->GetSizer(); </span><span class="cx"> if ( wx_sizer ) </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUE rb_sizer = SWIG_RubyInstanceFor(wx_sizer); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_gc_mark(rb_sizer); </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&...