Commit Graph

27 Commits

Author SHA1 Message Date
Vadim Zeitlin
52ae67ef86 Replace dynamic casts with virtual wxWindow::WXGetTextEntry()
Instead of checking for all text-like controls one by one in
wxCommandEvent::GetString(), call a virtual function checking for this.

This is simpler, less error-prone and faster -- at the cost of
increasing the vtbl size of all wxWindow-derived classes.

Closes https://github.com/wxWidgets/wxWidgets/pull/1696
2020-01-09 23:25:49 +01:00
ali kettab
020b6ebcb8 Derive from wxTextEntry instead of wxTextCtrlBase 2020-01-07 03:15:39 +01:00
AliKet
c09db9c23d Add native wxSearchCtrl for GTK+ port 2020-01-07 03:15:35 +01:00
Vadim Zeitlin
94620f6c59 Use simple wxEVT_SEARCH[_CANCEL] names for wxSearchCtrl events
The old wxEVT_SEARCHCTRL_{SEARCH,CANCEL}_BTN event names were unwieldy
and misleading because both of these events can be generated without
using the buttons, but by pressing Enter or Esc (the latter currently
works under macOS only, but this could change in the future).
2018-01-30 02:03:48 +01:00
Vadim Zeitlin
8ee3394e5e Declare wxSearchCtrl::{Set,Get}DescriptiveText() in the base class
Fix a trivial "TODO" remaining from 2.8 days and declare the functions
that are part of the public control API as pure virtuals in the base
class.

No real changes.
2018-01-27 13:38:47 +01:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +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
35368572bc Set colours and fonts for all elements of the generic wxSearchCtrl.
Derive generic wxSearchCtrl from wxCompositeWindow<> to ensure that calls to
its Set{Fore,Back}groundColour() are propagated to all its children, otherwise
they applied only to the composite control itself but not e.g. its text part.

Also update the bitmaps when the background colour changes to ensure that it
appears as transparent.

Closes #13428.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 12:13:23 +00:00
Vadim Zeitlin
e7c9d913c0 Use wxNavigationEnabled<> for keyboard navigation in generic wxSearchCtrl.
Derive generic wxSearchCtrl implementation from wxNavigationEnabled<> to
ensure that TAB navigation works correctly in it. While it did work before for
search controls without wxTE_PROCESS_ENTER style (because this wasn't handled
by this control itself at all in fact), it stopped working as soon as this
style was used in wxMSW because then the navigation was implemented by
manually calling wxWindow::Navigate() and this requires wxControlContainer
support.

Use wxNavigationEnabled<> to easily add it to wxSearchCtrl.

See #12808.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-07-24 22:19:23 +00:00
Dimitri Schoolwerth
80fdcdb90e No changes, synchronised source names that appear commented at the top of files with the actual path to the files.
Fixed commented names (path, filename, and extension) of files in include/ and src/. Prepended the names in src/ with "src/" everywhere, while starting those in include/wx/ with "wx/".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 00:14:35 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +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
9b11752c4f require semicolon after wxDECLARE/DEFINE_EVENT() (closes #10456)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 18:59:25 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Stefan Csomor
ef0e92205a fixing file paths after renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 19:17:41 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Vadim Zeitlin
c058cafa56 don't use DECLARE_EVENT_TYPE() to avoid confusing people about its unused value parameter, declare the event type constants directly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-27 13:21:39 +00:00
Stefan Csomor
623633eea9 cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-16 20:52:54 +00:00
Vadim Zeitlin
f36e602b3f make various control names constants of type char, not wxChar, as this is more compatible with the old ANSI build and it doesn't make much sense to use wchar_t for ASCII strings anyhow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 21:37: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
Vadim Zeitlin
cfddeb1067 fix compilation in wxUSE_MENUS==0 case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-05 14:48:20 +00:00
Kevin Ollivier
c60122bf37 Change event names to clarify that they are only fired by button clicks, and note ways of retrieving search queries in the docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-11 20:32:16 +00:00
Vadim Zeitlin
8bc333d76d added $Id$ to the header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-11 14:14:07 +00:00
Vadim Zeitlin
ec184e3242 1. Renamed Set/GetXXXVisible() to ShowXXX() and IsXXXVisible()
2. Moved wxSearchCtrlBase to wx/srchctrl.h to avoid duplicating it
3. Removed gcc #pragmas


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-11 13:48:18 +00:00
Vadim Zeitlin
7a71ffc175 use wx prefix for wxUSE_NATIVE_SEARCH_CONTROL macro name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-11 12:57:35 +00:00
Robin Dunn
3f7f284d55 Modified form of Patch #1611222, adds wxSearchCtrl (generic & native carbon HISearchField)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-11 06:19:27 +00:00