wxWidgets/include/wx/msw
Vadim Zeitlin f3ff831f3b Changes to template Connect() to make it compile with MSVC7 and possible other
not quite up-to-date compilers, to reduce repetitions and to allow using
methods of non-wxEvtHandler-derived classes as event callbacks:

1. Don't rely on compiler ability to deduce template parameter from the type
   of a parameter of a function used as another template parameter, at least
   MSVC7 can't do this and it's probably not the only one.
2. Do rely on compiler support for partial specialization to make
   wxEventFunctorMethod compile for non-wxEvtHandler-derived handlers while
   still keeping the old functionality for the wxEvtHandler-derived ones.
3. Don't make any difference between functions and functors, both are callable
   objects so use them as such, this allows to fold code for both cases.
4. Avoid the use of dynamic_cast<>.
5. Several naming changes:
 a) wxTypedEventType -> wxEventTypeTag (because this is what it is)
 b) Subscribe/Unsubscribe -> DoConnect/Disconnect (to follow the usual
    convention of public Foo calling private DoFoo and to avoid using up
    another name)
 c) Derived -> ObjClass (because it's not clear what does Derived mean)
6. Extend the unit test to cover more cases.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-02 20:38:56 +00:00
..
ole convert COM arguments to wx lazily to improve performance and allow calling Invoke/handling events involving parameters which can't be mapped to wx types at all (new GetNativeParameters() method can be used to access them) (closes #9606) 2009-01-25 12:25:43 +00:00
private disable the events when we get a notification about socket being ready for IO and reenable them later after performing the IO in the Unix version to avoid continuous flood of ready notifications 2009-01-02 21:53:30 +00:00
wince don't always disable new events code; leave it enabled for MSVC8+ 2009-02-02 11:39:48 +00:00
accel.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
amd64.manifest
app.h cleanup the Win32 window classes registration code: remove global variables and register the window classes we use on demand to avoid registering MDI or GL classes unnecessarily 2008-11-29 22:19:55 +00:00
apptbase.h Streamline wxSocket code: wxSocketBase now uses wxSocketImpl (previously known 2008-11-28 12:47:07 +00:00
apptrait.h improve wxMessageOutputBest console output under Windows (closes 9146) 2008-05-23 23:28:13 +00:00
bitmap.h replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents 2008-11-02 02:39:52 +00:00
blank.cur
bmpbuttn.h clean up wxBitmapButton::Create(); override MSWGetStyle() (#4804) 2008-07-16 01:08:52 +00:00
bmpcbox.h correct Id tags 2009-01-19 13:30:34 +00:00
brush.h declare future-deprecated SetStyle(int) in wxPen/Brush and not wxPen/BrushBase as it's useless there (compilation of user code doing pen.SetStyle(wxDOT) still fails) 2008-06-17 17:28:26 +00:00
bullseye.cur
button.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
calctrl.h mark holidays if wxCAL_SHOW_HOLIDAYS is on (replaces #9155) 2008-08-05 01:55:44 +00:00
caret.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
cdrom.ico
checkbox.h support multiline labels in wxCheckBox (#9495) 2008-06-07 01:54:44 +00:00
checklst.h remove duplicated HitTest implementation from wxCheckListBox, it already inherits wxListBox::HitTest() (which was however lacking an overload taking 2 coordinates, added now) 2009-01-25 18:10:24 +00:00
child.ico
chkconf.h Changes to template Connect() to make it compile with MSVC7 and possible other 2009-02-02 20:38:56 +00:00
choice.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
clipbrd.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
colordlg.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
colour.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
colours.bmp
combo.h compilation fix after NULL cast removal; also used it to get rid of an ugly OnTimerEvent(*(wxTimerEvent *)NULL) call 2009-01-19 14:40:13 +00:00
combobox.h implement EnableTextChangedEvents() to make ChangeValue() work as expected, i.e. not generate any events 2008-09-19 10:08:02 +00:00
computer.ico
control.h set m_isBeingDeleted to true (only) in SendDestroyEvent(); call it as early as possible during the window destruction to ensure that destroy event handlers can still access the full window object 2009-01-20 18:33:33 +00:00
crashrpt.h take wxString in wxCrashReport::SetFileName() to allow passing either ASCII or wide strings as well as wxStrings to this method (closes 9505) 2008-05-29 13:28:05 +00:00
cross.cur
csquery.bmp
ctrlsub.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
cursor.h provide backward-compat wxCursor(int) ctor; remove empty stubs of XBM ctor from all ports except gtk,motif; make all ports emit wxLogError on invalid bitmap types; implement wxCursor(const wxString&, ...) ctor on GTK (not tested yet) 2008-09-25 17:56:07 +00:00
datectrl.h More border rationalisation. GetDefaultBorder is now mostly defined in base class files. 2007-11-13 12:10:34 +00:00
dc.h change generic ints to enums in wxDC (closes #9959) 2009-01-08 14:21:53 +00:00
dcclient.h Added new wxGraphicsContext:Create( wxPrinterDC ) instead of wxDC:CreateGraphicsContext 2008-04-28 20:39:57 +00:00
dcmemory.h Added new wxGraphicsContext:Create( wxPrinterDC ) instead of wxDC:CreateGraphicsContext 2008-04-28 20:39:57 +00:00
dcprint.h change generic ints to enums in wxDC (closes #9959) 2009-01-08 14:21:53 +00:00
dcscreen.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
dde.h many wxIPC Unicode and UTF-8 fixes (use void* instead of wxChar* in the API and UTF-8 as wire format for wxStrings) (patch 1812926) 2007-10-20 22:54:26 +00:00
debughlp.h
dialog.h remove m_endModalCalled flag, it seems to be unnecessary 2008-12-21 01:37:39 +00:00
dib.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
dirdlg.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
dragimag.h don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither 2009-01-19 13:55:27 +00:00
drive.ico
enhmeta.h don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither 2009-01-19 13:55:27 +00:00
evtloop.h call ProcessPendingEvents() from wxAppConsoleBase::ProcessIdle() too, not only from wxAppBase::ProcessIdle(); do not call it from wxConsoleEventLoop::Dispatch() as this results in unwanted reentrancies in the socket code when using it 2009-01-02 22:18:10 +00:00
fdrepdlg.h just fix some $Id$ tokens 2009-01-11 11:58:34 +00:00
file1.ico
filedlg.h minor fixes for custom controls support in wxFileDialog: slightly improve documentation, make variable names more clear and add more WinCE checks (closes #10416) 2009-01-24 14:04:25 +00:00
floppy.ico
folder1.ico
folder2.ico
font.h build fixes 2008-11-03 18:24:05 +00:00
fontdlg.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
frame.h remove the recently added MSWFindMenuBarItem() as we already had FindItemInMenuBar() for the same purpose; just change the latter to return a non-const pointer; this fixes help string display in the status bar for the window menu items 2009-01-28 09:14:07 +00:00
gauge.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
gccpriv.h Macros for simplified testing Open Watcom version and required tweaks. 2005-11-10 16:16:05 +00:00
gdiimage.h add GetSize also to wxGDIImage since wxBitmap under some ports derives from wxGDIImage and not from wxBitmapBase 2008-11-29 00:24:57 +00:00
genrcdefs.h removed executable bit on files that aren't executables 2007-06-25 14:04:34 +00:00
glcanvas.h recreate the window if FSAA is requested (changeset_r54022_Fix.patch from #9145) 2008-06-14 01:44:13 +00:00
hand.cur
headerctrl.h fix several bugs in index/position translation code between wx and MSW 2008-12-14 22:54:34 +00:00
helpbest.h added missing include after last commit 2006-05-29 14:51:42 +00:00
helpchm.h replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents 2008-11-02 02:39:52 +00:00
helpwin.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
htmlhelp.h
ia64.manifest
icon.h replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents 2008-11-02 02:39:52 +00:00
imaglist.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
iniconf.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
joystick.h multiple fixes to wxJoystick under Unix and new index-based API for accessing joystick buttons and axes (patch 1678497) 2007-03-16 00:51:43 +00:00
libraries.h Move oleacc.lib from the VC++ projects/makefiles to libraries.h 2006-01-21 22:50:46 +00:00
listbox.h Defer SetHorizontalExtent to idle, also fixes (wxListBox::Delete ignores Freeze/Thaw and is verrrrry slow) 2008-05-25 20:54:30 +00:00
listctrl.h added (MSW-only) wxListCtrl::OnGetItemColumnAttr() (#10018) 2009-01-25 13:27:48 +00:00
magnif1.cur
mdi.h remove the recently added MSWFindMenuBarItem() as we already had FindItemInMenuBar() for the same purpose; just change the latter to return a non-const pointer; this fixes help string display in the status bar for the window menu items 2009-01-28 09:14:07 +00:00
mdi.ico
menu.h added CreateAccelTable() helper which creates the accel table for just this menu 2009-01-27 16:45:24 +00:00
menuitem.h don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither 2009-01-19 13:55:27 +00:00
metafile.h change generic ints to enums in wxDC (closes #9959) 2009-01-08 14:21:53 +00:00
microwin.h
mimetype.h Removed most of the pre-XDG MIME code from the Unix implementation, many speed-ups by simplification 2008-06-30 11:58:41 +00:00
minifram.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
missing.h define MIIM_BITMAP &c in wx/msw/missing.h instead of msw/menu.cpp as menuitem.cpp now needs them too 2009-01-31 20:52:44 +00:00
msgdlg.h replace the static control in wxMessageDialog with an edit control with a vertical scrollbar if the message box is too big to fit on the screen 2008-09-11 10:39:49 +00:00
mslu.h move wxMSLU_xxx redefinitions of xxx() Windows functions to wx/msw/wrapwin.h as we have to define them after including <windows.h> and not before; also moved the rest of the wxMSLU redefinitions to wx/filefn.h where they're used as it doesn't make sense to keep only them in wx/msw/mslu.h 2006-10-26 19:06:51 +00:00
msvcrt.h no changes, just updated the URL of KB article in a comment 2008-01-03 00:05:15 +00:00
notebook.h use a single wxBookCtrlEvent class for all wxBookCtrlBase-derived controls (#9667) 2008-08-01 13:46:46 +00:00
notifmsg.h added wxNotificationMessage::AlwaysUseGeneric() MSW-specific method 2007-12-02 19:42:15 +00:00
palette.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
pbrush.cur
pen.h declare future-deprecated SetStyle(int) in wxPen/Brush and not wxPen/BrushBase as it's useless there (compilation of user code doing pen.SetStyle(wxDOT) still fails) 2008-06-17 17:28:26 +00:00
pencil.cur
pntleft.cur
pntright.cur
popupwin.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
printdlg.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
printwin.h Implemented high-quality preview for wxMSW (this approach doesn't work 2008-06-16 08:41:51 +00:00
private.h add wxDrawStateBitmap() (closes #10289) 2009-01-25 14:38:44 +00:00
question.ico
radiobox.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
radiobut.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
rcdefs.h Add rcdefs.h and support for automatic manifests on Windows 2005-11-08 22:49:46 +00:00
regconf.h added wxUSE_REGKEY checks 2007-08-22 14:49:41 +00:00
region.h a few more int/wxPolygonFillMode substitutions in wxRegion and wxGraphicsContext code 2009-01-08 16:43:56 +00:00
registry.h added wxUSE_REGKEY option 2007-07-21 13:01:28 +00:00
removble.ico
rightarr.cur
roller.cur
scrolbar.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
seh.h define DisableAutomaticSETranslator() correctly when wxUSE_ON_FATAL_EXCEPTION==0, this fixes linking in this case (replaces patch 1646340) 2007-02-11 02:14:49 +00:00
setup0.h don't always disable new events code; leave it enabled for MSVC8+ 2009-02-02 11:39:48 +00:00
setup_inc.h add wxUSE_TASKBARICON_BALLOONS to make it possible to turn off their usage if our SDK is too old (mainly for VC6 with its original ancient SDK) 2007-12-08 20:51:21 +00:00
slider.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
sound.h
spinbutt.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
spinctrl.h Don't let MSW's wxSpinCtrl emit spin up and down events as in the other ports 2008-06-20 08:17:33 +00:00
stackwalk.h don't use hardcoded constant 200; use wxSTACKWALKER_MAX_DEPTH instead 2009-01-14 14:38:00 +00:00
statbmp.h disable workaround for lack of alpha support in native static bitmap control for WinCE, apparently it breaks the display (#10093) 2008-10-27 18:15:19 +00:00
statbox.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
statline.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
stattext.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
statusbar.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
std.ico
stdpaths.h allow to optionally use vendor name component in standard paths (slightly modified patch 1831308) 2007-11-17 14:59:13 +00:00
subwin.h replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents 2008-11-02 02:39:52 +00:00
taskbar.h add wxUSE_TASKBARICON_BALLOONS to make it possible to turn off their usage if our SDK is too old (mainly for VC6 with its original ancient SDK) 2007-12-08 20:51:21 +00:00
textctrl.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
textentry.h Fix line endings 2008-03-27 21:26:13 +00:00
tglbtn.h Implemented wxBitmapToggleButton generically for now 2008-12-19 16:04:31 +00:00
tls.h chanegd wxTlsValue to be pointer-like instead of value-like which doesn't work for UDTs; use __thread keyword with mingw32 >= 4.3 too; use library-based thread-specific variables support in wxString cache now that it is fixed to work there; finally added a unit test for TLS stuff 2008-08-29 23:28:42 +00:00
toolbar.h no real changes, just remove unnecessary code; use wxScopedArray instead of raw one 2009-01-31 14:04:23 +00:00
tooltip.h added (wxMSW-only) wxToolTip::SetMaxWidth() and improve its default behaviour (#2817) 2009-01-23 13:26:20 +00:00
toplevel.h forgot to commit toplevel.h as part of r56374 2008-10-16 20:20:52 +00:00
treectrl.h undid change accidentally committed as part of r57093 but which didn't have anything to do with it and resulted in #10253 2008-12-22 13:34:12 +00:00
uxtheme.h substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE 2008-03-26 15:06:00 +00:00
uxthemep.h
window.h don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither 2009-01-19 13:55:27 +00:00
winundef.h #undef CreateFont to fix cygwin compilation now that wxRichTextCtrl uses it 2005-10-31 19:35:41 +00:00
wrapcctl.h extract (and expand and clean up and document) the header window implementation used inside the generic wxDataViewCtrl in a separate wxHeaderCtrl class which could be reused in (generic) wxListCtrl and, most importantly, wxGrid later 2008-12-03 21:53:10 +00:00
wrapcdlg.h Include winundefs.h 2006-11-07 09:08:33 +00:00
wrapgdip.h extracted code including gdiplus.h in a separate header 2007-03-15 03:41:52 +00:00
wrapshl.h include wx/log.h to fix PCH-less compilation 2007-09-22 12:08:23 +00:00
wrapwin.h Compilation fixes for mingw-w64. 2008-05-31 12:44:40 +00:00
wx.manifest
wx.rc added comment explaining the condition for compiling manifest into resources 2007-06-04 09:01:37 +00:00