Displaying 11 results from an estimated 11 matches for "wxarrayint".
2005 Aug 29
1
wxArrayInt typemap patch
This patch converts wxArrayInt to Ruby arrays.
Sean
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
2006 Nov 24
0
[756] trunk/wxruby2/swig: Moved one-shot typemaps for ListBox.get_selections into ListBox.i
...n class="lines">@@ -21,6 +21,28 @@
</span><span class="cx"> // end client_data fixes
</span><span class="cx">
</span><span class="cx">
</span><ins>+// typemaps for GetSelections()
+%typemap(in,numinputs=0) (wxArrayInt& selections) (wxArrayInt tmp) {
+ $1 = &tmp;
+}
+
+%typemap(out) (wxArrayInt& selections) {
+ $result = rb_ary_new();
+ for (int i = 0; i < $1.GetCount(); i++)
+ {
+ rb_ary_push($result,INT2NUM( $1.Item(i) ) );
+ }
+}
+
+%typemap(argout) (wxArrayInt& selections) {
+ $re...
2007 Jan 08
0
[845] trunk/wxruby2/swig/classes: Added MultiChoiceDialog in class form
...the MIT-style wxruby2 license
+
+%include "../common.i"
+
+%module(directors="1") wxMultiChoiceDialog
+
+%{
+#include <wx/choicdlg.h>
+%}
+
+// for SetSelections - note that GetSelectiosn is dealt with the standard
+// typemap(out) ArrayInt in typemap.i
+%typemap(in) const wxArrayInt& selections (wxArrayInt tmp){
+ if (($input == Qnil) || (TYPE($input) != T_ARRAY))
+ {
+ $1 = &tmp;
+ }
+ else
+ {
+ for (int i = 0; i < RARRAY_LEN($input); i++)
+ {
+ int item = NUM2INT(rb_ary_entry($input,i));
+ tmp.Add(item);
+ }
+ $1 = &tmp;
+ }
+}...
2005 Sep 04
3
Possible patch for wxCheckListBox.h
I cut-n-pasted the public section from the wxWindows headers. Several
things were missing so it seemed the easiest way to fix it. This fixed
a problem with the way the overloaded new was being handled. This
correctly generated all the versions so that it won''t have the problem
with the non-initialized default parameters. I will admit I haven''t
done serious testing on
2007 Jul 18
0
[1119] trunk/wxruby2/swig/Functions.i: Avoid erroneous ''parent must not be nil'' errors when using global
...bsp                 "Cannot display dialog before App.main_loop has been called");}
+}
+
</ins><span class="cx"> %typemap(in,numinputs=0) wxArrayInt &selections (wxArrayInt sel)
</span><span class="cx"> {
</span><span class="cx">         $1 = &sel;
</span></span></pre>
</div>
</div>
</body>
<...
2007 Mar 27
0
[921] branches/wxruby2/wxwidgets_282/swig/Functions.i: Enable Wx::get_number_from_user to fix exception in samples/dialogs
...;span class="cx"> #include <wx/utils.h>
</span><span class="cx">
</span><span class="lines">@@ -125,7 +126,11 @@
</span><span class="cx">
</span><span class="cx"> size_t wxGetMultipleChoices(wxArrayInt& selections,const wxString& message,const wxString& caption,int n, const wxString choices[],wxWindow *parent = NULL,int x = -1, int y = -1,bool centre = TRUE,int width=150, int height=200);
</span><span class="cx">
</span><del>-//long wxGetNumberFromUs...
2006 Nov 23
0
[752] trunk/wxruby2: Fix for Bug #6810: ListBox#get_selections should return an array of selections
...;nbsp2006-11-23 05:58:43 UTC (rev 752)
</span><span class="lines">@@ -395,6 +395,16 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+%typemap(argout) (wxArrayInt& selections) {
+
+ $result = rb_ary_new();
+
+ for (int i = 0; i < ($1)->GetCount(); i++)
+ {
+ rb_ary_push($result,INT2NUM( ($1)->Item(i) ) );
+ }
+}
+
</ins><span class="cx"> ##############################################################
</span>...
2007 Jul 18
0
[1118] trunk/wxruby2/swig: Move Wx::message_box function from wx.i to Functions.i, where it belongs
...an class="cx">
</span><ins>+int wxMessageBox(const wxString& message, const wxString& caption = wxT("Message"), int style = wxOK, wxWindow *parent = NULL, int x = -1, int y = -1);
+
</ins><span class="cx"> size_t wxGetMultipleChoices(wxArrayInt& selections,const wxString& message,const wxString& caption,int n, const wxString choices[],wxWindow *parent = NULL,int x = -1, int y = -1,bool centre = TRUE,int width=150, int height=200);
</span><span class="cx">
</span><span class="cx"> lo...
2007 Mar 19
0
[900] branches/wxruby2/wxwidgets_282/swig/classes: Initial commit of AUI core classes
...epaint(wxDC* dc = NULL);
+ void ProcessMgrEvent(wxAuiManagerEvent& event);
+ void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
+ const wxMouseEvent& event);
+ void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
+ wxArrayInt& positions,
+ wxArrayInt& sizes);
+
+
+public:
+
+ // public events (which can be invoked externally)
+ void OnRender(wxAuiManagerEvent& evt);
+ void OnPaneButton(wxAuiManagerEvent& evt);
+
+protected:
+
+ // protected events
+ void OnPain...
2007 Mar 17
0
[883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
....i        2007-03-17 18:39:40 UTC (rev 883)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">
</span><span class="cx"> size_t wxGetMultipleChoices(wxArrayInt& selections,const wxString& message,const wxString& caption,int n, const wxString choices[],wxWindow *parent = NULL,int x = -1, int y = -1,bool centre = TRUE,int width=150, int height=200);
</span><span class="cx">
</span><del>-long wxGetNumberFromUser...
2007 Mar 29
0
[929] branches/wxruby2/wxwidgets_282/swig/classes: Fix virtual methods that shouldn''t be (Bug 9682); Add missing methods and
...sp                 wxFont *font = NULL) const;
+ wxSize GetMultiLineTextExtent(const wxString& string) const;
+ bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
</ins><span class="cx"> const wxPen& GetPen() const;
</span><del>- virtual bool GetPixel(wxCoord x , wxCoord y , wxColour * colour ) = 0;
- virtual void GetSize(wxCoord * width , wxCoord * height ) = 0;
- //wxColour& GetTextBack...