Commit Graph

101 Commits

Author SHA1 Message Date
Václav Slavík
5d87c70eba Mimic native focus handling in wxStatusBar on macOS
Improve the logic for determining whether the statusbar should be
renderer as for active/key window or a background one.
wxTopLevelWindow::IsActive() is not a sufficient test because it returns
false in some situations when the statusbar need to appear as active
(another floating window) and also didn't account for window-modal
sheets (which don't change statusbar appearance either).
2017-01-11 12:42:42 +01:00
Paul Cornett
56701052eb remove const from pass-by-value parameters 2016-01-16 10:55:01 -08:00
Hartwig
f659422405 Addition of missing overrides in private.h 2015-11-22 09:50:27 +01:00
John Roberts
fe9a5f47f4 Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().

Currently implemented for MSW and OSX only.

Closes #17133.
2015-09-06 14:17:46 +02:00
John Roberts
6055d8d0a5 Implement wxTopLevelWindow::EnableCloseButton() for wxOSX
Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
2015-09-06 14:16:39 +02:00
Tobias Taschner
8bd14648cd Remove Cocoa code and precompiler defines targeting OS X versions prior to OS X 10.7. 2015-08-07 16:25:28 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Václav Slavík
de0c7f725d Add support for template NSImages to wxBitmap
wxBitmap uses CGImage instead of NSImage internally and the conversion
looses NSImage metadata.  In particular, it looses the "template"
attribute, which is set for files ending with "Template" and loaded
trough wxArtProvider.

This change makes it easy to use template images with native controls
such as the toolbar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-14 08:53:11 +00:00
Stefan Csomor
0d6d012936 common type for native rectangle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 17:14:21 +00:00
Stefan Csomor
cea11b591e in order to get all focus set events, store field in editor and catch becomeFirstResponder there, see #14269
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-18 16:33:57 +00:00
Stefan Csomor
2b99f92872 refactoring to common code for focus set and lost events, so that changes can be made a single place, see #14269
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-18 10:44:24 +00:00
Stefan Csomor
91f25e0bbd using the base class wxHAS_NATIVE_ENABLED_MANAGEMENT in cocoa disabling/enabling child windows, fixes #16232, fixes #15495
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 19:14:21 +00:00
Dimitri Schoolwerth
6451d23158 Added support for using OS X' full screen API (available since OS X 10.7).
Added EnableFullScreenView() to have a full screen button in the title bar and also allowing ShowFullScreen() to make use of the newer full screen API.

See #14357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-11 22:41:13 +00:00
Paul Cornett
3dcb256bea build fix for wxUSE_DRAG_AND_DROP==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:37 +00:00
Stefan Csomor
21aa2122f4 make sure a frozen control calls a native 'thaw' on the tlw during destruction, otherwise tlws might end up unresponsive, see #16011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:02:58 +00:00
Vadim Zeitlin
853ee8bf12 Get rid of compile- and run-time checks for OS X < 10.5.
As 10.5 is the minimal supported version, it doesn't make sense to check for
it (or even earlier versions) during the build or run-time.

Closes #15580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 12:34:12 +00:00
Vadim Zeitlin
8155d71a7d Improve handling of keyboard entry using IME.
Pass the keyboard events to the IME before generating our events for them, the
IME may need them for its own use.

Closes #15384.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 23:30:45 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Stefan Csomor
bc7a3ceeba support getting device resolution on all osx ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-28 13:24:27 +00:00
Stefan Csomor
9c4672b0f8 new method for contentScaleFactor on main screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 12:48:46 +00:00
Stefan Csomor
c944835aaa native bitmap scaling codes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 07:24:15 +00:00
Stefan Csomor
f082dcd598 using common GetContentScaleFactor throughout part 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-19 20:28:01 +00:00
Stefan Csomor
f86190702b adding magnification API into the wxWindow classes for best retina support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-17 17:41:34 +00:00
Stefan Csomor
13167e72d6 exposing useful typedefs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 20:41:04 +00:00
Stefan Csomor
ba0cf6af6d exposing wxOSXGetViewFromResponder
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-04 07:06:19 +00:00
Stefan Csomor
60d66be369 attempt to get the 'new focus' window parameter of a focus kill event set correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-03 10:37:01 +00:00
Stefan Csomor
d9307d006e applying editor part of patch, see #15003
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 18:31:51 +00:00
Stefan Csomor
094fa9e9ef enabling cursor events, fixes #15044
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 13:01:57 +00:00
Stefan Csomor
c551dc29e7 try support for native isFlipped usage and coalesce update rects into bounding box by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-23 11:50:33 +00:00
Stefan Csomor
2ab3802522 support for freeze and thaw under cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-08 15:46:23 +00:00
Vadim Zeitlin
cabc71dee3 Update the button bezel to account for multi-line labels in wxOSX.
If a button was created using a normal single-line label (including empty one)
and then its label was changed to something multi-line later, its size stayed
wrong in wxOSX as it still used the fixed size bezel used by normal buttons.

Adjust the bezel after each bezel change now to update the size of the button
if necessary.

Closes #12491.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-04 23:50:50 +00:00
Stefan Csomor
2ab6738554 missing commit, fixes #14797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-02 17:02:15 +00:00
Stefan Csomor
a1b719bc74 exposing common used button impl class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-02 10:06:06 +00:00
Stefan Csomor
befe64edb4 add global NSLayoutManager instance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:15:50 +00:00
Stefan Csomor
14de8214d6 native drop target method for cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-01 15:46:56 +00:00
Stefan Csomor
78f212178e exposing mainWindow for C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-13 22:32:07 +00:00
Stefan Csomor
3a17676321 using 10.5 API for cursor updates as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-10 13:13:51 +00:00
Vadim Zeitlin
6a0e4ead1e Add wxTopLevelWindow::SetRepresentedFilename().
This currently is only implemented under OS X and sets the proxy icon there
but could be implemented to do something useful under the other platforms too
in the future.

Closes #13797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:47 +00:00
Vadim Zeitlin
040050b8f4 Don't export Objective C interfaces in non-x86_64 builds.
Doing this is unnecessary and results in compilation errors in PPC and x86
builds when using old (4.0.1) version of the compiler.

So make WXEXPORT added in r67575 specific to 64 bit builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-22 12:38:36 +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
415f4a011a moving userpane attribute into implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-18 15:45:51 +00:00
Dimitri Schoolwerth
a9a4f22953 Set svn properties on various files throughout the repository (skipped docs/ ).
Added missing svn:eol-style (set to native) and svn:keywords (set to Id) properties to c/cpp/cxx/h/mm files.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-18 15:10:15 +00:00
Stefan Csomor
9d243a476a window level support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-07 19:04:55 +00:00
Stefan Csomor
4c00ce28bd add watch cursor to osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 13:44:25 +00:00
Stefan Csomor
a5d0c88a85 moving appdelegate declaration to header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-28 10:10:08 +00:00
Stefan Csomor
ca9eebc346 artmac extended for cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-26 16:15:39 +00:00
Vadim Zeitlin
382c4adea6 Fix preprocessor definitions for wxBase build under OS X.
Define __WXOSX__ for non-GUI build under Darwin. Ensure that the rest of the
code compiles correctly when just __WXOSX__ is defined but neither of
__WXOSX_{CARBON,COCOA,IPHONE}__ is. This ensures that wxBase can actually be
built under Mac.

Move OS X symbols definitions in wx/platform.h after wx/setup.h inclusion as
they rely on __DARWIN__ and wxUSE_GUI values which are both define in that
file now. Still keep them before wx/chkconf.h inclusion which relies on
__WXOSX_XXX__ being defined. Yes, it's a mess and should be cleaned up more
permanently some day.

Also remove some redundancy from wx/osx/{carbon,cocoa}/private.h by factoring
out common parts into wx/osx/core/private.h. Also include this header itself
from wx/osx/private.h directly instead of including it thrice from different
sub-ports headers.

Closes #12660.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-09 23:53:42 +00:00
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
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