#import <DownAndOutController.h>
Collaboration diagram for DownAndOutController:

Definition at line 60 of file DownAndOutController.h.
Public Member Functions | |
| (id) | - initAsPreview:forView: |
| Designated initializer. | |
| (int) | - secondsBeforeLogout |
| Getter for the starting value of the countdown clock, in seconds. | |
| (void) | - setSecondsBeforeLogout: |
| Setter for the starting value of the countdown clock, in seconds. | |
| (BOOL) | - shouldMove |
| Whether the screen saver content should move around the screen. | |
| (NSImage *) | - addedImage |
| Getter for the image to be shown in addition to the screen saver content. | |
| (void) | - setAddedImage: |
| Setter for the image to be shown in addition to the dynamic content. | |
| (NSString *) | - messageText |
| Accessor for the message text template. | |
| (NSString *) | - messageTextForSeconds: |
| Message text with % tokens substituted. | |
| (void) | - setMessageText: |
| Setter for the message text template. | |
| (NSPanel *) | - panel |
| Accessor to the configuration panel. | |
| (void) | - quitApplications |
| Perform a gentle (AppleScript) quit on nonexempt applications. | |
| (void) | - killApplications |
| Perform a brute-force (kill-SIGTERM) quit on nonexempt applications. | |
| (NSString *) | - nameOfThisApplication |
| The name of the frontmost application. | |
| (void) | - makeTouchFile |
| Write list of quit and killed applications to a file in /tmp. | |
| (void) | - logOut |
| Log the current user out. | |
IBActions | |
| (IBAction) | - endButton: |
| Action method for the OK and Cancel buttons. | |
| (IBAction) | - stepper: |
| Action method for the time-to-logout stepper arrows. | |
| (IBAction) | - timeText: |
| Action method for the time-till-logout field. | |
| (IBAction) | - moveSelected: |
| Action method for the move-content radio buttons. | |
| (IBAction) | - imageAction: |
| Action method for image well and related buttons (Set and Clear). | |
| (IBAction) | - restoreDefaults: |
| Restores the default configuration by stuffing the panel with the default values. | |
| (IBAction) | - sliderAction: |
| Action method responding to changes in the size-of-content slider. | |
Protected Attributes | |
| DownAndOutView * | view |
| The screen-saver view itself. | |
Configuration Panel | |
| IBOutlet NSButton * | cancelButton |
| Cancel button. | |
| IBOutlet NSButton * | okButton |
| OK button. | |
| IBOutlet NSButton * | revertButton |
| Restore Defaults button. | |
| IBOutlet NSPanel * | panel |
| Configuration panel. | |
| IBOutlet NSTextField * | timeField |
| Time-to-logout field. | |
| IBOutlet NSStepper * | timeStepper |
| Stepper next to Time-to-logout field. | |
| IBOutlet NSMatrix * | movementMatrix |
| Radio buttons, whether to move the content. | |
| IBOutlet NSImageView * | imageWell |
| Image well. | |
| IBOutlet NSButton * | imageSet |
| Set button for image. | |
| IBOutlet NSButton * | imageClear |
| Clear button for image. | |
| IBOutlet NSTextView * | messageField |
| Editor for message text. | |
| IBOutlet NSSlider * | sizeSlider |
| Slider to set size of content. | |
Model. | |
When running the screen saver, the controller loads the model (when to shut down, what to say, how to display) from the preferences and keeps it in its own instance variables. | |
| int | secondsBeforeLogout |
| Countdown, seconds till shutdown. | |
| BOOL | shouldMove |
| Whether the content moves on the screen. | |
| NSImage * | addedImage |
| Image to supplement the content. | |
| NSString * | messageText |
| Template for the content text. | |
|
|
Getter for the image to be shown in addition to the screen saver content.
|
|
|
Action method for the OK and Cancel buttons. Dismisses the configuration panel, and if the sender is the OK button, harvests the UI into the DAPreferences system.
|
|
|
Action method for image well and related buttons (Set and Clear). Surprisingly, none of these results in sending setAddedImage:, which is left till endButton: time. Sets the Clear button according to whether an image is left in the well. Additionally,
|
|
||||||||||||
|
Designated initializer. The DownAndOutView, as the known entry to the screen-saver bundle, will allocate and initialize the DownAndOutController from its initializer. The view will know whether it is being run as a preview.
|
|
|
Perform a brute-force (kill-SIGTERM) quit on nonexempt applications. In practice, only Finder is exempt.
Referenced by DownAndOutView::animateOneFrame. |
|
|
Log the current user out.
This method sends the Apple Event If an error arises from sending the Apple Event, the error dictionary is dumped to the console as a log entry with the prefix "Error Dict =". Referenced by DownAndOutView::animateOneFrame. |
|
|
Write list of quit and killed applications to a file in /tmp. This method runs through the quit-applications and killed-applications lists of DAApplication, writing the names in the format Quit: | Killed: applicationNameone per line to a file at /tmp/userName.DownAndOut, where userName is the UNIX user name of the current user.DownAndOutView sends this message immediately before sending logOut to the controller. Referenced by DownAndOutView::animateOneFrame. |
|
|
Accessor for the message text template.
|
|
|
Message text with % tokens substituted.
The
Referenced by DownAndOutView::fillTextImageWithSeconds:. |
|
|
Action method for the move-content radio buttons. This is a no-op; nothing is done with the state transition. The final state is captured when the OK button is pressed.
|
|
|
The name of the frontmost application.
This seeks the
|
|
|
Accessor to the configuration panel. This is set when the DownAndOut[tm].nib is loaded.
|
|
|
Perform a gentle (AppleScript) quit on nonexempt applications. Executes a quit-without-saving script on every application that is currently running and is not exempt from quitting. In practice, only Finder is exempt.
Referenced by DownAndOutView::animateOneFrame. |
|
|
Restores the default configuration by stuffing the panel with the default values.
|
|
|
Getter for the starting value of the countdown clock, in seconds.
|
|
|
Setter for the image to be shown in addition to the dynamic content. Conforms the image well and the activation of the imageClear UI element.
|
|
|
Setter for the message text template. Updates the message-text field.
|
|
|
Setter for the starting value of the countdown clock, in seconds. The timeField and timeStepper display elements are adjusted to conform.
|
|
|
Whether the screen saver content should move around the screen. Defaults to true, and set by the UI through endButton:, or through the saved preferences.
|
|
|
Action method responding to changes in the size-of-content slider. This is a no-op; the final value is collected from the UI at endButton: time.
|
|
|
Action method for the time-to-logout stepper arrows. Retrieves the integer value of the sender, and performs setSecondsBeforeLogout: to make sure the time-to-logout field is synchronized.
|
|
|
Action method for the time-till-logout field. Parses the contents of the field as decimal seconds, or as minutes and seconds delimited by [ .:]. The stepper is made to conform, and the field is formatted as minutes:seconds.
|
1.4.4