#import <CPWindow.h>
Class Methods | |
(BOOL) | + constrainWindowsToUsableScreen |
(CGRect) | + frameRectForContentRect:styleMask: |
(int) | + globalResizeStyle |
(void) | + setConstrainWindowsToUsableScreen: |
(void) | + setGlobalResizeStyle: |
![]() | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(void) | + cancelPreviousPerformRequestsWithTarget: |
(void) | + cancelPreviousPerformRequestsWithTarget:selector:object: |
(Class) | + class |
(BOOL) | + conformsToProtocol: |
(void) | + exposeBinding: |
(void) | + initialize |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isBindingExclusive: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + object:performSelector:withObject:afterDelay:inModes: |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
An CPWindow instance represents a window, panel or menu on the screen.
Each window has a style, which determines how the window is decorated; whether it has a border, a title bar, a resize bar, minimise and close buttons.
A window has a frame. This is the frame of the entire window on the screen, including all decorations and borders. The origin of the frame represents its bottom left corner and the frame is expressed in screen coordinates.
A window always contains a content view which is the highest level view available for public (application) use. This view fills the area of the window inside any decoration/border. This is the only part of the window that application programmers are allowed to draw in directly.
You can convert between view coordinates and window base coordinates using the [CPView -convertPoint:fromView:], [CPView -convertPoint:toView:], [CPView -convertRect:fromView:], and [CPView -convertRect:toView:] methods with a nil view argument.
-(void)windowDidResize:(CPNotification)notification; Sent from the notification center when the window has been resized.
notification | contains information about the resize event |
-(CPUndoManager)windowWillReturnUndoManager:(CPWindow)aWindow; Called to obtain the undo manager for a window
aWindow | the window for which to return the undo manager |
-(void)windowDidBecomeMain:(CPNotification)notification; Sent from the notification center when the delegate's window becomes the main window.
notification | contains information about the event |
-(void)windowDidResignMain:(CPNotification)notification; Sent from the notification center when the delegate's window has resigned main window status.
notification | contains information about the event |
-(void)windowDidResignKey:(CPNotification)notification; Sent from the notification center when the delegate's window has resigned key window status.
notification | contains information about the event |
-(BOOL)windowShouldClose:(id)aWindow; Called when the user tries to close the window.
aWindow | the window to close |
YES
allows the window to close. NO
vetoes the close operation and leaves the window open.-(BOOL)windowWillBeginSheet:(CPNotification)notification; Sent from the notification center before sheet is visible on the delegate's window.
notification | contains information about the event |
-(BOOL)windowDidEndSheet:(CPNotification)notification; Sent from the notification center when an attached sheet on the delegate's window has been animated out and is no longer visible.
notification | contains information about the event |
Definition at line 2 of file CPWindow.h.
|
implementation |
Returns YES
if the receiver is able to become the first responder. NO
otherwise.
Reimplemented from CPResponder.
Definition at line 1568 of file CPWindow.j.
|
implementation |
Definition at line 1648 of file CPWindow.j.
|
implementation |
Definition at line 2648 of file CPWindow.j.
|
implementation |
Returns the alpha value of the window.
Definition at line 1229 of file CPWindow.j.
|
implementation |
Definition at line 2889 of file CPWindow.j.
|
implementation |
Definition at line 2715 of file CPWindow.j.
|
implementation |
Returns the window's attached sheet.
Definition at line 3034 of file CPWindow.j.
|
implementation |
Definition at line 3218 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(BridgeSupport).
Definition at line 3538 of file CPWindow.j.
|
implementation |
Reimplemented from CPObject.
Definition at line 435 of file CPWindow.j.
|
implementation |
Returns the window's background color.
Definition at line 1246 of file CPWindow.j.
|
implementation |
Called when the receiver should become the key window. It sends the -becomeKeyWindow
message to the first responder if it responds, and posts CPWindowDidBecomeKeyNotification
.
Definition at line 2004 of file CPWindow.j.
|
implementation |
Called to tell the receiver that it has become the main window.
Definition at line 2473 of file CPWindow.j.
|
implementation |
Reimplemented in CPPanel.
Definition at line 3055 of file CPWindow.j.
|
implementation |
Determines if the window can become the key window.
YES
means the window can become the key window. Reimplemented in CPPanel.
Definition at line 2035 of file CPWindow.j.
|
implementation |
Returns YES
if the window can become the main window.
Reimplemented in CPPanel.
Definition at line 2441 of file CPWindow.j.
|
implementation |
Sets the window location to be the center of the screen
Definition at line 1780 of file CPWindow.j.
|
implementation |
Do NOT modify the array returned by this method!
Definition at line 2643 of file CPWindow.j.
|
implementation |
Closes the window. Posts a CPWindowWillCloseNotification
to the notification center before closing the window.
Definition at line 2394 of file CPWindow.j.
|
implementation |
Return whether platform window (virtual screen) resizes constrain user windows to the usable area.
Definition at line 1125 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(BridgeSupport).
Definition at line 3656 of file CPWindow.j.
|
implementation |
Returns the receiver's content rectangle. A content rectangle does not include toolbars.
aFrame | the window's frame rectangle |
Definition at line 647 of file CPWindow.j.
|
implementation |
Returns the window's current content view.
Definition at line 1212 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(Deprecated).
Definition at line 3697 of file CPWindow.j.
|
implementation |
Converts aPoint from the window coordinate system to the global coordinate system.
Provided by category CPWindow(BridgeSupport).
Definition at line 3546 of file CPWindow.j.
|
implementation |
Converts aPoint from the window coordinate system to the coordinate system of the parent platform window.
Provided by category CPWindow(BridgeSupport).
Definition at line 3562 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(BridgeSupport).
Definition at line 3590 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(Deprecated).
Definition at line 3705 of file CPWindow.j.
|
implementation |
Converts aPoint from the global coordinate system to the window coordinate system.
Provided by category CPWindow(BridgeSupport).
Definition at line 3554 of file CPWindow.j.
|
implementation |
Converts aPoint from the parent platform window coordinate system to the window's coordinate system.
Provided by category CPWindow(BridgeSupport).
Definition at line 3575 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(BridgeSupport).
Definition at line 3585 of file CPWindow.j.
|
implementation |
Returns the default button of the receiver.
Definition at line 3331 of file CPWindow.j.
|
implementation |
Returns the default button of the receiver. NOTE: This method is deprecated. Use defaultButton instead.
Definition at line 3303 of file CPWindow.j.
|
implementation |
Returns window's delegate
Definition at line 1538 of file CPWindow.j.
|
implementation |
Restores a minimized window to it's original size.
Definition at line 2297 of file CPWindow.j.
|
implementation |
Removes the key equivalent for the default button.
Definition at line 3356 of file CPWindow.j.
|
implementation |
Removes the key equivalent for the default button. Note: this method is deprecated. Use disableKeyEquivalentForDefaultButton instead.
Definition at line 3365 of file CPWindow.j.
|
implementation |
The receiver will attempt to perform the command, if it responds to it. If not, the -nextResponder
will be called to do it.
aSelector | the command to attempt |
Reimplemented from CPResponder.
Definition at line 1560 of file CPWindow.j.
|
implementation |
Initiates a drag operation from the receiver to another view that accepts dragged data.
anImage | the image to be dragged |
aLocation | the lower-left corner coordinate of anImage |
mouseOffset | the distance from the -mouseDown : location and the current location |
anEvent | the -mouseDown : that triggered the drag |
aPasteboard | the pasteboard that holds the drag data |
aSourceObject | the drag operation controller |
slideBack | Whether the image should 'slide back' if the drag is rejected |
Definition at line 2111 of file CPWindow.j.
|
implementation |
Initiates a drag operation from the receiver to another view that accepts dragged data.
aView | the view to be dragged |
aLocation | the lower-left corner coordinate of aView |
mouseOffset | the distance from the -mouseDown : location and the current location |
anEvent | the -mouseDown : that triggered the drag |
aPasteboard | the pasteboard that holds the drag data |
aSourceObject | the drag operation controller |
slideBack | Whether the view should 'slide back' if the drag is rejected |
Definition at line 2148 of file CPWindow.j.
|
implementation |
Sets the default button key equivalent to "return".
Definition at line 3339 of file CPWindow.j.
|
implementation |
Sets the default button key equivalent to "return". NOTE: this method is deprecated. Use enableKeyEquivalentForDefaultButton instead.
Definition at line 3348 of file CPWindow.j.
|
implementation |
Returns the window's current first responder.
Definition at line 1643 of file CPWindow.j.
|
implementation |
Returns the window's frame rectangle
Definition at line 665 of file CPWindow.j.
|
implementation |
Retrieves the frame rectangle for this window.
aContentRect | the window's content rectangle |
Definition at line 657 of file CPWindow.j.
|
implementation |
Returns the frame rectangle used by a window. Style masks include:
CPBorderlessWindowMask CPTitledWindowMask CPClosableWindowMask CPMiniaturizableWindowMask (NOTE: only available in NativeHost) CPResizableWindowMask CPTexturedBackgroundWindowMask CPBorderlessBridgeWindowMask CPHUDBackgroundWindowMask
aContentRect | the content rectangle of the window |
aStyleMask | the style mask of the window |
Definition at line 638 of file CPWindow.j.
|
implementation |
Returns the global window resizing style.
Definition at line 1138 of file CPWindow.j.
|
implementation |
Returns YES
if the window has a drop shadow. NO
otherwise.
Definition at line 1344 of file CPWindow.j.
|
implementation |
Definition at line 1658 of file CPWindow.j.
|
implementation |
Initializes the receiver
Reimplemented from CPObject.
Reimplemented in CPColorPanel, and CPSavePanel.
Definition at line 243 of file CPWindow.j.
|
implementation |
Definition at line 1573 of file CPWindow.j.
|
implementation |
Initializes the window. The method also takes a style bit mask made up of any of the following values:
CPBorderlessWindowMask CPTitledWindowMask CPClosableWindowMask CPMiniaturizableWindowMask CPResizableWindowMask CPTexturedBackgroundWindowMask
aContentRect | the size and location of the window in screen space |
aStyleMask | a style mask |
Definition at line 263 of file CPWindow.j.
|
implementation |
Returns YES
if the document has been edited.
Definition at line 2213 of file CPWindow.j.
|
implementation |
Definition at line 2230 of file CPWindow.j.
|
implementation |
Returns YES if the window fills the full browser window, otherwise NO. NOTE: this method has been deprecated in favor of isFullPlatformWindow.
Provided by category CPWindow(Deprecated).
Definition at line 3689 of file CPWindow.j.
|
implementation |
Definition at line 607 of file CPWindow.j.
|
implementation |
Returns YES
if the window is the key window.
Definition at line 2052 of file CPWindow.j.
|
implementation |
Returns YES
if this the main window.
Definition at line 2433 of file CPWindow.j.
|
implementation |
Returns YES if the window is minimized.
Definition at line 2309 of file CPWindow.j.
|
implementation |
Returns YES
if the window can be moved.
Definition at line 1772 of file CPWindow.j.
|
implementation |
Returns YES
if the window can be moved by dragging its background.
Definition at line 1755 of file CPWindow.j.
|
implementation |
Returns YES
if the window has ever run as a sheet.
Definition at line 3045 of file CPWindow.j.
|
implementation |
Returns YES
if the window is visible. It does not mean that the window is not obscured by other windows.
Definition at line 1094 of file CPWindow.j.
|
implementation |
Notifies the receiver that the user has pressed a key.
anEvent | information about the key press |
Reimplemented from CPResponder.
Definition at line 3076 of file CPWindow.j.
|
implementation |
Returns the window's current level
Definition at line 1086 of file CPWindow.j.
|
implementation |
Attempts to make the aResponder
the first responder. Before trying to make it the first responder, the receiver will ask the current first responder to resign its first responder status. If it resigns, it will ask aResponder
accept first responder, then finally tell it to become first responder.
YES
if the attempt was successful. NO
otherwise. Definition at line 1618 of file CPWindow.j.
|
implementation |
Makes the window the key window and brings it to the front of the screen list.
aSender | the object requesting this |
Definition at line 2061 of file CPWindow.j.
|
implementation |
Makes this window the key window.
Definition at line 2072 of file CPWindow.j.
|
implementation |
Makes the receiver the main window.
Definition at line 2454 of file CPWindow.j.
|
implementation |
Returns the window's maximum size.
Definition at line 1336 of file CPWindow.j.
|
implementation |
Minimizes the window. Posts a CPWindowWillMiniaturizeNotification
to the notification center before minimizing the window.
Definition at line 2281 of file CPWindow.j.
|
implementation |
Returns the windows minimum size.
Definition at line 1287 of file CPWindow.j.
|
implementation |
Definition at line 992 of file CPWindow.j.
|
implementation |
Makes the receiver the front most window in the screen ordering.
aSender | the object that requested this |
Reimplemented in CPColorPanel.
Definition at line 914 of file CPWindow.j.
|
implementation |
Hides the window.
the | object that requested this |
Definition at line 1006 of file CPWindow.j.
|
implementation |
Relocates the window in the screen list.
orderingMode | the positioning relative to otherWindowNumber |
otherWindowNumber | the window relative to which the receiver should be placed |
Definition at line 1045 of file CPWindow.j.
|
implementation |
Definition at line 2679 of file CPWindow.j.
|
implementation |
Simulates the user closing the window, then closes the window.
aSender | the object making this request |
Definition at line 2320 of file CPWindow.j.
|
implementation |
Overridden by subclasses to handle a key equivalent.
If the character code or codes in anEvent
match the receiver’s key equivalent, the receiver should respond to the event and return YES
. The default implementation does nothing and returns NO
.
You should extract the characters for a key equivalent using [anEvent charactersIgnoringModifiers].
anEvent | An event object that represents the key equivalent pressed |
YES
if theEvent is a key equivalent that the receiver handled, NO
if it is not a key equivalent that it should handle. Reimplemented from CPResponder.
Definition at line 3069 of file CPWindow.j.
|
implementation |
Simulates the user minimizing the window, then minimizes the window.
aSender | the object making this request |
Definition at line 2271 of file CPWindow.j.
|
implementation |
Definition at line 384 of file CPWindow.j.
|
implementation |
Recalculates the key view loop, based on geometric position. Note that the Cocoa documentation says that this method only marks the loop as dirty, the recalculation is not done until the next or previous key view of the window is requested. In reality, Cocoa does recalculate the loop when this method is called.
Definition at line 3159 of file CPWindow.j.
|
implementation |
Sends the undo manager a -redo
: message.
aSender | the object requesting this |
Provided by category CPWindow(BridgeSupport).
Definition at line 3651 of file CPWindow.j.
|
implementation |
Returns an array of all types the receiver accepts for dragging operations.
Definition at line 2173 of file CPWindow.j.
|
implementation |
Sets the receiver's list of acceptable data types for a dragging operation.
pasteboardTypes | an array of CPPasteboards |
Definition at line 2157 of file CPWindow.j.
|
implementation |
Definition at line 2668 of file CPWindow.j.
|
implementation |
Returns the path to the file the receiver represents
Definition at line 1715 of file CPWindow.j.
|
implementation |
Returns the URL that the receiver represents
Definition at line 1731 of file CPWindow.j.
|
implementation |
Causes the window to resign it's key window status.
Definition at line 2084 of file CPWindow.j.
|
implementation |
Called when the window resigns main window status.
Definition at line 2490 of file CPWindow.j.
|
implementation |
Returns the offset of the window's resize indicator.
Definition at line 1169 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(BridgeSupport).
Definition at line 3496 of file CPWindow.j.
|
implementation |
Definition at line 1736 of file CPWindow.j.
|
implementation |
Definition at line 3267 of file CPWindow.j.
|
implementation |
Definition at line 3278 of file CPWindow.j.
|
implementation |
Definition at line 3223 of file CPWindow.j.
|
implementation |
Definition at line 3245 of file CPWindow.j.
|
implementation |
Dispatches events that are sent to it from CPApplication.
anEvent | the event to be dispatched |
Definition at line 1803 of file CPWindow.j.
|
implementation |
Definition at line 1653 of file CPWindow.j.
|
implementation |
Applies an alpha value to the window.
aValue | the alpha value to apply |
Definition at line 1221 of file CPWindow.j.
|
implementation |
Definition at line 3210 of file CPWindow.j.
|
implementation |
Provided by category CPWindow(BridgeSupport).
Definition at line 3530 of file CPWindow.j.
|
implementation |
Sets the window's background color.
aColor | the new color for the background |
Definition at line 1238 of file CPWindow.j.
|
implementation |
If set to NO, platform window (virtual screen) resizes will not attempt to move/resize user windows. to the usable area.
Definition at line 1117 of file CPWindow.j.
|
implementation |
Sets the window's content view. The new view will be resized to fit inside the content rectangle of the window.
aView | the new content view for the receiver |
Definition at line 1188 of file CPWindow.j.
|
implementation |
Sets the default button for the window. This is equivalent to setting the the key equivalent of the button to "return". Additionally this will turn your button blue (with the Aristo theme).
aButton | - The button that should become default. |
Definition at line 3314 of file CPWindow.j.
|
implementation |
Sets the default button for the window. Note: this method is deprecated use setDefaultButton: instead.
aButton | - The button that should become default. |
Definition at line 3294 of file CPWindow.j.
|
implementation |
Sets the delegate for the window. Passing nil
will just remove the window's current delegate.
aDelegate | an object to respond to the various delegate methods of CPWindow |
Definition at line 1423 of file CPWindow.j.
|
implementation |
Sets whether the document has been edited.
isDocumentEdited | YES if the document has been edited. |
Definition at line 2198 of file CPWindow.j.
|
implementation |
Definition at line 2218 of file CPWindow.j.
|
implementation |
Sets the window's frame rectangle
aFrame | - The CGRect of the windows new frame |
Definition at line 886 of file CPWindow.j.
|
implementation |
Sets the window's frame rect.
aFrame | - The new CGRect of the window. |
shouldDisplay | - YES if the window should call setNeedsDisplay: otherwise NO. |
Definition at line 877 of file CPWindow.j.
|
implementation |
Sets the frame of the window.
aFrame | - A CGRect of the new frame for the receiver. |
shouldDisplay | - YES if the window should call setNeedsDisplay otherwise NO. |
shouldAnimate | - YES if the window should animate to it's new size and position, otherwise NO. |
Definition at line 677 of file CPWindow.j.
|
implementation |
Sets the window's location.
anOrigin | the new location for the window |
Definition at line 895 of file CPWindow.j.
|
implementation |
Sets the window's size.
aSize | the new size for the window |
Definition at line 905 of file CPWindow.j.
|
implementation |
Sets the CPWindow to fill the whole browser window. NOTE: this method has been deprecated in favor of setFullPlatformWindow:
Provided by category CPWindow(Deprecated).
Definition at line 3678 of file CPWindow.j.
|
implementation |
Sets the receiver as a full platform window. If you pass YES the CPWindow instance will fill the entire browser content area, otherwise the CPWindow will be a window inside of your browser window which the user can drag around, and resize (if you allow).
BOOL | - YES if the window should fill the browser window, otherwise NO. |
Definition at line 561 of file CPWindow.j.
|
implementation |
Globally sets whether windows resize following the legacy style (using a resize thumb in the bottom right corner), or the modern style (no resize thumb, resizing can be done on all edges).
Definition at line 1104 of file CPWindow.j.
|
implementation |
Sets whether the window should have a drop shadow.
shouldHaveShadow | YES to have a drop shadow. |
Definition at line 1391 of file CPWindow.j.
|
implementation |
Definition at line 1663 of file CPWindow.j.
|
implementation |
Definition at line 1578 of file CPWindow.j.
|
implementation |
Sets the window's level
the | window's new level |
Definition at line 1069 of file CPWindow.j.
|
implementation |
Sets the window's maximum size. If the provided size is the same as the current maximum size, the method simply returns.
aSize | the new maximum size |
Definition at line 1307 of file CPWindow.j.
|
implementation |
Sets the window's minimum size. If the provided size is the same as the current minimum size, the method simply returns. The height is pinned to the difference in height between the frame rect and content rect, to account for a title bar + toolbar.
aSize | the new minimum size for the window |
Definition at line 1258 of file CPWindow.j.
|
implementation |
Sets whether the window can be moved.
shouldBeMovable | YES makes the window movable. |
Definition at line 1764 of file CPWindow.j.
|
implementation |
Sets whether the window can be moved by dragging its background. The default is based on the window style.
shouldBeMovableByWindowBackground | YES makes the window move from a background drag. |
Definition at line 1747 of file CPWindow.j.
Definition at line 2700 of file CPWindow.j.
|
implementation |
Sets the platform window of the reciver. This method will first close the reciever, change the platform window, then reopen the window (if it was originally open).
Definition at line 394 of file CPWindow.j.
|
implementation |
Sets the path to the file the receiver represents
Definition at line 1706 of file CPWindow.j.
|
implementation |
Sets the URL that the receiver represents
Definition at line 1723 of file CPWindow.j.
|
implementation |
Sets the offset of the window's resize indicator.
aSize | the offset for the resize indicator |
Definition at line 1178 of file CPWindow.j.
|
implementation |
Sets the shadow style of the receiver. Values are:
CPWindowShadowStyleStandard CPWindowShadowStyleMenu CPWindowShadowStylePanel
aStyle | - The new shadow style of the receiver. |
Definition at line 1412 of file CPWindow.j.
|
implementation |
Sets the window's resize indicator.
shouldShowResizeIndicator | YES sets the window to show its resize indicator. |
Definition at line 1155 of file CPWindow.j.
|
implementation |
Sets the window's title bar string
Definition at line 1686 of file CPWindow.j.
|
implementation |
Sets the title bar to represent a file path
Definition at line 1697 of file CPWindow.j.
|
implementation |
Sets the window's toolbar.
aToolbar | the window's new toolbar |
Definition at line 2589 of file CPWindow.j.
|
implementation |
Reimplemented from CPObject.
Definition at line 3370 of file CPWindow.j.
|
implementation |
Sets the window's controller
aWindowController | a window controller |
Definition at line 1547 of file CPWindow.j.
|
implementation |
Returns YES
if the window's resize indicator is showing. NO
otherwise.
Definition at line 1146 of file CPWindow.j.
|
implementation |
Returns the window's style mask.
Definition at line 615 of file CPWindow.j.
|
implementation |
Returns the window's title bar string
Definition at line 1678 of file CPWindow.j.
|
implementation |
Definition at line 2608 of file CPWindow.j.
|
implementation |
Return's the window's toolbar
Definition at line 2580 of file CPWindow.j.
|
implementation |
Sends the undo manager an -undo
: message.
aSender | the object requesting this |
Provided by category CPWindow(BridgeSupport).
Definition at line 3642 of file CPWindow.j.
|
implementation |
Returns the window's undo manager.
Reimplemented from CPResponder.
Provided by category CPWindow(BridgeSupport).
Definition at line 3615 of file CPWindow.j.
|
implementation |
Resets the array of acceptable data types for a dragging operation.
Definition at line 2184 of file CPWindow.j.
|
implementation |
Returns the window's controller.
Definition at line 1555 of file CPWindow.j.
|
implementation |
Returns the window's number in the desktop's screen list
Definition at line 1994 of file CPWindow.j.
|
implementation |
Returns YES
if the receiver is able to receive input events even when a modal session is active.
Reimplemented in CPPanel.
Definition at line 3064 of file CPWindow.j.