tool when the window is inactive will both activate the window and cause
the tool to be clicked.
TODO: User should be provided a way to override this behavior. The Apple HIG
are basically that "dangerous" tools (like delete) should not function
on an inactive window.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
dialog is modal, and Show(false) if the dialog is not modal. This allows
the default handlers for OK and Cancel to function without assertions.
This code is copied more or less directly from src/msw/dialog.cpp.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
from derived classes
2. made wxItemContainer::Select() non virtual: it simply calls SetSelection()
3. renamed wxListBox::SetSelection(n, select) to DoSetSelection() for all
ports and defined non virtual SetSelection() overloads in the base class
to avoid virtual functions hiding
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
to determine the rect to clear. Also added CocoaUnapplyTransformations()
to bring the coordinate system back into Cocoa coordinates for those
cases such as Clear() where it makes more sense.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
static wxDC::CocoaGetWxToBoundsTransform. Create the transform and store
it as a member variable in wxDC when focus is locked on the DC.
For wxClientDC and wxPaintDC call a new wxWindow::CocoaGetWxToBoundsTransform
which will eventually handle scrolling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
and from those expressed in wxWidgets fashion. Use these new methods to do
the translation for mouse events, child window position, and dirty rects.
Also improve DoMoveWindow to only dirty the old and new rects of the
control within its superview rather than the entire superview.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Change eqauality operator to check if the NSColor objects are the same
instance or if all of the color components (m_red/green/blue) are identical.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
* Get rid of #if wxUSE_SOUND from header. wx/sound.h checks this already.
* Get rid of pragma interface/implementation. Apple GCC dislikes them anyway.
* Allow source file to use precompiled headers (wx/wxprec.h)
* Include only needed AppKit/Foundation headers, not AppKit/AppKit.h.
* Implement simple constructors inline in header.
* Get rid of m_sndname and m_waveLength instance variables. They aren't used.
* Add copy constructor (why not).
* Move implementation of byte-array constructor into LoadWAV for consistency
with UNIX wxSound.
* LoadWAV (what was in the constructor) now properly allocs, inits, and
releases NSData. The old code for this was not valid.
* Rename lastSound to s_currentSound.
* Rename isLastSoundLooping to s_loopCurrentSound.
* Ignore the sound:didFinishPlaying: delegate message if it is received
for an NSSound other than s_currentSound.
* Create should not Stop the current sound.
* Don't use NSBundle to get a resource sound but use [NSSound soundNamed:]
which will include system sounds.
* Playing a sound synchronously uses wxEventLoop::Dispatch which will
really block (not spin the CPU like Yield). The sound is considered
finished playing when s_currentSound is set to something else. In order
to make sure we don't get stuck in this event loop the delegate
calls wxApp::WakeUpIdle if it releases s_currentSound.
* Have IsPlaying() check to make sure s_currentSound is not nil since
only messages returning another object or void are allowed to be
sent to nil objects.
Changes involving retain/release
* Get rid of comment about tricky API, it's not.
* Get rid of isLastSoundInScope. Cocoa has proper reference counting.
* Add SetNSSound which, like the rest of wxCocoa, retains/releases
appropriately, sets the delegate, and logs when WXTRACE=COCOA_RetainRelease.
* Destructor does SetNSSound(nil) which will always release the NSSound.
Create and LoadWAV use SetNSSound method like the rest of wxCocoa.
* Make the delegate always release s_currentSound if not (or if done) looping.
DoPlay sets s_currentSound to m_cocoaNSSound after retaining it so that
the delegate can always safely release it.
* Stop, like everything else, does not need check of isLastSoundInScope
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changed YES/NO to true/false; do not confuse BOOL (Objective-C) with bool (C++).
Changed some of the indentation to match that the rest of wxCocoa.
There was an if (isLastSoundInScope = NO) which I think was wrong not only
because it used NO rather than false but also because it's an assignment
rather than a test. Changed it to if (!isLastSoundInScope).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775