home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / BuildingBlocks / DialogWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  2.3 KB  |  82 lines  |  [TEXT/KAHL]

  1. #ifndef __DIALOGWINDOW__
  2. #define __DIALOGWINDOW__ 1
  3.  
  4. #ifndef __BLJSTANDARDINCLUDES__
  5. #include "BLJStandardIncludes.h"
  6. #endif
  7.  
  8. //        10 Aug 94    PL        Add SelectWindow and SetItemText capability
  9. //        7 July 94    PL        change to include <Dialogs.h>, rather than self-include
  10. #ifndef __DIALOGS__
  11. #include <Dialogs.h>
  12. #endif
  13.  
  14. /*
  15.     File:        DialogWindow.h
  16.  
  17.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  18.                 All rights reserved.
  19.  
  20.     Part of the AOCE Sample SMSAM Package.  Consult the license
  21.     which came with this software for your specific legal rights.
  22.  
  23. */
  24.  
  25.  
  26.  
  27. class TDialogWindow : public TDirectObject {
  28.  
  29. public:                                    TDialogWindow ( short dialogID, short stringsSTRPoundID  );
  30.         virtual                            ~TDialogWindow ( );
  31.         
  32.         virtual Boolean                    HandleEvent ( EventRecord & event ); // return true if handled event
  33.         
  34.         virtual void                    ShowWindow();
  35.         virtual void                    SelectWindow();
  36.         virtual void                    HideWindow();
  37.         
  38.         virtual void                    SetItemText ( short whichItem, Str255 itemValue );
  39.         virtual void                    SetItemText ( short whichItem, CStr255 itemValue );
  40.  
  41.         virtual void                    SetTextItem ( short whichItem, const CStr255& itemName );
  42.         virtual void                    SetTextItem ( short whichItem, short stringItemID );
  43.  
  44.         virtual void                    GetTextItem ( short whichItem, CStr255& itemValue );
  45.         
  46.         virtual void                    HandleButtonPress ( short whichButton );
  47.         virtual    void                    SetButtonTitle ( short whichButton, Str255 buttonTitle );
  48.  
  49.         virtual void                    DrawUserItem ( short whichItem );
  50.         
  51.         virtual short                    PoseModally ( );
  52.  
  53.         static     Boolean                 HandleAnEvent ( EventRecord& event );
  54.         
  55. protected:
  56.         void                            HandleMouseDown (EventRecord& event, short where )    ;                        
  57.  
  58.         DialogPtr                        fDialogWindow;
  59.         short                            fDialogID;
  60.         Boolean                            fPosedModally;
  61.         short                            fItemWhichDismissedDialog;
  62.         
  63.         short                            fStringsSTRPoundID;
  64.         
  65.         short                            fStringItemsCount;
  66.         short                            fStringItemNumbers[20];
  67.         
  68.         short                            fButtonItemsCount;
  69.         short                            fButtonItemNumbers[20];
  70.         
  71.         short                            fUserItemsCount;
  72.         short                            fUserItemNumbers [ 20 ];
  73.         Rect                            fUserItemRect [ 20 ];
  74. };
  75.  
  76. /***********************************|****************************************/
  77.  
  78. Boolean GetDefaultWindowInformation ( short dialogID, Boolean& visible, Rect & screenRect );
  79. Boolean SetDefaultWindowInformation ( DialogPtr dP, short dialogID  );
  80.  
  81. #endif // __DIALOGWINDOW__
  82.