Commit Graph

52917 Commits

Author SHA1 Message Date
Vadim Zeitlin
6d07584544 Do send wxEVT_UPDATE_UI events to hidden windows.
Failing to send wxEVT_UPDATE_UI to hidden windows made it impossible to show
them from their update UI handler which was totally unexpected as the
documented wxUpdateUIEvent::Show() method could never be used.

Do send these events to the hidden windows themselves but avoid sending the
update UI events to the children of hidden windows as this is really useless
because any change of their state wouldn't be seen by the user anyhow (even if
the child is shown, it would still remain hidden until its parent is) and
would just waste time processing a lot of needless events.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 23:50:14 +00:00
Vadim Zeitlin
935594c16e Don't send wxWindowDestroyEvent if we hadn't sent wxWindowCreateEvent.
Don't generate wxWindowDestroyEvent when destroying the windows that had been
never created for symmetry with wxWindowCreateEvent which wasn't sent for this
window neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 23:36:46 +00:00
Vadim Zeitlin
4af2a59fbf Don't assert when destroying a never created window in wxGTK.
The other ports don't assert if a default-constructed wxWindow object for
which Create() had never been called is Destroy()d and wxGTK shouldn't do this
neither.

The new behaviour is more logical but also fixes a problem with an assert in
wxOwnerDrawnComboBox that can currently be seen in wxGTK unit tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 23:36:42 +00:00
Vadim Zeitlin
8d43e8c68f Correct a typo in DoAutoCompleteCustom() stub in wxMSW.
Fix a compilation error introduced by r67518.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 13:47:51 +00:00
Jaakko Salli
25b7a51fbf Use Connect() to bind embedded wxTextCtrl events instead of event table. This seems to be more reliable approach here, and fixes a bug with wxPropertyGrid's wxEditEnumProperty.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 10:06:08 +00:00
Jaakko Salli
26844be538 In wxComboCtrlBase::OnTextCtrlEvent(), make sure to call event.StopPropagation() only after it has been copied
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 10:03:16 +00:00
Jaakko Salli
b556474c5d Also show EVT_TEXT_ENTER in the combo sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-18 09:58:27 +00:00
Vadim Zeitlin
a0f01cb25c Correct wrong port-specific note in AutoCompleteFileNames() documentation.
This function is only implemented in wxMSW, not wxGTK2.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 23:15:04 +00:00
Vadim Zeitlin
c729f16fa5 Implement auto-completion support for wxTextEntry in wxOSX/Cocoa.
Both completing a set of fixed strings and dynamic completion using a custom
completer are supported, although completing the file names remains MSW-only
for now.

Note that, unlike under MSW, auto-completion under Mac is not automatic and
has to be triggered manually by calling complete: method. This is done by
pressing F5 key by default. In the future we should call it automatically on a
timer event to make it more obviously discoverable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 23:14:15 +00:00
Vadim Zeitlin
ed7dda9251 Refactor: extract wxTextCompleterFixed from wxMSW to a header.
This class will be used in other ports too so don't make it private to wxMSW
(although it still remains private to wxWidgets for now as it doesn't make
much sense to use it in user code).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 23:14:11 +00:00
Dimitri Schoolwerth
f0cc899914 Removed wxOSX conditional code from generic calendar control.
Tested the calendar sample with Cocoa and Carbon to determine the behaviour and looks are still the same.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 21:47:56 +00:00
Dimitri Schoolwerth
01d420639e Improved year control of generic calendar being too narrow when using a locale with long month names.
See #11444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 21:46:22 +00:00
Dimitri Schoolwerth
4be0198dce Removed invalid use of sizeFlags parameter for SetSize call in generic calendar control.
In r39715 the height parameter of a call to SetSize was changed to -1, however the previous coordinate value remained and became the fifth parameter which represents bit flags. Simply removed the fifth parameter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 21:45:36 +00:00
Vadim Zeitlin
0e5d4c38a3 Add wxAffineMatrix2D and related classes.
This class represents an affine 2D transformation and will be used in wxDC for
now and maybe in wxGC later.

Closes #13143.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 00:09:56 +00:00
Vadim Zeitlin
6f24b81707 Fix wxXmlDocument::SetRoot() broken by recent changes.
Support for wxXML_PI_NODE introduced in r67346 broke SetRoot() and, because of
this, saving XML documents.

Correct this and add a unit test for this method.

Closes #13135.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-17 00:09:45 +00:00
Vadim Zeitlin
32bd17fcb5 Define wxTextEntry::DoAutoCompleteStrings() stub in wxMSW code too.
Forgot to define this function in !HAS_AUTOCOMPLETE case. This fixes linking
problems with old compilers/headers such as VC6 with its original SDK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 23:17:44 +00:00
Vadim Zeitlin
85047589a9 Split wxTextCompleter into a base class and wxTextCompleterSimple.
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
2011-04-16 17:27:34 +00:00
Vadim Zeitlin
e71e4c932a Don't block the main UI thread while generating completions in wxMSW.
The native IAutoComplete implementation takes care to retrieve the completions
from a background thread to prevent the UI from freezing while they're being
generated, but we worked against it by always generating all the completions
from the main thread and just enumerating them from the background one.

Change this now and call wxTextCompleter::GetCompletions() method from the
background thread itself to never block the main one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 17:27:30 +00:00
Vadim Zeitlin
b9a46ea5a2 Use ACO_AUTOAPPEND option for text completion in wxMSW.
This option appends the first candidate completion value to the text control
itself making it more user-friendly as it reduces the amount of typing needed
to enter it.

See #11465.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 17:27:26 +00:00
Vadim Zeitlin
1afe4f9b47 Added private wxEVT_AFTER_CHAR event for wxMSW implementation needs.
This event is sent by wxMSW after the default handling of WM_CHAR has taken
place. It can be used to define an event handler triggered by key presses and
having access to the new value of the control, updated to take the last key
press into account.

This event will be used by auto-completion implementation for wxMSW only for
now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 17:27:21 +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
6b30ffedb1 No changes, just simplify preprocessor checks in wxMSW wxTextEntry.
Separate !HAS_AUTOCOMPLETE stub versions from the real one as the code was
too difficult to read otherwise and would become even more so after the
addition of the upcoming custom auto-completer support.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 17:27:11 +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
Stefan Csomor
058e3f1b54 adding missing part when using the native paint CGContextRef on osx, see #11853
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 16:59:44 +00:00
Stefan Csomor
639e9c7d5b supprting flag for pixel offsetting for msw, see #11853
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 13:07:11 +00:00
Stefan Csomor
ad967c5b98 supprting flag for pixel offsetting for osx, see #11853
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 13:05:17 +00:00
Stefan Csomor
136a1de914 supprting flag for pixel offsetting for cairo, see #11853
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 12:47:22 +00:00
Stefan Csomor
0217cfa537 support generic flag for pixel offsetting, see #11853
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-16 12:21:37 +00:00
Dimitri Schoolwerth
e78c47e3b8 Replaced C++ comments with C ones in C files.
Replaced C++ comments (occurring outside of __cplusplus blocks) in files that contain the warning "THIS IS A C FILE" with C comments.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-15 19:18:34 +00:00
Paul Cornett
f5c0761f51 workaround for broken window managers which claim to support _NET_REQUEST_FRAME_EXTENTS, but don't respond to it
see #13146


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-15 18:31:57 +00:00
Jaakko Salli
35f8ae6572 Removed wxPG_DOUBLE_BUFFER constant. Now all wxPG rendering is done double-buffered, regardless of the platform. Code path with wxPG_DOUBLE_BUFFER = 0 did not render correctly (fixes #13140). In future should probably use wxAutoBufferedPaintDC or something similar, but this will require non-trivial code changes and testing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-15 09:23:23 +00:00
Jaakko Salli
63722a74b0 Rebuild textctrl events using copy ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-14 13:22:40 +00:00
Jaakko Salli
b718a533ac wxEVT_COMMAND_TEXT_UPDATED events from wxComboCtrl's embedded wxTextCtrl kept confusing wxPropertyGrid::HandleCustomEditorEvent(). We need to ignore them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-13 16:39:06 +00:00
Jaakko Salli
8fd38e3369 Completely re-construct the wxComboCtrl textctrl-events instead of just redirecting them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-13 16:35:59 +00:00
Stefan Csomor
00ba1af984 preparing for completions support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-13 09:22:17 +00:00
Jaakko Salli
1d037f6cc8 Describe what re-implemented wxComboPopup::DestroyPopup() should do
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-12 09:35:04 +00:00
Jouk Jansen
44a765d14f Update Makefile for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-11 10:23:37 +00:00
Jouk Jansen
8785530569 revoke OpenVMS dependend part of r67326
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-11 09:36:56 +00:00
Vadim Zeitlin
0287ae5c75 Re-define push_back() in wxSortedArrayString to behave correctly.
Adding items to wxSortedArrayString should always keep them sorted but while
Add() did this, push_back() didn't breaking the class invariant.

Redefine push_back() in _WX_DEFINE_SORTED_TYPEARRAY_2 macro to fix this and
add a unit test checking that wxSortedArrayString::push_back() does work now.

Closes #13134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-10 15:36:07 +00:00
Vadim Zeitlin
ceb9b8db81 Allow customizing AUI tab colours in wxAuiTabArt.
Add wxAuiTabArt::SetColour() and SetActiveColour() methods and provide trivial
default implementation of them in wxAuiDefaultTabArt to allow customizing the
tab colours.

Closes #11411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-10 15:36:03 +00:00
Vadim Zeitlin
4bd9bdf33b Fix off by one pixel error when drawing active tab in wxAUI.
The active tab had a drawing artefact because its gradient background was
drawn in a rectangle one pixel too short.

See #11411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-10 15:36:00 +00:00
Vadim Zeitlin
ea9fee8541 Correct Javanese language code.
It is "jv" and not "jw", the latter was an error in a previous edition of ISO
639 standard and was corrected since then.

Closes #13131.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-10 15:35:56 +00:00
Julian Smart
c1dd924de0 Correction to position in character insertion event when also deleting selected text.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-09 10:28:45 +00:00
Stefan Csomor
26632ccd72 fixing configure builds for iphone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-09 09:22:51 +00:00
Stefan Csomor
89db201aba see #9715
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-08 16:31:12 +00:00
Stefan Csomor
bbca44f104 workaround OSX bug, fixes #4555
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-08 15:09:38 +00:00
Stefan Csomor
f27479e6bd support 3.X deployment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-08 12:16:41 +00:00
Jouk Jansen
472b795e53 Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-08 08:08:10 +00:00
Stefan Csomor
9061b0300c adding 10.5 APIs to avoid CGErrors, fixes #13121
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-07 12:55:36 +00:00
Paul Cornett
736722fb4d build fix for wxUSE_LOG==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-06 17:04:12 +00:00