Commit Graph

91 Commits

Author SHA1 Message Date
Vadim Zeitlin
ce00f59b5b No changes whatsoever, just remove trailing whitespace.
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:44:45 +00:00
Stefan Csomor
5d57348ef5 fixing 'main screen'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 09:20:28 +00:00
Vadim Zeitlin
80ce465c64 Add wxDataViewCtrl::{Set,Get}CurrentItem().
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.

The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-10 12:53:03 +00:00
Vadim Zeitlin
c072b9ec8a Add association between wxOSX wxTextWidgetImpl and wxTextEntry.
This allows to always find the correct wxTextEntry to use in the
implementation of text-related widgets without using any casts. Notably, the
wrong up-cast of wxWindow to wxTextCtrl in wxNSTextFieldControl::controlAction()
which resulted in a crash when the window was actually a wxComboBox can now be
fixed.

Closes #12284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-28 11:27:01 +00:00
Vadim Zeitlin
233f573883 Fix file paths in the header comments.
Consistently use only "wx/foo.h" instead of "include/wx/foo.h" ("include" is
always implicit anyhow).

Also use "src/osx" instead of "src/mac" for the files in this directory.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:58 +00:00
Stefan Csomor
7934e44732 overriding the cfrunloop accessor, during booting cocoa has to create a NSRunLoop earlier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-22 06:16:34 +00:00
Stefan Csomor
447e2772a6 type of wrapped window can be any NSWindow, not only our own classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-20 14:55:10 +00:00
Stefan Csomor
bc5c09a3aa translating background style BG_PAINT into opaqueness for speed-up of OS redraws, supporting positioning for native carbon controls also on non-composited windows (custom pane in navservices dialogs)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 06:18:16 +00:00
Stefan Csomor
17e2694c59 adding wrapping possibility for native tlws
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-13 20:24:59 +00:00
Stefan Csomor
59d866ad85 name change to correctly reflect the autorelease nature of the methods, removing double release, fixes #11547, fixes #11760
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 16:29:35 +00:00
Stefan Csomor
13f0c85aa4 cocoa implementation for overlay
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-11 09:26:31 +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
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
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
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
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
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
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
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
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
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
a35169b622 Add support for wxDV_NO_HEADER to OS X/Cocoa wxDataViewCtrl.
Also use this flag with the tree control in the sample to test it and also
because it doesn't make much sense to have a single column without title
anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-10 17:42:46 +00:00
Kevin Ollivier
b6dc21e768 Make wxSTAY_ON_TOP and other window styles toggleable via SetWindowStyleFlag under OS X Cocoa.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-08 03:03:06 +00:00
Kevin Ollivier
16671f229a Start on Get/SetStyle support for OS X Cocoa wxTextCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-01 00:58:04 +00:00
Kevin Ollivier
dbc7ceb925 Initial ShowWithoutActivating implementations for Mac and Windows, and attempt to improve IsActive behavior on Mac. Also adding ShowWithoutActivating() and Show/Hide tests, but until the mainloop issues are resolved, not adding them to tests.bkl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-30 05:04:47 +00:00
Vadim Zeitlin
eda34276d6 Don't show anything in the cells which should be empty in Cocoa wxDVC.
Implement a custom NSTableColumn-derived class to return nil for the cells
which shouldn't show anything at all because they are part of a container row.

This finally fixes the totally wrong display of the first page of the dataview
sample under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-24 01:03:36 +00:00
Vadim Zeitlin
5cd9986613 Refactor wxEventLoopSource-related code.
Currently wxEventLoopSource can't be created directly and can only be used to
monitor file descriptors so reduce the API to just wxEventLoop::AddSourceForFD()
and remove AddSource(), RemoveSource() and RemoveAllSources() which couldn't
be implemented for all ports. This makes the code much simpler without any
loss of functionality.

Make wxEventLoopSource responsible for removing itself from the event loop
when it is deleted. This allows to remove IsOk() and Invalidate() methods
making the code simpler and gets rid of various sets/maps which were used
before.

This also allows to support event loop sources in Carbon as well: wxOSX/Carbon
now compiles and works with wxUSE_FSWATCHER==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-22 11:36:35 +00:00
Vadim Zeitlin
6b8ef0b35d Merge SOC2009_FSWATCHER branch into trunk.
Merges everything from the branch with only some minor changes, mostly renamed
wxUSE_FSWATCHER_{INOTIFY,KQUEUE} to wxHAS_{INOTIFY,KQUEUE}.

Add wxFileSystemWatcher and related classes.

Also introduces wxEventLoopSource.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-22 11:35:43 +00:00
Vadim Zeitlin
8e59cbe40c No changes, just attempts to make the code more readable.
Reformat/reindent, use more wx coding style, wrap some extremely long lines.
Use shorter and less Carbon-ish variable names. Clarify some comments.

Also use static_cast<> because there is no need to use reinterpret_cast<> when
a static_cast<> will do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-17 01:04:20 +00:00
Vadim Zeitlin
f32eb96401 Fix crash when editing wxDVC items in place in wxOSX/Cocoa.
NSOutlineView::editedColumn: and editedRow: return -1 when they are called
from textDidEndEditing so we need to store their values in textDidBeginEditing
and reuse them later.

This fixes the crash in the sample with out-of-range array index exception
which happened whenever a cell was edited.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-17 01:04:13 +00:00
Vadim Zeitlin
c937bcac0f Add ellipsization support to wxDataViewCtrl.
Implemented ellipsization in the generic, GTK and both OS X Carbon and Cocoa
versions but it currently doesn't work well in GTK as it changes the item
alignment unconditionally, this will need to be fixed later.

The behaviour for the columns is currently inconsistent between ports too:
under MSW they (natively) use wxELLIPSIZE_END, under GTK -- wxELLIPSIZE_NONE
and under OS X the same ellipsization mode as the column contents, i.e.
wxELLIPSIZE_MIDDLE by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-16 21:35:26 +00:00
Vadim Zeitlin
09a0ece0dc Fix display of items without attributes in Cocoa wxDVC.
The attribute used for the last item was reused for the next item in the same
column unless it was overridden in the attribute of this item, fix this by
remembering the original attribute and using it if no attributes are
explicitly specified.

Also change the sample to show the items without attributes in a column with
attributes and make the label correspond to the attribute of the item.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 17:30:48 +00:00
Vadim Zeitlin
de40d73647 No real changes, just minor cleanup in Cocoa wxDataViewCtrl.
Start cleaning up Cocoa wxDataViewCtrl implementation:
 - Don't use "this->" which is not used anywhere else in wx code.
 - Use "()" instead of "(void)" as per wx coding standards.
 - Don't use end of function comments, this is inconsistent and
   unmaintainable.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-12 13:59:32 +00:00
Stefan Csomor
411a1c35ff implementing rollover and pressed image for bitmapbutton on osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-08 18:38:43 +00:00
Vadim Zeitlin
ab9a0b84de Implement wxWindow::ShowWithEffect() for wxOSX/Cocoa.
This version animates the window asynchronously and is being checked in just
to preserve it in svn if we later decide to return to this semantics. It will
be replaced by synchronous animation in the next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-05 22:57:59 +00:00
Stefan Csomor
267ba369d6 fixing typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-02 19:56:35 +00:00
Stefan Csomor
1821877f7f adding NSImage to CGImageRef conversion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-02 17:51:16 +00:00
Stefan Csomor
ddbc8ac9ca cleaning up key handling, closes #10406
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-26 10:39:26 +00:00
Stefan Csomor
0a84f928e9 moving themeing include to private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 12:57:12 +00:00
Vadim Zeitlin
b3b17ee743 Fix recurring typo in "theming".
It was (consistently) misspelt as "themeing" in several places.

Closes #11206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-18 16:16:30 +00:00
Stefan Csomor
0770c0a05f fixing and completing iPhone sound
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-14 13:07:23 +00:00
Stefan Csomor
4e16d05a28 enabling correct audio framework on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-13 17:23:53 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00