nobody at rubyforge.org
2006-Dec-31 04:04 UTC
[Wxruby-development] [814] trunk/wxruby2/swig/classes: Added ScrollEvent class plus event processing and handler methods
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type"
content="text/html; charset=utf-8" /><style
type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:'':'';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family:
verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;
font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding:
6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid;
padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family:
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch
.binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[814] trunk/wxruby2/swig/classes: Added ScrollEvent class plus
event processing and handler methods</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>814</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2006-12-30 23:04:00 -0500 (Sat, 30 Dec
2006)</dd>
</dl>
<h3>Log Message</h3>
<pre>Added ScrollEvent class plus event processing and handler
methods</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#trunkwxruby2swigclassesEvtHandleri">trunk/wxruby2/swig/classes/EvtHandler.i</a></li>
<li><a
href="#trunkwxruby2swigclassesincludeeventsrb">trunk/wxruby2/swig/classes/include/events.rb</a></li>
<li><a
href="#trunkwxruby2swigclassesincludewxScrollEventh">trunk/wxruby2/swig/classes/include/wxScrollEvent.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a
href="#trunkwxruby2swigclassesScrollEventi">trunk/wxruby2/swig/classes/ScrollEvent.i</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwxruby2swigclassesEvtHandleri"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/swig/classes/EvtHandler.i (813 => 814)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/swig/classes/EvtHandler.i        2006-12-31
03:21:32 UTC (rev 813)
+++
trunk/wxruby2/swig/classes/EvtHandler.i        2006-12-31
04:04:00 UTC (rev 814)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> extern swig_class
cWxGridEditorCreatedEvent;
</span><span class="cx"> extern swig_class cWxTreeEvent;
</span><span class="cx"> extern swig_class
cWxSplitterEvent;
</span><ins>+extern swig_class cWxScrollEvent;
</ins><span class="cx"> extern swig_class
cWxScrollWinEvent;
</span><span class="cx"> extern swig_class cWxMoveEvent;
</span><span class="cx"> extern swig_class cWxListEvent;
</span><span class="lines">@@ -266,6 +267,21 @@
</span><span class="cx"> (const wxEventType *)0
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+static const wxEventType *scrollEvents[] +{
+ &wxEVT_SCROLL_TOP,
+ &wxEVT_SCROLL_BOTTOM,
+ &wxEVT_SCROLL_LINEUP,
+ &wxEVT_SCROLL_LINEDOWN,
+ &wxEVT_SCROLL_PAGEUP,
+ &wxEVT_SCROLL_PAGEDOWN,
+ &wxEVT_SCROLL_THUMBTRACK,
+ &wxEVT_SCROLL_THUMBRELEASE,
+ &wxEVT_SCROLL_CHANGED,
+ (const wxEventType *)0
+};
+
+
</ins><span class="cx"> static const wxEventType
*scrollWinEvents[] </span><span class="cx"> {
</span><span class="cx"> &wxEVT_SCROLLWIN_TOP,
</span><span class="lines">@@ -396,6 +412,8 @@
</span><span class="cx">
                        cEvent
= cWxMoveEvent.klass;
</span><span class="cx"> else
if(event.IsKindOf(CLASSINFO(wxListEvent)))
</span><span class="cx"> cEvent =
cWxListEvent.klass;
</span><ins>+ else
if(event.IsKindOf(CLASSINFO(wxScrollEvent)))
+ cEvent = cWxScrollEvent.klass;
</ins><span class="cx"> else
if(event.IsKindOf(CLASSINFO(wxScrollWinEvent)))
</span><span class="cx"> cEvent =
cWxScrollWinEvent.klass;
</span><span class="cx"> else
if(event.IsKindOf(CLASSINFO(wxWizardEvent)))
</span><span class="lines">@@ -1041,7 +1059,6 @@
</span><span class="cx"> return
internal_evt_with_id_range(argc_1, argc_2, argv, self,
wxEVT_SASH_DRAGGED_RANGE);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> static VALUE evt_scrollwin_top(int
argc, VALUE *argv, VALUE self)
</span><span class="cx"> {
</span><span class="cx"> return
internal_evt_no_parameters(argc, argv, self, wxEVT_SCROLLWIN_TOP);
</span></span></pre></div>
<a id="trunkwxruby2swigclassesScrollEventi"></a>
<div class="addfile"><h4>Added:
trunk/wxruby2/swig/classes/ScrollEvent.i (0 => 814)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/swig/classes/ScrollEvent.i        
(rev 0)
+++
trunk/wxruby2/swig/classes/ScrollEvent.i        2006-12-31
04:04:00 UTC (rev 814)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+# Copyright 2004-2006 by Kevin Smith
+# released under the MIT-style wxruby2 license
+
+%include "../common.i"
+
+%module(directors="1") wxScrollEvent
+
+%import "include/wxObject.h"
+%import "include/wxEvent.h"
+%import "include/wxCommandEvent.h"
+
+%include "include/wxScrollEvent.h"
</ins></span></pre></div>
<a id="trunkwxruby2swigclassesincludeeventsrb"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/swig/classes/include/events.rb (813 => 814)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/swig/classes/include/events.rb        2006-12-31
03:21:32 UTC (rev 813)
+++
trunk/wxruby2/swig/classes/include/events.rb        2006-12-31
04:04:00 UTC (rev 814)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+# This describes the event types known to wxRuby. It is
used by
+# swig/fixevents.rb to automatically generate a set of evt_xxx methods
+# for binding events
+#
+# In each array:
+# * the first item is the name of the method that will be created
+# * the second item is the number of parameters the method expects
+# * the third item is the mapping to an wx event type constant
+# (see RubyEventTypes.i)
+
</ins><span class="cx"> $events = [
</span><span class="cx"> ["EVT_TREE_END_DRAG",
2, "wxEVT_COMMAND_TREE_END_DRAG"],
</span><span class="cx">
["EVT_COMMAND_LEFT_CLICK", 2, "wxEVT_COMMAND_LEFT_CLICK"],
</span><span class="lines">@@ -209,6 +219,15 @@
</span><span class="cx"> ["EVT_TIMER", 2,
"wxEVT_TIMER"],
</span><span class="cx"> ["EVT_CREATE", 2,
"wxEVT_CREATE"],
</span><span class="cx"> ["EVT_DESTROY", 2,
"wxEVT_DESTROY"],
</span><ins>+["EVT_SCROLL", 1, "0"],
+["EVT_SCROLL_TOP", 1, "wxEVT_SCROLL_TOP"],
+["EVT_SCROLL_BOTTOM", 1, "wxEVT_SCROLL_BOTTOM"],
+["EVT_SCROLL_LINEUP", 1, "wxEVT_SCROLL_LINEUP"],
+["EVT_SCROLL_LINEDOWN", 1,"wxEVT_SCROLL_LINEDOWN"],
+["EVT_SCROLL_PAGEUP", 1, "wxEVT_SCROLL_PAGEUP"],
+["EVT_SCROLL_PAGEDOWN", 1, "wxEVT_SCROLL_PAGEDOWN"],
+["EVT_SCROLL_THUMBTRACK", 1, "wxEVT_SCROLL_THUMBTRACK"],
+["EVT_SCROLL_THUMBRELEASE", 1, "wxEVT_SCROLL_THUMBRELEASE"]
</ins><span class="cx"> ]
</span><span class="cx">
</span><span class="cx">
if(ENV[''WXSCINTILLA''])
</span></span></pre></div>
<a id="trunkwxruby2swigclassesincludewxScrollEventh"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/swig/classes/include/wxScrollEvent.h (813 => 814)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/swig/classes/include/wxScrollEvent.h        2006-12-31
03:21:32 UTC (rev 813)
+++
trunk/wxruby2/swig/classes/include/wxScrollEvent.h        2006-12-31
04:04:00 UTC (rev 814)
</span><span class="lines">@@ -1,31 +1,13 @@
</span><del>-// wxScrollEvent.h
-// This file was automatically generated
-// by extractxml.rb, part of the wxRuby project
-// Do not make changes directly to this file!
</del><ins>+// Copyright 2004-2006 by Kevin Smith
+// released under the MIT-style wxruby2 license
</ins><span class="cx">
</span><span class="cx"> #if !defined(_wxScrollEvent_h_)
</span><span class="cx"> #define _wxScrollEvent_h_
</span><span class="cx"> class wxScrollEvent : public
wxCommandEvent
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>-        /**
-         *
\brief Constructor.
-         *
\param WXTYPE
-         *
\param int
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> wxScrollEvent(WXTYPE
commandType = 0, int id = 0, int pos = 0, int orientation = 0) ;
</span><del>-        /**
-         *
\brief Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the
scrollbar.
-        */
-
</del><span class="cx"> int GetOrientation() const;
</span><del>-        /**
-         *
\brief Returns the position of the scrollbar.
-        */
-
</del><span class="cx"> int GetPosition() const;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>
Maybe Matching Threads
- [1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
- [802] trunk/wxruby2/swig/classes: Add support for MenuEvent (MENU_OPEN, MENU_CLOSE, MENU_HIGHLIGHT)
- [982] branches/wxruby2/wxwidgets_282/swig/classes/EvtHandler.i: Add EvtThunker mapping for TimerEvent (bug 10391)
- [815] trunk/wxruby2/swig/classes: Added ContextMenuEvent class plus event handling methods
- [790] trunk/wxruby2/swig/classes: Added TextUrlEvent class and EvtHandler mapping
