Displaying 6 results from an estimated 6 matches for "m_pitem".
Did you mean:
_item
2007 Jan 05
0
[831] trunk/wxruby2: Use simple ruby Integers to represent TreeItemIds
...ret_item_ruby);        
</del><ins>+
+                rb_ary_push(array,LONG2NUM((long)ret_item.m_pItem));
</ins><span class="cx">                 rb_ary_push(array,LONG2NUM((long)cookie));
</span><span class="cx">  &n...
2006 Dec 30
1
wxTreeItemId
...away
with the wxTreeItemId class, and just use typemaps to convert these to
ruby Integers (as in 0.6.0). The following seems to work for me:
%typemap(in) wxTreeItemId& "$1 = new wxTreeItemId(NUM2INT($input));"
%typemap(directorin) wxTreeItemId& "$input = LONG2NUM( (long)$1.m_pItem );"
%typemap(out) wxTreeItemId "$result = LONG2NUM( (long)$1.m_pItem );"
I''m not sure the overhead of directors etc is needed for TreeItemId -
the only method that wxTreeItemId offers over Integer is is_ok, which
can be done with zero?
Let me know if we should keep this...
2007 Mar 17
0
[888] branches/wxruby2/wxwidgets_282/swig/shared/treeitemid_typemaps.i: Fix compile warning for TreeItemId typemap (Artur Kuptel)
...p(in) wxTreeItemId& "$1 = new wxTreeItemId(NUM2LONG($input));"
</del><ins>+%typemap(in) wxTreeItemId& "$1 = new wxTreeItemId((void*)NUM2LONG($input));"
</ins><span class="cx"> %typemap(out) wxTreeItemId "$result = LONG2NUM( (long)$1.m_pItem );"
</span><span class="cx"> %typemap(directorin) wxTreeItemId& "$input = LONG2NUM( (long)$1.m_pItem );"
</span><del>-%typemap(directorout) wxTreeItemId& "$result = new wxTreeItemId(NUM2LONG($1));"
</del><ins>+%typemap(d...
2006 Dec 24
0
[799] trunk/wxruby2: Fixed TreeItemId == method
...t;cx"> %}
</span><span class="cx">
</span><ins>+// returns the underlying opaque identifier as a ruby fixnum
+%extend wxTreeItemId {
+ VALUE to_i()
+ {
+        return INT2NUM( (int)self->m_pItem );
+ }
+}
+
</ins><span class="cx"> %include "include/wxTreeItemId.h"
</span></span></pre>
</div>
</div>
</body>
</html>
2006 Dec 23
0
[797] trunk/wxruby2/swig/classes/TreeCtrl.i: Traverse method moved to wxSugar
...eCtrlYielding(void *ptr, const wxTreeItemId& item_id)
- {
-        // create a copy to wrap and give to ruby
-        wxTreeItemId *copy_id = new wxTreeItemId(item_id.m_pItem);
-        VALUE rb_item_id = SWIG_NewPointerObj(copy_id, SWIGTYPE_p_wxTreeItemId, SWIG_POINTER_OWN);
-        rb_yield(rb_item_id);
- }
</del><span class="...
2006 Dec 05
0
[779] trunk/wxruby2: Added TreeCtrl#traverse method and documentation
...eCtrlYielding(void *ptr, const wxTreeItemId& item_id)
+ {
+        // create a copy to wrap and give to ruby
+        wxTreeItemId *copy_id = new wxTreeItemId(item_id.m_pItem);
+        VALUE rb_item_id = SWIG_NewPointerObj(copy_id, SWIGTYPE_p_wxTreeItemId, SWIG_POINTER_OWN);
+        rb_yield(rb_item_id);
+ }
</ins><span class="...