Don't change the background colour when the control is being enabled or
disabled, it doesn't seem necessary and it's unclear why was this added by
r10179 in the first place. It does result in problems however as it could
somehow make the selection of wxTextCtrl invisible when it lost focus and so
fixes a serious usability problem which happened to all wxTextCtrls for which
a wxEVT_UPDATE_UI handler using wxUpdateUIEvent::Enable() was defined.
Closes#14898.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Generate wxEVT_CHAR events for non-ASCII characters entered in these controls
by intercepting their insert-text signal.
Also try to use GtkEntry/GtkTextView internal IM objects but unsuccessfully so
far.
Closes#3158.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just make it possible to use a different IM than the one
allocated in wxWindow for input handling. This will be used in the upcoming
changes to wxTextEntry and the related classes.
See #3158.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Encapsulate the code temporarily incrementing wxOpenModalDialogsCount in a
small helper class to make it easier to reuse it elsewhere.
See #14823.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We called g_signal_connect("selection_get") in wxClipboard code each time its
AddData() method was called. This resulted in progressive but noticeable
slowdown as the handler was called more and more times.
Only connect to the handler once now.
Closes#15038.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxWebViewFactory as an abstract factory to provide backend creation. Remove old factory methods using wxWebViewBackend enum in favour of the new wxString based method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Our client size calculation can be wrong for reasons beyond our control,
notably on Ubuntu 12.04 with overlay scrollbars where the GtkScrolledWindow
"scrollbar-spacing" is wrong. By using the true size from size-allocate
when it becomes available, we can recover from an earlier incorrect client
size calculation. See #14871
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ubuntu overlay scrollbar changes the GtkWindowGroup for its toplevel, which is
disastrous for modal windows. Put in a hack to detect and undo this.
Fixes#14855
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to check whether the global menu is being used and will be mostly
useful for working around various bugs/problems uncovered by it.
See #14302.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.
Also test this function in the spin page of the widgets sample.
Closes#14840.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.
See #14826.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix compilation with some compilers after r72978 which added wxNOEXCEPT to
wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the other
ports.
See #14826.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.
This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.
Closes#14812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxToggleBitmapButton doesn't exist any more, don't forward declare it.
wxToggleButton does exist but is (fully) declared just below, so don't forward
declare it neither.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The font is explicitly documented as being possibly NULL in the base class and
wxMSW handles NULL font just fine, so also handle it in the GTK version.
See #14706.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This should help with the selected directory not being remembered since
GTK+ 2.24.11 as apparently gtk_file_chooser_get_filename() doesn't work any
more now after hiding the dialog -- so call it before doing this and save the
result.
Also get rid of the ugly and apparently completely unnecessary OnFakeOk().
Closes#14525.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a new private wxTextMeasure class implementing methods for measuring text
and move the often duplicated (but not always identically) code for doing the
same from wxDC and wxWindow into it.
Currently this class is only really implemented in wxMSW and wxGTK.
Also extend the test for text measuring functions and rename it to
MeasuringTextTestCase from MeasuringContextTestCase as it's not wxGC-specific
any more.
Closes#14705.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.
Add controls allowing to test this feature to the widgets sample.
Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.
Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.
Closes#14520.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's trivial to use a stock icon with the given name in wxGTK with libnotify,
so provide a way to do it. However this is not as simple as that in other
implementations (notably Windows), so make it private to this port for now.
In the future we should try to support arbitrary wxIcons as well as extend
wxIconLocation to support FreeDesktop stock icon names.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775