Commit Graph

53198 Commits

Author SHA1 Message Date
Stefan Csomor
91116a35f2 fixes #12220
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-26 17:14:50 +00:00
Robin Dunn
c141046071 Fix the size of the tree's text editing box on Cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-25 23:18:19 +00:00
Dimitri Schoolwerth
cbbb1f5489 Fixed filename in wxOSX-Cocoa's file dialog using extension of wrong file type.
When using SetFilterIndex to indicate a different initial file type the dialog would still use the extension of the first file type (if the filename had no extension then unchecking "Hide extension" would append the first file type's extension). Fixed this by calling code, that formerly got called only from OnFilterSelected, to notify OS X of the file type change.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-25 13:18:45 +00:00
Václav Slavík
aef081f465 Don't rely on RVO in wxON_BLOCK_EXIT_SET().
MakeVarSetter() relies on the compiler always using RVO, as
VariableSetterImpl<> doesn't have correct copy ctor; worse yet, its use
wasn't detected at compile time.  With some compilers (e.g. VC++ 2008
with non-trivial variable types), this resulted in the variable being
reset too soon, immediately in the place where the macro was used.
Fixed by using the same technique already used in wxScopeGuardImpl. In
fact, VariableSetterImpl is just another special case of
wxScopeGuardImpl, so just derive from the latter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-24 13:14:47 +00:00
Vadim Zeitlin
da87ce5a36 Don't generate wxEVT_COMMAND_DATAVIEW_CACHE_HINT for empty control.
Don't send any cache hint events for empty wxDataViewCtrl. Sending them was
unnecessary, inconsistent with wxListCtrl (which doesn't send them when it's
empty) and the events also had incorrect range. Just don't create them at all
to avoid all these problems at once.

Closes #13132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 18:01:36 +00:00
Vadim Zeitlin
68f64b40bf Don't close arcs drawn in wxPostScriptDC.
Draw arcs, not pies, in DoDrawArc(): simply remove the apparently unnecessary
last lineto and closepath PostScript statements.

Closes #13141.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 17:36:11 +00:00
Vadim Zeitlin
c7e94140cd Change wxNotebook selection before sending page changed event in wxMSW.
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED handler should see the new page selected
in the control, not the old one as was the case if the page was changed using
the mouse in wxMSW.

This should have been done together with the other changes of r66224, see its
commit message for more details.

Closes 13145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 16:19:15 +00:00
Vadim Zeitlin
e71508e160 Add wxDC::SetTransformMatrix() and related methods and implement them in wxMSW.
Add support for world transformations to wxDC too. Currently this is
implemented in wxMSW only but could be easily provided in the ports that use
wxGraphicsContext for wxDC implementation later.

Closes #13092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 16:03:10 +00:00
Vadim Zeitlin
54580df4e2 Fix compilation error in recent change to wxSizeEvent generation.
Wrong variable name was used in r67583, fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 15:12:59 +00:00
Vadim Zeitlin
15fa4de377 Correct names of parameters in wxAffineMatrix2D documentation.
Some parameters were misnamed in @param paragraphs, fix this.

Closes #13143.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 14:53:42 +00:00
Vadim Zeitlin
2ab92d62cf Add a simple unit test for wxParseCommonDialogsFilter().
Verify that this function (which is used for parsing the wildcard strings used
with file-related dialogs) works as expected and also asserts when given
invalid input.

See #4489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 14:53:38 +00:00
Vadim Zeitlin
b22a1070b3 Document that wxTreeCtrl::SelectItem() generates events.
This is another exception to the general rule that program actions don't
generate any events so document it explicitly.

See #13153.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 11:17:43 +00:00
Vadim Zeitlin
df97a4ef79 Set event object correctly for the generated wxSizeEvents.
wxSizeEvent event object was not set correctly in at least a couple of places.
Do set it now.

Closes #13156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 11:17:40 +00:00
Vadim Zeitlin
a6fd3ed883 Remove duplicate negated option indicator in wxCmdLineParser help.
The indicator of a negatable option (one with wxCMD_LINE_SWITCH_NEGATABLE
flag) appeared twice in the usage message, don't add it the second time.

Closes #13157.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 11:17:36 +00:00
Vadim Zeitlin
f3b1d0fc56 Fix file paths in wxFileSystemWatcherEvent under OS X.
The separator between the watched directory and the name of the file in the
generated event was missing, add it now.

Closes #13161.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 11:17:33 +00:00
Vadim Zeitlin
d7cfeeb49c Set page range in the print preview correctly.
The valid pages range was set too early before, we need to postpone it until
after the OnPreparePrinting() call of the user-defined wxPrintout object as
only it can determine the number of pages (after running the pagination
algorithm) in general.

Set the pages range during the first call to RenderPageIntoDC() to fix this.

Also add wxPrintPageMaxCtrl class for symmetry with the existing
wxPrintPageTextCtrl and use a shared constant MAX_PAGE_NUMBER instead of hard
coded 99999. Slightly improve the layout of wxPrintPageMaxCtrl too.

Closes #12965.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 10:49:48 +00:00
Vadim Zeitlin
a78d2fbab1 Make the source files non-executable again.
Revert the (probably accidental) mode change of r67576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-23 10:41:29 +00:00
Robin Dunn
a30565f99d Use a relative link for wx-config so it will also work even when not located at the install prefix. Ported from the wxPy-2.9.1.1 tag/branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 19:20:31 +00:00
Robin Dunn
be7a5775d2 Explicitly specify the Mac SDK for wxPython builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 19:18:47 +00:00
Václav Slavík
64c70359a7 Return wxWindow* from wxDataViewCustomRenderer::CreateEditorCtrl().
There's no reason to limit custom editor controls to wxControl, which
would rule out e.g. composite controls or any custom widgets.
Make appropriate changes to related functions and code too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 18:25:32 +00:00
Stefan Csomor
68dd2c52a4 osx 64 bit multilib build needs an explicit export as in this architecture our visibility flags get respected for obj-c classes as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 15:48:13 +00:00
Stefan Csomor
c1313b54c6 implementation of HotKey, see #12354
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 15:20:11 +00:00
Václav Slavík
b4f70f7706 Compilation fix for DEFINE_GUID uses.
DEFINE_GUID doesn't define the value, only declares an external
variable, unless initguid.h was included. This leads to linker errors.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 14:50:20 +00:00
Dimitri Schoolwerth
fa5d9d2006 Fixed wxUSE_STD_STRING==0 compilation.
With at least MSVC9 numformatter.cpp wouldn't compile because of unknown identifiers related to locales. Include <locale.h> in case wxUSE_STD_STRING is set to 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-22 10:43:47 +00:00
Vadim Zeitlin
0f0c5856e0 Define ACO_AUTOAPPEND for MinGW/Cygwin.
Apparently this symbol is not defined in MinGW headers neither, so do it
ourselves as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-21 23:43:27 +00:00
Vadim Zeitlin
c621269778 Use "wx" prefix for the GUIDs we (re)define in wxMSW code.
CLSID_AutoComplete became ambiguous with MinGW because it does define it in
its shlguid.h header (although MSVC/Platform SDK does not define this one) so
use a "wx" prefix for it to avoid ambiguity. Also use the same prefix for the
IID_IAutoCompleteDropDown value we define for consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-21 23:43:23 +00:00
Vadim Zeitlin
78f250a46d Redefine IAutoCompleteDropDown in our code as it's not always available.
MinGW doesn't have shobjidl.h header file which is normally part of the
Platform SDK and doesn't have IAutoCompleteDropDown interface definition in
any of its headers at all, so define this interface and its IID ourselves to
make the code compile with it.

Notice that MinGW-64 does have the interface declaration but still doesn't
define IID_IAutoCompleteDropDown.

So to be on the safe side just always define everything ourselves, as long as
we need to do it for one of the compilers, it's not more difficult to do it
for all of them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-21 15:47:37 +00:00
Julian Smart
987695522c Added ForceDelayedLayout
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-21 12:44:26 +00:00
Dimitri Schoolwerth
daa3165144 Make use of SetFilterIndex in wxOSX-Cocoa's file dialog.
Previously the file type would solely be based on the extension of the passed filename. This is still done, but any valid filter index as set by the user will now take precedence.

See also #12429.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-20 14:54:56 +00:00
Dimitri Schoolwerth
0d1cd87409 Fixed saving dialog's filter index always being -1 with wxOSX-Cocoa.
This problem was reproducable using the Save file dialog in the dialogs sample.
The member m_filterIndex was only initialised to -1 and never set at another point. Set it to the filter's selection during ModalFinishedCallback.

Closes #13158.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-20 07:53:07 +00:00
Paul Cornett
753cba1a75 fix conversion of gdk_input_add() to g_io_add_watch() from r67326
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-19 05:17:45 +00:00
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