Commit Graph

1676 Commits

Author SHA1 Message Date
Vadim Zeitlin
00a399c062 Remove wxTextCtrl::OnEnabled() hack from wxGTK.
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
2013-03-31 01:12:21 +00:00
Vadim Zeitlin
348357a1d7 No changes, just remove wxGtkIMData forward declarations.
This class doesn't exist any more, so clean up references to it.

See #3158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-26 00:59:22 +00:00
Vadim Zeitlin
1eb194bf0e Add GdkEventKey declaration fix PCH-less build.
Declare it in wx/gtk/textentry.h too, not only wx/gtk/window.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-22 14:13:02 +00:00
Vadim Zeitlin
b2c357747d Add IM and full wxEVT_CHAR support to wxTextCtrl and wxComboBox in wxGTK.
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
2013-03-21 22:37:09 +00:00
Vadim Zeitlin
afa9873106 Refactor wxGTK IM-related code to allow future modifications.
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
2013-03-21 22:37:01 +00:00
Vadim Zeitlin
d3bd8b1a48 Create a small helper class for Unity global menu bug workaround.
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
2013-03-21 22:36:42 +00:00
Vadim Zeitlin
bdffa92004 Don't connect to the same signal multiple times in wxGTK wxClipboard.
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
2013-02-15 12:40:13 +00:00
Steve Lamerton
236cff7334 Rename all WEB_VIEW* style identifiers to WEBVIEW*.
This makes wxWebView consistent with the rest of the toolkit. 

Closes #15013

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-01 09:38:53 +00:00
Vadim Zeitlin
0444602e46 Derive wxCheckListBox from wxCheckListBoxBase in wxGTK.
This ensures that any methods defined in wxCheckListBoxBase will be available
in wxGTK wxCheckListBox too.

See #14969.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-21 11:18:50 +00:00
Paul Cornett
5ca21fe7bf add wxMask::GetBitmap(), closes #9381
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-20 06:28:11 +00:00
Paul Cornett
4787c92d39 use const arrays for wxDC array parameters, closes #10712
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-18 17:27:51 +00:00
Paul Cornett
dddda0eb88 add support for GtkFontChooserDialog, new in GTK 3.2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-15 05:55:15 +00:00
Steve Lamerton
4c687fff5e Allow registering of custom wxWebView backends.
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
2013-01-13 19:22:24 +00:00
Paul Cornett
b387025d5d simplify code setting backing pixmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-10 06:28:18 +00:00
Paul Cornett
ddb19489c0 remove ancient SetModal(), it was deprecated long ago and is not present in wxMSW or wxOSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-03 05:09:20 +00:00
Steve Lamerton
c420d57be0 Add context menu enabling and disabling to wxWebView, all backends supported.
Closes #14789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-31 13:21:21 +00:00
Paul Cornett
4011652414 reference count the GtkMenuItem in wxMenuItem as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 07:07:29 +00:00
Paul Cornett
bf487502d9 make GTKNeedsParent() private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 06:29:52 +00:00
Paul Cornett
f1a3ae7dc9 m_menubar does not need to be public for hildon, it's the same as m_widget in that case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 06:21:01 +00:00
Paul Cornett
bb3a9c6dee use wxDEPRECATED_CONSTRUCTOR() instead of inline
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-28 18:38:55 +00:00
Paul Cornett
b0d053c1ea Use client size determined by size-allocate when possible
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
2012-12-20 18:46:58 +00:00
Paul Cornett
4ea2d0d573 Fix for toolbars and menus not being disabled on Ubuntu
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
2012-12-16 07:14:40 +00:00
Vadim Zeitlin
5b82415eba wxGTK linking fix after r73102.
Remove SendSelectionChangedEvent() declaration, it's now in the base class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 00:34:28 +00:00
Paul Cornett
b3ee9f4d2e remove unnecessary include of wx/cairo.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 03:35:37 +00:00
Paul Cornett
7af131ab0e disconnect "toggled" signal in dtor when style has wxALIGN_RIGHT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-26 18:30:08 +00:00
Paul Cornett
1897abe1d8 avoid functions deprecated in GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-25 03:41:42 +00:00
Paul Cornett
7fff16b863 Simplify GetDefaultAttributesFromGTKWidget() by passing the widget to use,
rather than a pointer to a function to create the widget


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-25 02:23:34 +00:00
Vadim Zeitlin
93c609c737 Add wxApp::GTKIsUsingGlobalMenu() helper to wxGTK.
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
2012-11-25 00:15:26 +00:00
Vadim Zeitlin
40aa1a7e60 Implement GetSizeFromTextSize() for wxSpinCtrl.
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
2012-11-20 12:49:53 +00:00
Vadim Zeitlin
a0e5592007 Revert all wxNOEXCEPT-related changes.
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
2012-11-20 12:49:03 +00:00
Vadim Zeitlin
24f54e45dc Add wxNOEXCEPT to all wxTextCtrl dtors.
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
2012-11-19 11:53:49 +00:00
Vadim Zeitlin
0508392167 Fix path returned from wxGTK wxFileDialog too.
This is similar to the fixes to wxDirDialog in r72779.

Closes #14786.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-17 23:56:47 +00:00
Vadim Zeitlin
7a78a93782 Add wxControl::GetSizeFromTextSize() to size the control to its text.
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
2012-11-09 21:11:37 +00:00
Vadim Zeitlin
346634a0d3 No changes, just remove unnecessary forward declarations.
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
2012-11-08 14:20:53 +00:00
Paul Cornett
80a77e3c73 fix setting background color in wxGTK3 with themes which use background images or gradients, fixes #14759
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 17:39:55 +00:00
Vadim Zeitlin
c94c3a77b8 Allow creating wxTextMeasure without specifying the font.
Use the default window/DC font by default as this is the most common case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 17:15:22 +00:00
Vadim Zeitlin
e0da9e871a Allow constructing wxGTK wxTextMeasure with NULL font.
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
2012-11-01 17:15:15 +00:00
Vadim Zeitlin
c70155b8ee Just fix header comments of wxTextMeasure-related files, no real changes.
See #14781.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-27 12:27:48 +00:00
Vadim Zeitlin
5a7c1881a1 Store the selected directory in wxGTK wxDirDialog.
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
2012-10-25 23:26:36 +00:00
Vadim Zeitlin
8cd79b7af0 Factor out text measurement from wxDC and wxWindow into wxTextMeasure.
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
2012-10-17 22:35:49 +00:00
Paul Cornett
8ab7533289 Disconnect all GTK signals referencing a wx object which is being destructed
or which is destroying the associated GTK object


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 16:23:18 +00:00
Vadim Zeitlin
bb03d283be Recreate GtkPrintOperation every time when printing in wxGTK.
Apparently reusing GtkPrintOperation is not allowed, so create a new one
every time we need it.

Closes #14731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:37 +00:00
Paul Cornett
95dc31e001 make more Init() functions private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-02 15:57:03 +00:00
Paul Cornett
ec373f2a81 make wxWindowGTK::Init() private, it is not meant to be called from derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 16:55:40 +00:00
Paul Cornett
603e7f6d0c Avoid unrealizing a frozen window
It seems to continue to prevent updates to the affected area

Fixes #13543


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 16:09:12 +00:00
Vadim Zeitlin
9e565667d0 Add wxSpinCtrl::SetBase() to allow entering hexadecimal numbers.
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
2012-08-30 20:24:38 +00:00
Vadim Zeitlin
b9b1eec604 Remove wxRTTI macros from wxSpinCtrlGTKBase.
This is not a public class and it doesn't need to be appear in wxRTTI.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:26 +00:00
Steve Lamerton
66ac040060 Add support for searching and highlighting a wxWebView.
Currently supports WebView on GTK and IE. Closes #14045.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 17:13:13 +00:00
Vadim Zeitlin
1043456035 Generate clipboard events for wxComboBox in wxGTK too.
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
2012-07-29 22:08:15 +00:00
Vadim Zeitlin
c589dc030d Add a wxGTK-specific function to set wxNotificationMessage icon name.
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
2012-07-29 22:07:06 +00:00