home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-03-19 | 3.6 KB | 147 lines | [TEXT/KAHL] |
- /* zMainWindow.cp -- window methods */
- /* Created 01/01/95 12:01 PM by AppMaker */
-
- /* We recommend that you not modify this module and instead modify */
- /* its subclass, MainWindow. The 'z' prefix on this module marks */
- /* a module which is likely to be regenerated by AppMaker after you */
- /* make changes to the user interface. The modules without the 'z' */
- /* prefix will not be regenerated by AppMaker unless you delete them. */
- /* Using a separate subclass to override the AppMaker-generated code */
- /* lets you regenerate code without losing your hand-coded changes. */
-
- #include <Commands.h>
- #include <Constants.h>
- #include <Global.h>
- #include <CBartender.h>
- #include <CDecorator.h>
- #include <CDesktop.h>
- #include <CDirector.h>
- #include <CError.h>
- #include <CSizeBox.h>
- #include <TBUtilities.h>
- #include <CPicture.h>
- #include <CAMStaticText.h>
- #include <CAMBorder.h>
- #include <CScrollPane.h>
- #include <CAMArrayPane.h>
- #include <CAMButton.h>
- #include "CmdCodes.h"
- #include "Add.h"
- #include "Add.h"
- #include "AMReminderData.h"
- #include "zMainWindow.h"
-
- #define MainWindowID 1000 /* resource ID for WIND template */
-
- extern CBartender *gBartender; /* The menu handling object */
- extern CDecorator *gDecorator; /* Window dressing object */
- extern CDesktop *gDesktop; /* The enclosure for all windows */
- extern CError *gError; /* The error handling object */
-
- /*----------*/
- void ZMainWindow::IZMainWindow (CDirector *aSupervisor)
- {
- CView *enclosure;
- CBureaucrat *supervisor;
- CSizeBox *aSizeBox;
-
- IWindow (MainWindowID, FALSE, gDesktop, aSupervisor);
-
- enclosure = this;
- supervisor = this;
-
- itsLogoPict = new CPicture;
- itsLogoPict->IViewRes ('PctP', 1000, enclosure, supervisor);
-
- itsYearLabel = new CAMStaticText;
- itsYearLabel->IViewRes ('AETx', 1001, enclosure, supervisor);
-
- itsRemindersLabelLabel = new CAMStaticText;
- itsRemindersLabelLabel->IViewRes ('AETx', 1002, enclosure, supervisor);
-
- itsRemindersBorder = new CAMBorder;
- itsRemindersBorder->IViewRes ('Bord', 1003, enclosure, supervisor);
- itsRemindersScroller = new CScrollPane;
- itsRemindersScroller->IViewRes ('ScPn', 1004, itsRemindersBorder, supervisor);
- itsReminders = NewReminders ();
- itsReminders->IViewRes ('ATbl', 1005, itsRemindersScroller, supervisor);
- itsRemindersScroller->InstallPanorama (itsReminders);
-
- itsAddButton = new CAMButton;
- itsAddButton->IViewRes ('CtlP', 1006, enclosure, supervisor);
-
- itsEditButton = new CAMButton;
- itsEditButton->IViewRes ('CtlP', 1007, enclosure, supervisor);
-
- itsDeleteButton = new CAMButton;
- itsDeleteButton->IViewRes ('CtlP', 1008, enclosure, supervisor);
-
- itsMainPane = NULL;
- } /* IZMainWindow */
-
- /*----------*/
- // The only purpose of this function is so that you can override it
- // to create the list as your subclass of CAMArrayPane
-
- CAMArrayPane *ZMainWindow::NewReminders (void)
- {
- CAMArrayPane *theList;
-
- theList = new CAMArrayPane;
-
- return (theList);
-
- } /* NewReminders */
-
- /*----------*/
- void ZMainWindow::UpdateMenus (void)
- {
- inherited::UpdateMenus ();
-
- gBartender->EnableCmd (cmdAddReminder);
- gBartender->EnableCmd (cmdEditReminder);
- gBartender->EnableCmd (cmdDeleteReminder);
-
- } /* UpdateMenus */
-
- /*----------*/
- void ZMainWindow::DoCommand (long theCommand)
- {
- switch (theCommand) {
-
- case cmdAddReminder:
- DoAddReminder ();
- break;
-
- case cmdEditReminder:
- DoEditReminder ();
- break;
-
- case cmdDeleteReminder:
- DoDeleteReminder ();
- break;
-
- default:
- inherited::DoCommand (theCommand);
- break;
- } /* switch */
-
- } /* DoCommand */
-
- //----------
- void ZMainWindow::DoAddReminder ()
- {
- }
-
- //----------
- void ZMainWindow::DoEditReminder ()
- {
- }
-
- //----------
- void ZMainWindow::DoDeleteReminder ()
- {
- }
-
- /* zMainWindow.cp */
-