Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsAlertController Class Reference

#import <nsAlertController.h>

List of all members.

Public Member Functions

(IBAction) - hitButton1:
(IBAction) - hitButton2:
(IBAction) - hitButton3:
(void- awakeFromNib
(void- alert:title:text:
(void- alertCheck:title:text:checkMsg:checkValue:
(BOOL- confirm:title:text:
(BOOL- confirmCheck:title:text:checkMsg:checkValue:
(int- confirmEx:title:text:button1:button2:button3:
(int- confirmCheckEx:title:text:button1:button2:button3:checkMsg:checkValue:
(BOOL- confirmStorePassword:
(BOOL- prompt:title:text:promptText:checkMsg:checkValue:doCheck:
(BOOL- promptUserNameAndPassword:title:text:userNameText:passwordText:checkMsg:checkValue:doCheck:
(BOOL- promptPassword:title:text:passwordText:checkMsg:checkValue:doCheck:

Protected Attributes

IBOutlet id alertCheckPanel
IBOutlet id alertCheckPanelCheck
IBOutlet id alertCheckPanelText
IBOutlet id alertPanel
IBOutlet id alertPanelText
IBOutlet id confirmCheckPanel
IBOutlet id confirmCheckPanelCheck
IBOutlet id confirmCheckPanelText
IBOutlet id confirmCheckPanelButton1
IBOutlet id confirmCheckPanelButton2
IBOutlet id confirmCheckPanelButton3
IBOutlet id confirmPanel
IBOutlet id confirmPanelText
IBOutlet id confirmPanelButton1
IBOutlet id confirmPanelButton2
IBOutlet id confirmPanelButton3
IBOutlet id confirmStorePasswordPanel
IBOutlet id promptPanel
IBOutlet id promptPanelCheck
IBOutlet id promptPanelText
IBOutlet id promptPanelInput
IBOutlet id passwordPanel
IBOutlet id passwordPanelCheck
IBOutlet id passwordPanelText
IBOutlet id passwordPanelInput
IBOutlet id postToInsecureFromSecurePanel
IBOutlet id securityMismatchPanel
IBOutlet id expiredCertPanel
IBOutlet id securityUnknownPanel
IBOutlet id usernamePanel
IBOutlet id usernamePanelCheck
IBOutlet id usernamePanelText
IBOutlet id usernamePanelPassword
IBOutlet id usernamePanelUserName
IBOutlet id owner

Detailed Description

Definition at line 40 of file nsAlertController.h.


Member Function Documentation

- (void) alert: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text 

Definition at line 67 of file nsAlertController.mm.

             :(NSWindow*)parent title:(NSString*)title text:(NSString*)text
{
  [alertPanelText setStringValue:text];
  [alertPanel setTitle:title];

  [NSApp runModalForWindow:alertPanel relativeToWindow:parent];
  
  [alertPanel close];
}
- (void) alertCheck: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
checkMsg: (NSString*)  checkMsg
checkValue: (BOOL*)  checkValue 

Definition at line 77 of file nsAlertController.mm.

                  :(NSWindow*)parent title:(NSString*)title text:(NSString*)text checkMsg:(NSString*)checkMsg checkValue:(BOOL*)checkValue
{
  [alertCheckPanelText setStringValue:text];
  [alertCheckPanel setTitle:title];
  int state = (*checkValue ? NSOnState : NSOffState);
  [alertCheckPanelCheck setState:state];
  [alertCheckPanelCheck setTitle:checkMsg];

  [NSApp runModalForWindow:alertCheckPanel relativeToWindow:parent];

  *checkValue = ([alertCheckPanelCheck state] == NSOnState);
  [alertCheckPanel close];
}

Definition at line 62 of file nsAlertController.mm.

Here is the call graph for this function:

- (BOOL) confirm: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text 

Definition at line 91 of file nsAlertController.mm.

               :(NSWindow*)parent title:(NSString*)title text:(NSString*)text
{
  [confirmPanelText setStringValue:text];
  [confirmPanel setTitle:title];

  int result = [NSApp runModalForWindow:confirmPanel relativeToWindow:parent];
  
  [confirmPanel close];

  return (result == kOKButton);
}
- (BOOL) confirmCheck: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
checkMsg: (NSString*)  checkMsg
checkValue: (BOOL*)  checkValue 

Definition at line 103 of file nsAlertController.mm.

                    :(NSWindow*)parent title:(NSString*)title text:(NSString*)text checkMsg:(NSString*)checkMsg checkValue:(BOOL*)checkValue
{
  [confirmCheckPanelText setStringValue:text];
  [confirmCheckPanel setTitle:title];
  int state = (*checkValue ? NSOnState : NSOffState);
  [confirmCheckPanelCheck setState:state];
  [confirmCheckPanelCheck setTitle:checkMsg];

  int result = [NSApp runModalForWindow:confirmCheckPanel relativeToWindow:parent];

  *checkValue = ([confirmCheckPanelCheck state] == NSOnState);
  [confirmCheckPanel close];

  return (result == kOKButton);
}
- (int) confirmCheckEx: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
button1: (NSString*)  btn1
button2: (NSString*)  btn2
button3: (NSString*)  btn3
checkMsg: (NSString*)  checkMsg
checkValue: (BOOL*)  checkValue 

Definition at line 136 of file nsAlertController.mm.

                     :(NSWindow*)parent title:(NSString*)title text:(NSString*)text 
  button1:(NSString*)btn1 button2:(NSString*)btn2 button3:(NSString*)btn3
  checkMsg:(NSString*)checkMsg checkValue:(BOOL*)checkValue
{
  [confirmCheckPanelText setStringValue:text];
  [confirmCheckPanel setTitle:title];
  int state = (*checkValue ? NSOnState : NSOffState);
  [confirmCheckPanelCheck setState:state];
  [confirmCheckPanelCheck setTitle:checkMsg];

  [confirmCheckPanelButton1 setTitle:btn1];
  [confirmCheckPanelButton2 setTitle:btn2];
  [confirmCheckPanelButton3 setTitle:btn3];  
  
  int result = [NSApp runModalForWindow:confirmCheckPanel relativeToWindow:parent];

  *checkValue = ([confirmCheckPanelCheck state] == NSOnState);
  [confirmCheckPanel close];

  return result;
}
- (int) confirmEx: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
button1: (NSString*)  btn1
button2: (NSString*)  btn2
button3: (NSString*)  btn3 

Definition at line 119 of file nsAlertController.mm.

                :(NSWindow*)parent title:(NSString*)title text:(NSString*)text
   button1:(NSString*)btn1 button2:(NSString*)btn2 button3:(NSString*)btn3
{
  [confirmPanelText setStringValue:text];
  [confirmPanel setTitle:title];

  [confirmPanelButton1 setTitle:btn1];
  [confirmPanelButton2 setTitle:btn2];
  [confirmPanelButton3 setTitle:btn3];  

  int result = [NSApp runModalForWindow:confirmPanel relativeToWindow:parent];
  
  [confirmPanel close];

  return result;
}
- (BOOL) confirmStorePassword: (NSWindow*)  parent

Definition at line 158 of file nsAlertController.mm.

                            :(NSWindow*)parent
{
  int result = [NSApp runModalForWindow:confirmStorePasswordPanel relativeToWindow:parent];
  [confirmStorePasswordPanel close];
  return (result == kOKButton);
}
- (IBAction) hitButton1: (id sender

Definition at line 46 of file nsAlertController.mm.

                      :(id)sender
{
  [NSApp stopModalWithCode:kOKButton];
}
- (IBAction) hitButton2: (id sender

Definition at line 51 of file nsAlertController.mm.

                      :(id)sender
{
  [NSApp stopModalWithCode:kCancelButton];
}
- (IBAction) hitButton3: (id sender

Definition at line 56 of file nsAlertController.mm.

                      :(id)sender
{
  [NSApp stopModalWithCode:kOtherButton];
}
- (BOOL) prompt: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
promptText: (NSMutableString*)  promptText
checkMsg: (NSString*)  checkMsg
checkValue: (BOOL*)  checkValue
doCheck: (BOOL doCheck 

Definition at line 165 of file nsAlertController.mm.

              :(NSWindow*)parent title:(NSString*)title text:(NSString*)text promptText:(NSMutableString*)promptText checkMsg:(NSString*)checkMsg checkValue:(BOOL*)checkValue doCheck:(BOOL)doCheck
{
  [promptPanelText setStringValue:text];
  [promptPanel setTitle:title];
  if (doCheck) {
    int state = (*checkValue ? NSOnState : NSOffState);
    [promptPanelCheck setState:state];
    [promptPanelCheck setTransparent:NO];
  }
  else {
    [promptPanelCheck setTransparent:YES];
  }  
  [promptPanelCheck setTitle:checkMsg];
  [promptPanelInput setStringValue:promptText];

  int result = [NSApp runModalForWindow:promptPanel relativeToWindow:parent];

  *checkValue = ([promptPanelCheck state] == NSOnState);

  NSString* value = [promptPanelInput stringValue];
  PRUint32 length = [promptText length];
  if (length) {
    NSRange all;
    all.location = 0;
    all.length = [promptText length];
    [promptText deleteCharactersInRange:all];
  }
  [promptText appendString:value];

  [promptPanel close];

  return (result == kOKButton);    
}
- (BOOL) promptPassword: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
passwordText: (NSMutableString*)  passwordText
checkMsg: (NSString*)  checkMsg
checkValue: (BOOL*)  checkValue
doCheck: (BOOL doCheck 

Definition at line 244 of file nsAlertController.mm.

                      :(NSWindow*)parent title:(NSString*)title text:(NSString*)text passwordText:(NSMutableString*)passwordText checkMsg:(NSString*)checkMsg checkValue:(BOOL*)checkValue doCheck:(BOOL)doCheck
{
  [passwordPanelText setStringValue:text];
  [passwordPanel setTitle:title];
  if (doCheck) {
    int state = (*checkValue ? NSOnState : NSOffState);
    [passwordPanelCheck setState:state];
    [passwordPanelCheck setTransparent:NO];
  }
  else {
    [passwordPanelCheck setTransparent:YES];
  }  
  [passwordPanelCheck setTitle:checkMsg];
  [passwordPanelInput setStringValue:passwordText];

  int result = [NSApp runModalForWindow:passwordPanel relativeToWindow:parent];

  *checkValue = ([passwordPanelCheck state] == NSOnState);

  NSString* value = [passwordPanelInput stringValue];
  PRUint32 length = [passwordText length];
  if (length) {
    NSRange all;
    all.location = 0;
    all.length = [passwordText length];
    [passwordText deleteCharactersInRange:all];
  }
  [passwordText appendString:value];

  [passwordPanel close];

  return (result == kOKButton);    
}
- (BOOL) promptUserNameAndPassword: (NSWindow*)  parent
title: (NSString*)  title
text: (NSString*)  text
userNameText: (NSMutableString*)  userNameText
passwordText: (NSMutableString*)  passwordText
checkMsg: (NSString*)  checkMsg
checkValue: (BOOL*)  checkValue
doCheck: (BOOL doCheck 

Definition at line 199 of file nsAlertController.mm.

                                 :(NSWindow*)parent title:(NSString*)title text:(NSString*)text userNameText:(NSMutableString*)userNameText passwordText:(NSMutableString*)passwordText checkMsg:(NSString*)checkMsg checkValue:(BOOL*)checkValue doCheck:(BOOL)doCheck
{
  [usernamePanelText setStringValue:text];
  [usernamePanel setTitle:title];
  if (doCheck) {
    int state = (*checkValue ? NSOnState : NSOffState);
    [usernamePanelCheck setState:state];
    [usernamePanelCheck setTransparent:NO];
  }
  else {
    [usernamePanelCheck setTransparent:YES];
  }  
  [usernamePanelCheck setTitle:checkMsg];
  [usernamePanelPassword setStringValue:passwordText];
  [usernamePanelUserName setStringValue:userNameText];

  int result = [NSApp runModalForWindow:usernamePanel relativeToWindow:parent];

  *checkValue = ([usernamePanelCheck state] == NSOnState);

  NSString* value = [usernamePanelUserName stringValue];
  PRUint32 length = [userNameText length];
  if (length) {
    NSRange all;
    all.location = 0;
    all.length = [userNameText length];
    [userNameText deleteCharactersInRange:all];
  }
  [userNameText appendString:value];

  value = [usernamePanelPassword stringValue];
  length = [passwordText length];
  if (length) {
    NSRange all;
    all.location = 0;
    all.length = [passwordText length];
    [passwordText deleteCharactersInRange:all];
  }
  [passwordText appendString:value];

  [usernamePanel close];

  return (result == kOKButton);    
}

Member Data Documentation

- (IBOutlet id) alertCheckPanel [protected]

Definition at line 42 of file nsAlertController.h.

- (IBOutlet id) alertCheckPanelCheck [protected]

Definition at line 43 of file nsAlertController.h.

- (IBOutlet id) alertCheckPanelText [protected]

Definition at line 44 of file nsAlertController.h.

- (IBOutlet id) alertPanel [protected]

Definition at line 45 of file nsAlertController.h.

- (IBOutlet id) alertPanelText [protected]

Definition at line 46 of file nsAlertController.h.

- (IBOutlet id) confirmCheckPanel [protected]

Definition at line 47 of file nsAlertController.h.

- (IBOutlet id) confirmCheckPanelButton1 [protected]

Definition at line 50 of file nsAlertController.h.

- (IBOutlet id) confirmCheckPanelButton2 [protected]

Definition at line 51 of file nsAlertController.h.

- (IBOutlet id) confirmCheckPanelButton3 [protected]

Definition at line 52 of file nsAlertController.h.

- (IBOutlet id) confirmCheckPanelCheck [protected]

Definition at line 48 of file nsAlertController.h.

- (IBOutlet id) confirmCheckPanelText [protected]

Definition at line 49 of file nsAlertController.h.

- (IBOutlet id) confirmPanel [protected]

Definition at line 53 of file nsAlertController.h.

- (IBOutlet id) confirmPanelButton1 [protected]

Definition at line 55 of file nsAlertController.h.

- (IBOutlet id) confirmPanelButton2 [protected]

Definition at line 56 of file nsAlertController.h.

- (IBOutlet id) confirmPanelButton3 [protected]

Definition at line 57 of file nsAlertController.h.

- (IBOutlet id) confirmPanelText [protected]

Definition at line 54 of file nsAlertController.h.

- (IBOutlet id) confirmStorePasswordPanel [protected]

Definition at line 58 of file nsAlertController.h.

- (IBOutlet id) expiredCertPanel [protected]

Definition at line 69 of file nsAlertController.h.

- (IBOutlet id) owner [protected]

Definition at line 76 of file nsAlertController.h.

- (IBOutlet id) passwordPanel [protected]

Definition at line 63 of file nsAlertController.h.

- (IBOutlet id) passwordPanelCheck [protected]

Definition at line 64 of file nsAlertController.h.

- (IBOutlet id) passwordPanelInput [protected]

Definition at line 66 of file nsAlertController.h.

- (IBOutlet id) passwordPanelText [protected]

Definition at line 65 of file nsAlertController.h.

- (IBOutlet id) postToInsecureFromSecurePanel [protected]

Definition at line 67 of file nsAlertController.h.

- (IBOutlet id) promptPanel [protected]

Definition at line 59 of file nsAlertController.h.

- (IBOutlet id) promptPanelCheck [protected]

Definition at line 60 of file nsAlertController.h.

- (IBOutlet id) promptPanelInput [protected]

Definition at line 62 of file nsAlertController.h.

- (IBOutlet id) promptPanelText [protected]

Definition at line 61 of file nsAlertController.h.

- (IBOutlet id) securityMismatchPanel [protected]

Definition at line 68 of file nsAlertController.h.

- (IBOutlet id) securityUnknownPanel [protected]

Definition at line 70 of file nsAlertController.h.

- (IBOutlet id) usernamePanel [protected]

Definition at line 71 of file nsAlertController.h.

- (IBOutlet id) usernamePanelCheck [protected]

Definition at line 72 of file nsAlertController.h.

- (IBOutlet id) usernamePanelPassword [protected]

Definition at line 74 of file nsAlertController.h.

- (IBOutlet id) usernamePanelText [protected]

Definition at line 73 of file nsAlertController.h.

- (IBOutlet id) usernamePanelUserName [protected]

Definition at line 75 of file nsAlertController.h.


The documentation for this class was generated from the following files: