void doMouseDown(EventRecord *eventStrucPtr) { WindowRef windowRef; WindowPartCode partCode, zoomPart; BitMap screenBits; Rect constraintRect, mainScreenRect; Point standardStateHeightAndWidth; long newSize; partCode = FindWindow(eventStrucPtr->where,&windowRef); switch(partCode) { case inMenuBar: break; case inContent: if(windowRef != FrontWindow()) SelectWindow(windowRef); else doInContent(eventStrucPtr,windowRef); break; case inDrag: DragWindow(windowRef,eventStrucPtr->where,NULL); break; case inGoAway: break; case inGrow: constraintRect.top = 75; constraintRect.left = 250; constraintRect.bottom = constraintRect.right = 32767; newSize = GrowWindow(windowRef,eventStrucPtr->where,&constraintRect); if (newSize != 0) SizeWindow(windowRef,LoWord(newSize),HiWord(newSize),true); window_adjust_scrollbars(windowRef); window_invalidate(windowRef); break; case inZoomIn: case inZoomOut: mainScreenRect = GetQDGlobalsScreenBits(&screenBits)->bounds; standardStateHeightAndWidth.v = mainScreenRect.bottom; standardStateHeightAndWidth.h = mainScreenRect.right; if(IsWindowInStandardState(windowRef,&standardStateHeightAndWidth,NULL)) zoomPart = inZoomIn; else zoomPart = inZoomOut; if(TrackBox(windowRef,eventStrucPtr->where,partCode)) { ZoomWindowIdeal(windowRef,zoomPart,&standardStateHeightAndWidth); window_adjust_scrollbars(windowRef); } break; } }
bool wxTopLevelWindowMac::IsMaximized() const { return IsWindowInStandardState( (WindowRef)m_macWindow , NULL , NULL ) ; }