/* This file is part of Waiho (http://info.xdev.org/projets/waiho) Copyright (C) 2001-2002 Nicolas Roard (nicolas@roard.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #import "parameters.h" @implementation ParametersWindow - (void) dealloc { } - (void) layoutWindow { //NSRect rect = NSMakeRect (300,300,300,120); unsigned int styleMask = NSTitledWindowMask;// | NSMiniaturizableWindowMask; serverName = [[NSTextView alloc] initWithFrame: NSMakeRect (5,85,100,20)]; loginName = [[NSTextView alloc] initWithFrame: NSMakeRect (5,60,100,20)]; passwordName = [[NSTextView alloc] initWithFrame: NSMakeRect (5,35,100,20)]; go = [[NSButton alloc] initWithFrame: NSMakeRect (200, 5, 50, 20)]; cancel = [[NSButton alloc] initWithFrame: NSMakeRect (130, 5, 50, 20)]; //server = [[NSTextField alloc] initWithFrame: NSMakeRect (85,85,200,20)]; server = [[NSComboBox alloc] initWithFrame: NSMakeRect (85,85,200,20)]; login = [[NSTextField alloc] initWithFrame: NSMakeRect (85,60,200,20)]; password = [[NSSecureTextField alloc] initWithFrame: NSMakeRect (85,35,200,20)]; [[password cell]setEchosBullets: YES]; [go setKeyEquivalent: @"\r"]; [serverName setString: @"Server : "]; [serverName setEditable: NO]; [serverName setDrawsBackground: NO]; [loginName setString: @"Login : "]; [loginName setEditable: NO]; [loginName setDrawsBackground: NO]; [passwordName setString: @"Password : "]; [passwordName setEditable: NO]; [passwordName setDrawsBackground: NO]; [go setTitle: @"Go!"]; [cancel setTitle: @"Cancel"]; [self setTitle: @"Connection Parameters"]; [[self contentView] addSubview: server]; [[self contentView] addSubview: serverName]; [[self contentView] addSubview: login]; [[self contentView] addSubview: loginName]; [[self contentView] addSubview: password]; [[self contentView] addSubview: passwordName]; [[self contentView] addSubview: go]; [[self contentView] addSubview: cancel]; } - (NSString*) getlogin { return [login stringValue]; } - (NSString*) getpassword { return [password stringValue]; } - (NSString*) getserver { return [server stringValue]; } //- (NSTextField*) server - (NSComboBox*) server { return server; } - (NSTextField*) login { return login; } - (NSTextField*) password { return password; } - (NSButton*) go { return go; } - (NSButton*) cancel { return cancel; } @end