home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright © 1991-1995 by TopSoft Inc. All rights reserved.
-
- You may distribute this file under the terms of the TopSoft
- Artistic License, accompanying this package.
-
- This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
- See the Modification History for more details.
-
- Product
- About Box
-
- FILE
- ABSlide.h
-
- NAME
- ABSlide.h, part of the ABox project source code,
- responsible for handling the AboutBox resource (element) class stuff.
-
- DESCRIPTION
- This file contains defines for the about box modules.
-
- DEVELOPED BY
- George (ty) Tempel netromancr@aol.com
- All code in this file, and its associated header file was
- Created by George (ty) Tempel in connection with the TopSoft, Inc.
- "FilterTop" application development, except where noted.
-
- CARETAKER - George (ty) Tempel <netromancr@aol.com>
- Please consult this person for any changes or suggestions to this file.
-
- MODIFICATION HISTORY
-
- dd mmm yy - xxx - patchxx: description of patch
- 9 June 94 - ty - Initial Version Created
- 20-july-94 - ty - initial version released
- 23-may-95 - ty - changes for compatibility with the CodeWarrior CW6
- release and the associated Universal Headers from Apple:
- most methods that returned references now have "Ref" at
- the end of their methods names to prevent possible collisions
- with datatypes and classes of the same name (older versions
- of the compiler didn't have a problem with this).
-
- */
-
- /*===========================================================================*/
-
- /*========== Exclusion Macros ============*/
-
- #pragma once
-
- #ifndef _ABSlide_
- #define _ABSlide_
-
-
- /*============ Header Files ==============*/
-
- #include "ABLinkedList.h"
- #include "ABResource.h"
- #include "ABUFonts.h"
-
-
- /*=========== External Linkage ===========*/
-
- /*================ Macros ================*/
-
- /*============== Constants ===============*/
-
- #define kABSlideMaximumElements (5)
-
-
- #define kABSlideNumber 'Snum'
- #define kABSlideNumberSize (sizeof(short))
-
- #define kABSlideIndex 'Sidx'
- #define kABSlideIndexSize (sizeof(ABIndex))
-
- #define kABSlideNumberOfElements 'Snel'
- #define kABSlideNumberOfElementsSize (sizeof(ABListCount))
-
-
- /*================ Enums =================*/
-
- // SlideElementPositions is used by ResizeFields() to adjust
- // where the various slide elements are positioned within the slide
- // area. The names refer primarily to the relationship between
- // a PICT and a TEXT resource, since they occupy the greatest
- // amount of real estate within the slide.
- typedef enum {
- leftOrRight = 1,
- aboveOrBelow = 2
- } SlideElementPositions;
-
-
- /*=============== Structs ================*/
-
- /*=============== Typedefs ===============*/
-
- /*=========== Class Definitions ==========*/
-
- #define kABSlideSuperProperties ABObject
- class ABSlide : public ABLink, public ABObject
- {
- friend class ABLinkedList;
-
- public:
- ABSlide(void);
- virtual ~ABSlide(void);
-
- virtual OSErr GetProperty (ABProperty prop, void *ptr, long *ptrSize);
- virtual OSErr SetProperty (ABProperty prop, void *ptr, long ptrSize);
-
- virtual OSErr Draw(WindowPtr window);
- virtual OSErr Update(WindowPtr window);
- virtual Boolean Event(EventRecord *event);
- virtual OSErr Stop(void);
-
- virtual ABResource *GetResourceOfType(ResType type);
-
- virtual OSErr Resize (Rect const *field);
-
- virtual OSErr InitializeObject(void);
-
- virtual OSErr AddResource(ABResource *object);
- virtual OSErr DropResource(ABResource *object);
-
- protected:
-
- virtual OSErr ForEach (ABMessage message, void *data);
-
- Boolean HasResources(void) const { return this->Resources() != NULL; }
- Boolean DoesntHaveResources(void) const { return !this->HasResources(); }
-
- short GetSlideNumber(void) const { return this->SlideNumber(); }
-
- Boolean IsInitialized(void) const { return this->Initialized() == true; }
- Boolean IsNotInitialized(void) const { return ! this->IsInitialized(); }
- Boolean IsntInitialized(void) const { return this->IsNotInitialized(); }
-
-
- private:
- ABLinkedList* mResources;
- short mSlideNumber;
- Boolean mInitialized;
-
- ABLinkedList*& Resources(void) const { return this->mResources; }
- short& SlideNumber(void) const { return this->mSlideNumber; }
- Boolean& Initialized(void) const { return this->mInitialized; }
-
- void ResetResources(void);
-
- };
-
-
-
-
- /*========== Function Prototypes =========*/
-
-
-
-
- #endif // _ABSlide_
-
-