wxControl::Create() has a different signature than wxWindow::Create()
(its 6-th parameter is of const wxValidator& type instead of
const wxString&) so it cannot be invoked from the the general template of
wxScrolled<T>::Create() method. We need to move a call to T::Create()
function to a dedicated template function wxCreateScrolled() responsible
for actual creation of the scrolled window and overload it for custom
classes if necessary.
This has to be done for wxControl and from this overloaded function
wxControl::Create() can be called with rearranged parameters.
There is no need to handle this style specially here, it's supposed to
be handled at wxWindow level and is, indeed, at least in all the major
ports.
So revert 2119b213e3 (see #13616) and the
workaround for it applied later for macOS (see #14856). And this also
removes the need for handling wx[HV]SCROLL in wxScrolled (see #17846).
Closes#14856, #17846.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.
Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Factor out the keyboard handling code in wxAnyScrollHelperBase allowing its
reuse in wxVarScrollHelperEvtHandler.
Now wxVarScrollHelperBase handles cursor keys in a sane way by default
too and also allows disabling their handling, just as wxScrolledWindow.
See #15357.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Merge the fixes to wxScrollHelperBase::ProcessEvent() of r64358, r64370,
r64464, r72939 and possibly a few more in wxVarScrollHelperBase to fix its
behaviour too, as it wasn't generating the correct events any longer.
Unfortunately the fix right now is to physically copy the code from one class
to the other. This should be avoided, of course, and a more in depth
refactoring should be done to move the code common to both classes into
wxAnyScrollHelperBase after 3.0 release. But for now continuing to duplicate
code is better than not having a working wxVarScrollHelperBase.
See #15357.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is just a small refactoring to move some trivially common parts of
wxScrollHelperBase and wxVarScrollHelperBase in a new common base class.
This will make it possible to apply other corrections to wxVarScrollHelperBase
without having to physically duplicate the code from wxScrollHelperBase in it.
See #15357.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Override CanScroll() in wxScrolled to return the real state of the scrollbar
instead of just relying on the wx[HV]SCROLL styles.
Closes#15440.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must use physical coordinates for the brush origin to account for the
coordinates offset in scrolled windows, so add MSWAdjustBrushOrg() and call it
from MSWGetBgBrushForChild().
Closes#14917.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain that, in spite of its name, this function doesn't disable scrolling
when called with false argument but just changes the mechanism used to
implement it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just always call the virtual OnDraw() if wxEVT_PAINT wasn't handled. This is
much simpler than connecting our own special handler just to set a flag saying
whether the event was processed which was very complicated and didn't work
anyhow for the statically connected wxEVT_PAINT handlers.
See #14757.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Consistently use only "wx/foo.h" instead of "include/wx/foo.h" ("include" is
always implicit anyhow).
Also use "src/osx" instead of "src/mac" for the files in this directory.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r58323 ("Restore keyboard navi") fixed the handling of cursor
keys in the generic wxListCtrl implementation but at the price of not sending
keyboard events for the cursor keys to wxListCtrl itself any more. This made
it impossible to override their handling in user code, something that used to
work in previous wx versions and still works in wxMSW.
Revert the changes of this revision now and fix the original code by simply
disabling the handling of the cursor keys in wxScrollHelperBase using a newly
added DisableKeyboardScrolling() method. This ensures that the keyboard events
for cursor keys are not used to scroll the window when they are forwarded to
wxListCtrl from wxListMainWindow.
The fix is conceptually ugly as it would be better to avoid the need for such
ad hoc functions as DisableKeyboardScrolling() but it is very simple and there
just doesn't seem to be any sane way to do it otherwise with wxScrollHelperBase.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As this class has only inline methods it doesn't need to be exported from the
DLL and actually exporting it results in linking problems when using
wxScrolled<wxWindow> (which, unlike wxScrolled<wxPanel>, is not used in wx
itself and so doesn't seem to be instantiated) in DLL client even with VC > 6.
An alternative solution would be to change WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE
macro to explicitly instantiate the template in the DLL even for VC > 6 but
this wouldn't solve the problem for wxScrolled<CustomClass> while removing the
DLL export declaration should.
Also use wxScrolled<wxWindow> in addition to wxScrolled<wxPanel> in the scroll
sample to test that it links correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
anything (typically wxPanel or wxWindow). Fixed generic wxListCtrl to
use wxScrolled<wxWindow> - this fixes focus problems with label-editing
text control. Fixes to wxScrolledWindow doxygen docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
if scrollbars disappear (instead of 1) as per wxMSW.
Expose m_x/yScrollLines in public getters.
Correct window origin for scrolled window in RTL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changed default for WXWIN_COMPATIBILITY_2_4 to 0.
Added WXWIN_COMPATIBILITY_2_6 (defaults to 1).
Ran build/update-setup-h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775