- TransitionWindowOptions options;
- options.version = 0;
- options.duration = timeout / 1000.0;
- options.window = transition == kWindowSheetTransitionEffect ? (WindowRef) GetParent()->MacGetTopLevelWindowRef() :0;
- options.userData = 0;
-
- wxSize size = wxGetDisplaySize();
- Rect bounds;
- GetWindowBounds( (WindowRef)m_macWindow, kWindowStructureRgn, &bounds );
- CGRect hiBounds = CGRectMake( bounds.left, bounds.top, bounds.right - bounds.left, bounds.bottom - bounds.top );
-
- if ( dir & wxRIGHT )
- {
- hiBounds.origin.x = size.x;
- hiBounds.size.width = 0;
- }
- if ( dir & wxUP )
- {
- hiBounds.origin.y = 0;
- hiBounds.size.height = 0;
- }
- if ( dir & wxDOWN )
- {
- hiBounds.origin.y = size.y;
- hiBounds.size.height = 0;
- }
- if ( dir & wxLEFT )
+
+ ::TransitionWindowWithOptions
+ (
+ (WindowRef)m_macWindow,
+ transition,
+ show ? kWindowShowTransitionAction : kWindowHideTransitionAction,
+ transition == kWindowGenieTransitionEffect ? &hiBounds : NULL,
+ false,
+ &options
+ );
+
+ if ( show )