Delegate the content rect computation to the actual window decoration

view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26942 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2008-10-20 13:28:28 +00:00
parent b078bfc7c9
commit 1b11784194
4 changed files with 51 additions and 29 deletions

View file

@ -32,16 +32,16 @@
@class NSWindow;
// These are implemented as class methods on GSWindowDecorationView
@protocol GSWindowDecorator
- (id) newWindowDecorationViewWithFrame: (NSRect)frame
window: (NSWindow *)window;
- (NSRect) contentRectForFrameRect: (NSRect)aRect
styleMask: (unsigned int)aStyle;
styleMask: (unsigned int)aStyle;
- (NSRect) frameRectForContentRect: (NSRect)aRect
styleMask: (unsigned int)aStyle;
- (float) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (unsigned int)aStyle;
styleMask: (unsigned int)aStyle;
@end
@ -64,6 +64,11 @@ this, either directly, or indirectly (by using the backend).
- (id) initWithFrame: (NSRect)frame window: (NSWindow *)w;
- (NSRect) contentRectForFrameRect: (NSRect)aRect
styleMask: (unsigned int)aStyle;
- (NSRect) frameRectForContentRect: (NSRect)aRect
styleMask: (unsigned int)aStyle;
- (void) setBackgroundColor: (NSColor *)color;
- (void) setContentView: (NSView *)contentView;
- (void) setDocumentEdited: (BOOL)flag;
@ -79,6 +84,13 @@ windowNumber will be 0.
@end
/* Manage window decorations by using the backend functions. This only works
* on backends that can handle window decorations.
*/
@interface GSBackendWindowDecorationView : GSWindowDecorationView
@end
/*
Standard OPENSTEP-ish window decorations.
*/