Test using icons and bitmaps in it. Also show the native/default
implementation of this method and not only our overridden version.
See #12047.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a function which can be overridden to return an arbitrary number of
widgets instead of having just GetWidget() and GetWidget2(): spin control page
already uses 3 widgets (and defines GetWidget3() which is never called) and we
could have even more in the future. Just use a generic solution which will
always work.
The practical consequence of this is that the "Enable/Disable" menu item now
also enables and disables the wxSpinCtrlDouble in the spin page, see #12045.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove unnecessary, never used methods.
Don't use pointers when objects or references can be used more safely.
Don't name classes which are not part of wx with "wx" prefix to avoid
confusing people.
Don't define empty unnecessary event tables.
Prefer wxScrolledWindow::SetVirtualSize() to SetScrollbars().
Stop using "protected" when "private" should be used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Painting on both wxPaintDC and wxClientDC simultaneously doesn't work well,
e.g. under Windows the client DC can be actually erased after we finished
painting the window contents, overwriting it.
Simply use wxDC::Clear() instead of wxWindow::ClearBackground() to avoid this
and document the danger of using ClearBackground() from EVT_PAINT handler.
Closes#10700.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add ProcessWindowEventLocally() which wraps ProcessEventLocally() in the same
way as ProcessWindowEvent() wraps ProcessEvent(). I.e. it allows to process
the event in this window only, without propagating it upwards, but taking into
account any event handlers associated with it.
Use the new method in wxMDIParentFrame code in wxMSW to ensure that event
handlers pushed on MDI children frames are taken into account. Add a test for
this to the MDI sample.
Closes#11225.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't affect Unicode builds, only the legacy ANSI one.
PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxWidgets requires wchar_t for some time now; wx/chartype.h has a check
to fail complation without it. Simplify code by removing now-dead code
for the !wxUSE_WCHAR_T case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix a warning about unused parameters and another about signed/unsigned
comparison during samples and tests compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow specifying a set of gradient stops instead of just the beginning and
ending colours. Add the new wxGraphicsGradientStop(s) classes and new
wxGraphicsContext::Create{Linear,Radial}GradientBrush() overloads. Also change
the same methods of wxGraphicsRenderer to take wxGraphicsGradientStops instead
of a pair of colours.
Implement the new API for MSW and Cairo. OS X still uses just the two colours
for now.
Closes#11897.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDocument::Revert() method existed but didn't do anything, provide a
default implementation for it. Also document it and show it in the sample.
Closes#11849.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no way to exclude the sample from the build under Windows so make it
compile and link even if wxUSE_UIACTIONSIMULATOR==0 but just give an error
message on startup in this case instead of working as expected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Setting wxChoice height to its default value didn't change the height even if
the current height was different from the default. This resulted in problems
when a wxChoice was used inside a wxAuiToolBar because AUI temporarily reduces
the toolbar size to (1, 1) when docking it (thus ensuring that the height of
wxChoice is changed too) and generally didn't make sense.
Fix this by resetting the height to the default value if the value passed to
wxChoice::SetSize() is what it considers to be its default height.
Add a unit test for this bug and also add a wxChoice to AUI sample to allow
testing for wxChoice behaviour inside a wxAuiToolBar being [un]docked.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample allowed to test the behaviour with all wxICON_XXX including
wxICON_NONE but not without any icon styles at all. Do allow it now.
Also use symbolic names for the radiobox indices for clarity.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should fix VC6 build broken by addition of this sample as VC6 doesn't
support Bind(). Luckily, there is no need to use it here anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The selection was 0 in a notebook without any pages which was wrong as it must
always be less than the page count.
Fix this in wxAuiNotebook itself and add an assert checking for this invariant
to the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to update the lfags first before deciding whether we should create or
destroy the header.
Also add a test for toggling the header to the listctrl sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code used bitwise XOR which was rather difficult to read and also resulted
in g++ 4 warnings about suggested parentheses.
Fix both issues by using bitwise AND and OR in two separate statements instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ctrl-5 was used both for the treebook in the "Type" menu and default
orientation choice in the "Orientation" menu.
Use Alt-[0..4] for the "Orientation" menu entries.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a checkbox for toggling wxTE_PROCESS_ENTER to the text page and use this
style by default. This makes it easier to check that this style works as
intended, including that it generates the correct events.
See #11691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775