This is AddEvent.h in view mode; [Download] [Up]
// // AddEvent.h // Copyright (c) 1989, 1990 by Jiro Nakamura // All rights reserved // // Interface definition of the AddEvent class. // // AddEvent -> Derived from Panel // The Class AddEvent handles the AddEvent Panel for Cassandra and is // also the superclass of the EditEvent Class which handles the // EditEvent Panel. Both of these classes interpret the user's interactions // with the panel (as supplied in the .nib file by IB) into an Event // which can be inserted (in the case of AddEvent) into the event queue // using the Event class. // // RCS Information // Original Author: Jiro Nakamura ac6y@vax5.cit.cornell.edu // Revision Number-> $Revision: 2.2 $ // Last Revised-> $Date: 91/11/01 17:23:30 $ // #import <appkit/Panel.h> #import <soundkit/Sound.h> #import "Event.h" #define AM 0 #define PM 1 @interface AddEvent:Panel { // Private Instance Variables Event *ev; // A handle to the Event class Sound *soundfile; // A place to put the sound float oldVolumeLeft, oldVolumeRight; // Previous volume levels // ---------------------------- // IB Outlets (to be linked in later by IB) // ---------------------------- // Other global objects id cassandra; // The Cassandra object (controls // most everything) id global; // The global object (holds the user // preferences and system globals) // ------------------------------------- // Panel Objects (Buttons, forms, etc.) // ------------------------------------- id eventTypeRadioMatrix; id amPmButton; // The am/pm button id dayForm; // Holds the current day id monthForm; // " " " month id yearForm; // " " " year id hourForm; // " " " hour id minuteForm; // " " " minute id wdayTextField; // Displays the day of the week: // Sun, Mon, Tues .... id dateRadioMatrix; // Holds the radio matrix that // controls what the date up/down // buttons control. id testDateTextField; // The little TextField that shows // the user what Cassandra thinks // the date/time really is: // Sun Jan 23, 1990 4:30pm etc.... id durationButton; id durationRadioMatrix; id durationUpButton; id durationDownButton; id durationMinuteForm; id durationHourForm; id anniversaryButton; // Buttons that controls whether // anniversaries are enabled id anniversaryForm; // Holds the intervals of annvs. // i.e. Every xxxx days id anniversaryRadioMatrix; // Controls the interval constant of // annvs. Every 10 days, months, etc. id anniversaryDownButton; // These two buttons let the user id anniversaryUpButton; // control the interval by mouse. // We need to disable them sometimes. id everyTextField; // This text field is right next // to the anniversaryForm and lets // the user verify the interval // constant: Every 10 days, months, id testAnniversaryTextField; // A little TextField that // shows the user what Cassandra // thinks the current anniversary // setting is at. id snoozeButton; id snoozeNoForm; id snoozeIntForm; id snoozeIntUpButton; id snoozeIntDownButton; id snoozeNoUpButton; id snoozeNoDownButton; id snoozeTimesTextField; id snoozeMinutesTextField; id testSnoozeTextField; id alarmSoundRadioMatrix; // The radio matrix that controls // whether we have a sound or not id alarmSoundForm; // The form that holds the sound's // path id setButton; // The set, play, and stop buttons. id playButton; // We need these outlets so we can id stopButton; // disable these buttons at times. id priorityRadioMatrix; // The radio matrix of priorities. // Currently High, Medium, Low. // These get translated to the // appropriate Event priorities // (numerically from 1 - 100) id messageButton; // Show Message? id messageForm; // The form for the actual message } // ---------------- // Instance methods // ---------------- // --------------- // Window controls // --------------- // Method Name: - open: sender // Description: Opens the panel. It first allocates the objects // it needs, sets the default values and then displays // them. - open:sender; // Method Name: - close // Description: Closes the panel. If there had been any changes // made, it asks the user if they really want to close // then panel. If so, it frees the objects it used // and closes the panel. - close; // Method Name: - startOver: sender // Description: This is usually linked to the target of the // Start Over button. It resets all the values // to their defaults and re-displays the screen. - startOver: sender; // Method Name: - resetDefaultValues: sender // Description: Resets all of the present Event's values to their // defaults (as defined by the method itself and // with the global values). - resetDefaultValues:sender; // Method Name: - displayValues: sender // Description: Redraws the panel with the current values of the // current Event. - displayValues:sender; - displayDate: sender; // Update the date forms - dateFinished: sender; // Called by IB. The user has finished // with the date - (struct tm*) getDate: sender; // Read the date off the // date forms, fix user errors // and return the date - updateTestDate : (struct tm *) timeNow; // Update the text field // that gives feed back on the user // actions - selectNextText:sender; // Select the nextText of the sender // Workaround since NeXT didn't // provide an accessor - insertEventAndClose:sender; // Insert the event and close the // panel - insertEvent:sender; // Just insert the event - dateUp: sender; // Move the date/time forms up or - dateDown: sender; // down one (dependent on the // radio matrix setting) - sound: sender; // Sound activated/deactivated - playSound:sender; // Play the sound - stopSound:sender; // Stop playing the sound - setSound:sender; // Set the sound - checkSound:sender; // Check to see if user has valid // sound path - message: sender; // Message enabled/disabled - messageFinished: sender; // User has finished with message - anniversary:sender; // Anniversary enabled/disabled - anniversaryFinished:sender; // User has finished w/ anniversary - anniversaryUp:sender; // Move anniversary up or - anniversaryDown: sender; // down one - snooze:sender; // Snooze enabled/disabled - snoozeFinished: sender; // User has finished w/ snooze - snoozeIntUp: sender; // Move snooze interval up or - snoozeIntDown: sender; // down one - snoozeNoUp: sender; // Move snooze number up or down - snoozeNoDown: sender; // one @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.