Allow overriding either the iterator-like methods of the base class or the
single and possibly more convenient, albeit slightly less efficient, method of
the derived wxTextCompleterSimple class.
This makes it possible to completely delegate to wxTextCompleter from wxMSW
IEnumString implementation and actually makes the code there easier, even if
it it still not quite trivial because of multi-threading concerns.
It also would make it possible to show the completions progressively, as they
are retrieved, in a future generic implementation of auto-completion (MSW
native implementation doesn't do this unfortunately and waits until all of the
completions become available before showing them).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxTextCompleter class which allows to return the possible completions
dynamically and wxTextCompleter::AutoComplete() overload using it. So far this
is only implemented for wxMSW.
Also fix calling wxTextEntry::AutoComplete(wxArrayString) multiple times under
MSW, this didn't correctly update the list of shown completions before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" and also use British spelling for licence. Updated new occurrences in recently added files and a couple of previously (r64940) missed ones.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Months returned by wxDateTime::GetMonth() start from 0 while people mostly
expect to have 1-based months in the UI.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.
Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").
Closes#13063 (again).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Show how to create a custom control with transparent background.
Notice that this doesn't work in wxGTK currently.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The black rectangle drawn in EVT_PAINT handler in the sample prevented the
custom background from showing through the wxStaticBitmap. Maybe it was
initially done intentionally but this makes the sample look broken so just
don't do this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method provides a simple way to set a background bitmap without defining
an EVT_ERASE_BACKGROUND handler and, more importantly, one that works
correctly in wxMSW for a window with children as it paints the background of
transparent children too.
Add a test of this method to the erase sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a method which can be used to indicate that the help window should prevent
the application from exiting and use it in the help sample to prevent it from
closing prematurely.
Closes#13046.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This control explains better what is going on in the sample and also allows to
test whether wxStaticText itself has properly transparent background (this is
not currently the case under MSW).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly pass wxART_BUTTON to wxArtProvider to ensure that all the icons are
returned in the same size, otherwise they didn't look well and could result in
an assert too, see #12909.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Demonstrate the use of styles such as wxNB_FIXEDWIDTH or wxTBK_HORZ_LAYOUT
specific to particular controls and not only the ones common to all of them.
Closes#13036.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It wasn't immediately obvious that this dialog could be used for multiline
text entry too so mention it explicitly in the documentation.
Also show this in action in the dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The rubber banding selection message box was shown even after a simple click,
i.e. when nothing was actually selected which was quite annoying, so don't do
this.
Also remove unnecessary casts and use wxLogMessage() instead of
wxString::Printf() + wxMessageBox().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of passing them by value, use const reference. This change
is safe to do, because these methods' signatures were different in 2.8
anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use recently added wxMarkupText to implement support for markup in wxMSW
wxButton.
Update the button page of the widgets sample to show markup support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to disable all the new markup-related code by setting
wxUSE_MARKUP to 0 in setup.h or using configure --disable-markup option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is an incompatible change which removes the wxStaticText-specific
wxST_MARKUP style and adds wxControl::SetLabelMarkup() replacing it.
It doesn't actually change anything yet but it simplifies wxStaticText code a
lot by getting rid of many markup-related functions in it which had to behave
differently depending on whether wxST_MARKUP was used or not and also paves
way for adding markup support for the other controls in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes an assert which could happen when showing the rich text editor.
Also show the colour in a more readable form if possible.
Closes#12950.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
PNG images are used by the main wxWidgets library itself now and so linking
with the monolithic wx library introduces dependencies on PNG as well, even
for the console applications. Link them with linpng to avoid linker errors.
Closes#12889.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This parameter was never needed nor properly documented. Simply remove it from
SetTickFreq() and keep the overload still taking it for backwards
compatibility only.
Closes#12907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update configure and bakefile.m4 for the new version too.
Also add the missing makefiles and projects for the XTI sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of constructs such as if "( s.length() )" and "if (s.length() > 0)" use "if ( !s.empty() )" instead. Similarly for "if (s.length() == 0)" or "if ( s.IsNull() )", use "if ( s.empty() )".
No code changes intended except for a few instances where a construct like "if ( s.length() && wxFileExists(s) )" was changed to not check the length of the string and let wxFileExists handle such cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add validators for integer and floating point numbers.
Add an example of their use to the validate sample as well as a new unit test
and documentation for them.
Use the new classes instead of wxTextValidator in wxGrid code.
Closes#12166.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxRTC functions now operate on the currently focused object, which by default is the whole buffer.
Up to three property commands are now shown on the context menu, depending on
available objects in the current hierarchy.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
VC8+ give tons of deprecation warnings for the standard functions which are
usually suppressed by wx headers but they need to be included first for the
suppression to be effective. In the MFC sample they were not resulting in many
useless warnings.
Fix this by pre-defining _CRT_SECURE_NO_WARNINGS to suppress them in the
sample itself.
Also suppress a warning about WINVER being undefined.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MFC needs the entry point to be wWinMainCRTStartup() in Unicode builds but the
bakefile-generated projects use the default WinMain() so the sample didn't
link in Unicode.
Fix this by providing WinMain() which simply forwards to wWinMainCRTStartup()
as this seems to work for all MSVC/CRT versions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This eliminates a linking dependency that would drag in the printing
code for any program that used wxColourDialog or wxFontDialog (which
is currently all of them, due to more link dependencies...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxRibbonBar::{Show,Hide}Panels() and ArePanelsShown() accessor.
Also add a toggle button to the sample to test the new functionality
(unfortunately it couldn't be done by a control in the ribbon itself as there
would be no way to show the panels back then).
Closes#12707.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes, just make it easier to understand that the sample
code overrides the base class virtual methods by reusing the virtual keyword
in the derived class.
See #12819.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is especially useful under Mac where wxSound can play files other than
.wav too (e.g. .aiff files which can be found under /System/Library/Sounds).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is definitely not necessary to call SetTopWindow() when there is only a
single top level window and it is arguable whether it's useful to do it even
when there are many of them so don't encourage its use in the documentation
and also remove all its occurrences from the samples.
Closes#12816.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775