Commit Graph

37 Commits

Author SHA1 Message Date
Paul Cornett
fc8d3f6fba Implement wxTextEntryBase::Clear() using Remove() instead of SetValue()
This avoids problems with SetValue() overrides not doing the intended thing
(for example wxComboBox). See #16654
2016-02-06 21:43:43 -08:00
Vadim Zeitlin
69b66e9e2e Add wxTextEntry::ForceUpper()
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.

Also update the text sample to show it in action.
2015-12-08 03:02:46 +01:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
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
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
3049690536 Preserve size of wxGrid rows/columns when hiding and showing them back.
Previously, if a wxGrid row or column was hidden by setting its size to 0, its
original size was lost. Change this so that it's preserved now and can be
restored by setting the size to the special -1 value later.

Closes #14133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-15 23:18:23 +00:00
Vadim Zeitlin
03dede4dc1 Add wxTextEntry::AutoCompleteDirectories().
As we already had MSW-specific AutoCompleteFileNames(), we can just as well
also add the also useful AutoCompleteDirectories() to be used with the text
controls used for path entry.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:13 +00:00
Vadim Zeitlin
ea98f11c2f Add support for dynamic auto-completion in wxTextEntry.
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
2011-04-16 17:27:16 +00:00
Vadim Zeitlin
574479e8db Refactor wxTextEntry::AutoComplete() to simply call DoAutoCompleteXXX().
No real changes, just make the public AutoComplete() non-virtual and add
virtual DoAutoCompleteXXX() methods to make it easier to add new public
AutoComplete() overloads in the upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 17:27:04 +00:00
Vadim Zeitlin
7bfc104bba Update the text hint display correctly when ChangeValue() is called.
wxTextEntry::ChangeValue() doesn't generate any events so we need to
explicitly update the text stored by wxTextEntryHintData when it is called to
ensure that it corresponds to the real controls value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:20 +00:00
Vadim Zeitlin
a7aeddacf9 Fix several bugs in generic text entry hints implementation.
The text controls contents and colour was not updated correctly in several
situations (see #12475).

The old code was completely wrong as it didn't store the actual value of the
control at all and so could never work. Do store and update it now and show
the hint if and only if the real contents is empty.

Also handle "text updated" event to correctly update the hint when the control
becomes [non-]empty.

Closes #12475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:14 +00:00
Stefan Csomor
4275201ba3 text updated events were not always sent out correctly, fixes #11462
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-21 07:50:12 +00:00
Vadim Zeitlin
e793ec1449 Fix wxGTK compilation after r63880.
SendTextUpdatedEvent() needs to be public as it's called from GTK callback.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 23:51:13 +00:00
Vadim Zeitlin
356fd0b532 Add wxTextEntryBase::ForwardEnableTextChangedEvents().
Use this method to forward the status of text events in the implementation of
wxComboBox in wxOSX/Carbon. This ensures that the events are correctly [not]
generated when various wxComboBox methods are called.

The unit tests now also pass with wxOSX/Carbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:35 +00:00
Vadim Zeitlin
501358073b Move SendTextUpdatedEvent() down to wxTextEntryBase from wxTextCtrlBase.
This will allow reusing it in wxComboBox implementation as well.

Also add SendTextUpdatedEventIfAllowed() which can be used to only send the
events if they were not blocked at wxTextEntry level.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:24 +00:00
Kevin Ollivier
c84030e020 Implement native OS X ComboBox for OS X Cocoa, and implement wxTextEntry methods to share code between wxComboBox and wxTextCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-09 19:50:55 +00:00
Vadim Zeitlin
4516928a45 Compilation fix after wxTextEntry::SetMargins() changes.
We need to include wx/gdicmn.h to define wxPoint which is now used in
wx/textentry.h, it is not necessarily already included and in fact compilation
was broken in PCH-less build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-06 14:31:17 +00:00
Jaakko Salli
0847e36eff wxTextEntry::SetMargins(), GetMargins() - implemented on wxMSW and wxGTK (GTK+ 2.10+); also added similar functions into wxComboCtrl, deprecated old indent-functions; wxPropertyGrid modified to use the new functionality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-05 12:39:12 +00:00
Vadim Zeitlin
a95f37bc57 PCH-less build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-05 12:46:40 +00:00
Vadim Zeitlin
4ba5f250ea make GetEditableWindow() protected as it's used by wxGTK wxTextEntry
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 14:03:19 +00:00
Vadim Zeitlin
135b23b266 added wxTextEntry::DoGetValue() to allow returning empty string if the control currently contains hint text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 13:31:29 +00:00
Vadim Zeitlin
63f7d5022e added wxTextEntry::SetHint() (a.k.a. cue banner or placeholder string)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 12:25:01 +00:00
Vadim Zeitlin
a7507230d1 corrected inverted test in IsEmpty() (patch 1936052)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-06 15:25:41 +00:00
Vadim Zeitlin
2f74c9c6b5 use less expensive GetLastPosition() instead of GetValue() to implement IsEmpty()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-15 03:05:28 +00:00
Vadim Zeitlin
e072113323 don't call GetLastPosition() unnecessarily in SelectAll(), all platforms should support SetSelection(-1, -1) according to the docs (but wxGTK didn't, so fix it to do)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-15 03:04:09 +00:00
Vadim Zeitlin
5a25f8581a refactored code reused in several different places in wxTextEntry::RemoveSelection() (patch 1910166)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-15 02:58:54 +00:00
Stefan Neis
72cb72bf82 Use new wxTextEntry implementation on OS/2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-18 22:55:54 +00:00
Vadim Zeitlin
978c6e4113 implemented wxTextEntry for wxMotif, made wxComboBox derive from it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-05 23:13:09 +00:00
Vadim Zeitlin
b4782e576d forward declare wxArrayString (compilation fix for non-PCH build)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-05 13:27:58 +00:00
Vadim Zeitlin
59396417d3 added wxTextEntry::AutoCompleteFileNames() and implemented it for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-04 23:08:26 +00:00
Vadim Zeitlin
ecaed0bcda added wxTextEntry::AutoComplete() and implemented it for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-04 22:39:54 +00:00
Vadim Zeitlin
3b49331b74 fix warnings in EventsSuppressor ctor from gcc with -O option
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-02 13:27:38 +00:00
Chris Elliott
558820fd08 another DMC build fix (http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/93155)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-27 12:27:54 +00:00
Vadim Zeitlin
2978a784f5 compilation fix for wxUniv: don't use the native wxTextEntry class in this case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-10 15:45:28 +00:00
Vadim Zeitlin
fa2f57be4d refactor wxMSW code to extract parts common to wxTextCtrl and wxComboBox into wxTextEntry
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-26 16:48:46 +00:00
Vadim Zeitlin
0ec1179b86 added wxTextEntry common base class for both wxTextCtrl and wxComboBox; refactor wxGTK code to put common parts of these classes in the base class; fixed some inconsistencies in the text control behaviour between platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-26 00:30:22 +00:00