nobody at rubyforge.org
2006-Dec-20 23:24 UTC
[Wxruby-development] [790] trunk/wxruby2/swig/classes: Added TextUrlEvent class and EvtHandler mapping
<!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>[790] trunk/wxruby2/swig/classes: Added TextUrlEvent class and EvtHandler mapping</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>790</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2006-12-20 18:24:31 -0500 (Wed, 20 Dec 2006)</dd> </dl> <h3>Log Message</h3> <pre>Added TextUrlEvent class and EvtHandler mapping</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2swigclassesEvtHandleri">trunk/wxruby2/swig/classes/EvtHandler.i</a></li> </ul> <h3>Added Paths</h3> <ul> <li><a href="#trunkwxruby2swigclassesTextUrlEventi">trunk/wxruby2/swig/classes/TextUrlEvent.i</a></li> <li><a href="#trunkwxruby2swigclassesincludewxTextUrlEventh">trunk/wxruby2/swig/classes/include/wxTextUrlEvent.h</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 (789 => 790)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/classes/EvtHandler.i        2006-12-20 22:59:02 UTC (rev 789) +++ trunk/wxruby2/swig/classes/EvtHandler.i        2006-12-20 23:24:31 UTC (rev 790) </span><span class="lines">@@ -37,6 +37,7 @@ </span><span class="cx"> extern swig_class cWxCalendarEvent; </span><span class="cx"> extern swig_class cWxCloseEvent; </span><span class="cx"> extern swig_class cWxCommandEvent; </span><ins>+extern swig_class cWxTextUrlEvent; </ins><span class="cx"> extern swig_class cWxIdleEvent; </span><span class="cx"> extern swig_class cWxPaintEvent; </span><span class="cx"> extern swig_class cWxUpdateUIEvent; </span><span class="lines">@@ -94,7 +95,6 @@ </span><span class="cx"> &wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, </span><span class="cx"> &wxEVT_COMMAND_TEXT_UPDATED, </span><span class="cx"> &wxEVT_COMMAND_TEXT_ENTER, </span><del>- &wxEVT_COMMAND_TEXT_URL, </del><span class="cx"> &wxEVT_COMMAND_TEXT_MAXLEN, </span><span class="cx"> &wxEVT_COMMAND_MENU_SELECTED, </span><span class="cx"> &wxEVT_COMMAND_SLIDER_UPDATED, </span><span class="lines">@@ -110,6 +110,12 @@ </span><span class="cx"> (const wxEventType *)0 </span><span class="cx"> }; </span><span class="cx"> </span><ins>+static const wxEventType *textUrlEvents[] +{ + &wxEVT_COMMAND_TEXT_URL, + (const wxEventType *)0 +}; + </ins><span class="cx"> static const wxEventType *idleEvents[] </span><span class="cx"> { </span><span class="cx"> &wxEVT_IDLE, </span><span class="lines">@@ -393,6 +399,8 @@ </span><span class="cx"> cEvent = cWxWindowDestroyEvent.klass; </span><span class="cx"> else if(event.IsKindOf(CLASSINFO(wxSashEvent))) </span><span class="cx"> cEvent = cWxSashEvent.klass; </span><ins>+ else if(event.IsKindOf(CLASSINFO(wxTextUrlEvent))) + cEvent = cWxTextUrlEvent.klass; </ins><span class="cx"> #ifdef WXSCINTILLA </span><span class="cx"> else if (event.IsKindOf(CLASSINFO(wxScintillaEvent))) </span><span class="cx"> cEvent = cWxScintillaEvent.klass; </span><span class="lines">@@ -810,7 +818,7 @@ </span><span class="cx"> return internal_evt_with_id(argc, argv, self, wxEVT_COMMAND_TEXT_MAXLEN); </span><span class="cx"> } </span><span class="cx"> </span><del>-#ifdef __WXMSW__ </del><ins>+#ifndef __WXMAC__ </ins><span class="cx"> static VALUE evt_text_url(int argc, VALUE *argv, VALUE self) </span><span class="cx"> { </span><span class="cx"> return internal_evt_with_id(argc, argv, self, wxEVT_COMMAND_TEXT_URL); </span></span></pre></div> <a id="trunkwxruby2swigclassesTextUrlEventi"></a> <div class="addfile"><h4>Added: trunk/wxruby2/swig/classes/TextUrlEvent.i (0 => 790)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/classes/TextUrlEvent.i         (rev 0) +++ trunk/wxruby2/swig/classes/TextUrlEvent.i        2006-12-20 23:24:31 UTC (rev 790) </span><span class="lines">@@ -0,0 +1,12 @@ </span><ins>+# Copyright 2004-2005 by Kevin Smith +# released under the MIT-style wxruby2 license + +%include "../common.i" + +%module(directors="1") wxTextUrlEvent + +%import "include/wxObject.h" +%import "include/wxEvent.h" +%import "include/wxCommandEvent.h" + +%include "include/wxTextUrlEvent.h" </ins></span></pre></div> <a id="trunkwxruby2swigclassesincludewxTextUrlEventh"></a> <div class="addfile"><h4>Added: trunk/wxruby2/swig/classes/include/wxTextUrlEvent.h (0 => 790)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/classes/include/wxTextUrlEvent.h         (rev 0) +++ trunk/wxruby2/swig/classes/include/wxTextUrlEvent.h        2006-12-20 23:24:31 UTC (rev 790) </span><span class="lines">@@ -0,0 +1,26 @@ </span><ins>+// Copyright 2004-2006 by Kevin Smith +// released under the MIT-style wxruby2 license + +#if !defined(_wxTextUrlEvent_h_) +#define _wxTextUrlEvent_h_ + +class wxTextUrlEvent : public wxCommandEvent +{ +public: + wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, + long start, long end) + : wxCommandEvent(wxEVT_COMMAND_TEXT_URL, winid) + , m_evtMouse(evtMouse), m_start(start), m_end(end) + { } + + const wxMouseEvent& GetMouseEvent() const { return m_evtMouse; } + long GetURLStart() const { return m_start; } + long GetURLEnd() const { return m_end; } + +protected: + wxMouseEvent m_evtMouse; + long m_start, + m_end; +}; + +#endif </ins></span></pre> </div> </div> </body> </html>
Reasonably Related Threads
- [1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
- [821] trunk/wxruby2/doc/textile/texturlevent.txtl: Added info on undocumented TextUrlEVent class
- [795] trunk/wxruby2/swig/classes/include/parents.rb: Added missing DatePickerCtrl and TextUrlEvent classes
- [815] trunk/wxruby2/swig/classes: Added ContextMenuEvent class plus event handling methods
- [982] branches/wxruby2/wxwidgets_282/swig/classes/EvtHandler.i: Add EvtThunker mapping for TimerEvent (bug 10391)