Commit Graph

298 Commits

Author SHA1 Message Date
Vadim Zeitlin
e567904ae6 Fix text text changed events sending in OS X combo box and text control.
Don't duplicate needlessly wxTextEntry functionality in wxTextCtrl.

Don't clear the combobox text entry part twice in wxComboBox::DoClear(), it is
supposed to only clear the item container contents as the base class Clear()
already calls wxTextEntry::Clear().

Do send text updated events from wxTextEntry itself as it applies to
wxComboBox just as well as to wxTextCtrl.

The unit tests now pass under wxOSX/Cocoa, not breaking them again would be
appreciated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:29 +00:00
Vadim Zeitlin
005ac806ea Remove duplicated GetTextPeer() definitions from derived classes.
GetTextPeer() may be implemented directly in wxTextEntry under OS X, there is
no need to define it (identically) in wxTextCtrl and wxComboBox.

Also just call this method instead of duplicating its code in wxOSX
wxTextCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 18:46:14 +00:00
Stefan Csomor
ac349b6e66 adding clipboard events, fixes #11906
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 16:51:12 +00:00
Vadim Zeitlin
cc16513e28 Correct check for MSVC version in wxUSE_GRAPHICS_CONTEXT definition.
Set wxUSE_GRAPHICS_CONTEXT to 1 by default for MSVC 7.1+ and not 8+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-06 13:55:30 +00:00
Vadim Zeitlin
961f4d0ce6 Correct compilation breakage of r63832.
wx/setup.h can't use wxCHECK_VISUALC_VERSION() which is defined in
wx/platform.h _after_ wx/setup.h inclusion.

Replace wxCHECK_VISUALC_VERSION() with manual tests for _MSC_VER.

Also add more comments to explain what's going on.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-03 12:25:52 +00:00
Vadim Zeitlin
cde23b64b5 Allow using wxGraphicsContext with MinGW if gdiplus.h is available.
MinGW doesn't include gdiplus.h but it can be installed independently by the
user. Allow to use it if it's available:

- Include windows.h when checking for it in configure as this is apparently
  needed for its compilation.
- Don't reset wxUSE_GRAPHICS_CONTEXT to 0 for non-Microsoft compilers, instead
  just define it as 0 by default for them, allowing the user to simply change
  the definition in wx/msw/setup.h.

Closes #11892.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-02 19:30:41 +00:00
Stefan Csomor
62068535c5 simplifying modal event loop handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-02 14:52:08 +00:00
Vadim Zeitlin
9b7e022676 Add wxUSE_UIACTIONSIMULATOR and turn it off by default.
Disable the recently added wxUIActionSimulator class until the issues with it
mentioned at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/119792/
are fixed.

Also use "" around wx headers instead of <> in wx code itself.

See #11801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:35 +00:00
Stefan Csomor
9aee121225 adding proper removal of observer for stacked event loops, using cfrunloop for console on osx as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 08:05:04 +00:00
Stefan Csomor
80eee8378f streamlining OSX event support third step, using platform specific native run methods for event loops
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 07:14:03 +00:00
Stefan Csomor
293a13bad7 streamlining OSX event support second step, moving pending and idle event handling to runloop-observer, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 19:31:57 +00:00
Stefan Csomor
0056673c67 streamlining OSX event support first step, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 15:40:47 +00:00
Kevin Ollivier
a45c9ba59b A call to wxPopupWindow::Show shouldn't automatically cause the popup window to steal focus.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-06 04:51:51 +00:00
Stefan Csomor
878357d8f7 make sure ShowEvent doesn't get triggered to early during construction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-03 16:33:12 +00:00
Robin Dunn
06bb8d923d Invalidate best size when the bitmap or bitmap position changes. Add GetBitmapMargins
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-01 23:20:35 +00:00
Kevin Ollivier
78a1707501 Override CanFocus because the wxWindow level test will check if the NSTextView's parent scrollview can get keyboard focus, and will return no, meaning that wx won't set the focus to the text ctrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-27 02:51:45 +00:00
Kevin Ollivier
e908dbcc92 Cocoa text fields and views have their own context menus, so we should use those instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-22 01:56:42 +00:00
Kevin Ollivier
809020fc97 Disable sending of events by OS X Combobox during programmatic changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-19 03:00:07 +00:00
Kevin Ollivier
a7b9865d30 Basic support for tooltips under OS X Cocoa.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-13 06:30:06 +00:00
Stefan Csomor
126254a8d0 adding carbon event missing in 10.4 headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-08 07:20:39 +00:00
Kevin Ollivier
75a2c6a1ee Get wxSearchCtrl text events working, and share the text event handler code among all the various wxTextCtrl-based classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-06 17:00:38 +00:00
Kevin Ollivier
808cbd174a Add an accessor to get the current drop source from window.mm so that we can implement GiveFeedback support, and also move a couple functions that check the current drop source into common DND OS X code as a result.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-06 01:45:58 +00:00
Stefan Csomor
5aa6ea933f supporting clipboard command shortcuts on osx_cocoa as well, simplifying code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-31 11:01:53 +00:00
Kevin Ollivier
bfa92264c0 Get ShowWindowModal behavior working under OS X Cocoa for file, dir and message dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-28 04:06:23 +00:00
Stefan Csomor
4d572a2cac simplifying code, removing outdated API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-25 22:27:42 +00:00
Kevin Ollivier
9482c64466 Start on ShowWindowModal for OS X Cocoa. Not working properly as children do not display.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-23 20:06:48 +00:00
Stefan Csomor
c8fdb345a0 adding protocol support for 10.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-11 14:19:28 +00:00
Kevin Ollivier
496af8a383 Remove duplicate fields in wxTextCtrl / wxTextEntry. Fixes #11618.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-10 01:52:22 +00:00
Kevin Ollivier
c84030e020 Implement native OS X ComboBox for OS X Cocoa, and implement wxTextEntry methods to share code between wxComboBox and wxTextCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-09 19:50:55 +00:00
Stefan Csomor
f871cf140c adding kqueue define for xcode builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-04 07:52:45 +00:00
Kevin Ollivier
f941a30bef Get the OS X Cocoa native combobox building by having the native code compile if wxOSX_USE_NATIVE_COMBOBOX is defined. It must be explicitly enabled by adding that define to the build flags as the native implementation is mostly just stubs right now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-04 01:57:42 +00:00
Kevin Ollivier
e2758e2175 Don't use a destroy event handler to disconnect the native control's delegate as the destroy event propagates and can cause the TLW to remove its delegate at unexpected times, such as when a child control is destroyed but the TLW remains active. Instead, do it in response to the Destroy() call.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-03 23:59:32 +00:00
Stefan Csomor
554946db7d correcting error message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-03 19:58:18 +00:00
Kevin Ollivier
509da835c5 To support playing async sounds on the stack on Mac, do not delete the wxSoundData when its wxSound object is destroyed if it's in the queue of sounds to be played. Instead, mark it to be deleted and delete it after it has played.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-30 17:41:29 +00:00
Kevin Ollivier
1665389a9a Remove the native toolbar from the frame in Destroy() rather than the destructor, as removing it in the destructor causes resize / repaint events to fire on the native control, which then goes to wx controls being deleted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 20:43:43 +00:00
Stefan Csomor
0aaa6ace7e removing event handlers on non-owned windows when the destroy event is sent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-25 09:47:30 +00:00
Stefan Csomor
9804064630 rearranging contentview, adding toolbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-12 14:01:28 +00:00
Kevin Ollivier
ebf7d5c40a Add OSX prefix, and be clear that this is OS X only API to avoid any expectation that this API may work elsewhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-09 05:25:32 +00:00
Kevin Ollivier
efb2fa41ff Add wxTLW::SetModified to allow apps to set the TLW's dirty state. On Mac this gives us the dot in the close button, not implemented elsewhere yet.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-07 01:54:21 +00:00
Paul Cornett
65391c8ffc minor cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-05 19:57:58 +00:00
Paul Cornett
cff9681b85 make access for virtuals match base
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 17:20:15 +00:00
Paul Cornett
2a32b8071b check for self assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 16:36:50 +00:00
Vadim Zeitlin
030495ecf1 Add wxOSX_10_6_AND_LATER macro and use it.
Replace all occurrences of

	@interface wxFoo : NSFoo
	#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
	    <NSProtocol>
	#endif

which we used for protocols new in 10.6 with just

	@interface wxFoo : NSFoo wxOSX_10_6_AND_LATER(<NSProtocol>)

which looks better and simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 16:47:33 +00:00
Kevin Ollivier
5cbf522105 Build fix for OS X <= 10.5.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 23:14:28 +00:00
Kevin Ollivier
9ab7ff537d Allow OS X Cocoa (or any OS X port) to override GetBestSize and provide a native OS X Cocoa impl. Also, fix the line ending check under OS X Cocoa, and a sanity check for SetStyle.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 23:11:27 +00:00
Kevin Ollivier
b9cf2753b4 Add CheckSpelling support for OS X Cocoa, make sure NSTextView-based wxTextCtrls emit EVT_TEXT, and a fix for GetStyle when position == length.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 21:52:42 +00:00
Vadim Zeitlin
a12bd55b0d Enable wxGraphicsContext and related classes by default if supported.
For MSW, check for gdiplus.h availability when using configure but only
support it for MSVC 7+ otherwise. For the other platforms, always support it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:01:15 +00:00
Stefan Csomor
a0b48f2651 adding toolbar implementation for iphone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-13 18:39:38 +00:00
Vadim Zeitlin
061a5c21db Add wxOSX_USE_COCOA around Cocoa-only OSXApplyAttr() method.
This method is used in wxOSX/Cocoa only.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-11 01:36:36 +00:00
Vadim Zeitlin
aaedb44c5e Revert r62598 which removed "unnecessary wxOSX_USE_COCOA checks."
These checks were not unnecessary at all, this file is used for both Cocoa and
Carbon, fix this momentary lapse of reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-11 01:32:58 +00:00