* NSWindow.h change window style enum to match WindowMaker's definition.

* GNUAlertPanel.m NSGetAlertPanel() replace centering code with call to
	center method, change window style mask, add class initialize.
	* libgnustep-gui.m rename to Functions.m.
	* Functions.m add new file as location for generic NS* and GS* functions,
	move backend NSEventMaskFromType() into it.
	* NSApplication.m discardEventsMatchingMask:.. rewrite (fix bugs),
	runModalSession: dump all events not for modal window (fixes modal panel
	button display bug), arrangeInFront: preliminary implemenation.
	* NSCell.m: Polish.
	* NSWindow.m: center remove display invocation per 4.2 docs.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3426 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
far 1998-12-10 18:07:24 +00:00
parent 520320cf92
commit d1b08f9835
8 changed files with 225 additions and 219 deletions

View file

@ -420,11 +420,11 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- (void)center
{
NSSize screenSize = [[NSScreen mainScreen] frame].size;
NSRect n = frame; // center the window
NSPoint origin = frame.origin; // center the window
// within it's screen
n.origin.x = (screenSize.width - frame.size.width) / 2;
n.origin.y = (screenSize.height - frame.size.height) / 2;
[self setFrame:n display:YES];
origin.x = (screenSize.width - frame.size.width) / 2;
origin.y = (screenSize.height - frame.size.height) / 2;
[self setFrameOrigin:origin];
}
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:screen