home *** CD-ROM | disk | FTP | other *** search
- /****
- * CNDImage.h
- *
- * Copyright © 1992 NeoLogic Systems. All rights reserved.
- *
- ****/
-
- #pragma once /* Include this file only once */
-
- #include CNeoBlobH
- #include CNeoSelectH
-
- class CNDImage;
- class CNDCamera;
-
- enum {
- typeNeoImage = 'Nimg'
- };
-
- #define cImage 'imag'
- #define kNDImageID 21
- #define kKeywords 10 /* max number of comma delimited keys in 'keywords' box */
-
- typedef enum filmT {
- eTriX,
- ePanX,
- eUnknown
- } filmT;
-
- class CNeoKeywordSelect;
-
- typedef char keyArray[kKeywords][33];
- typedef keyArray * keyArrayPtr;
-
- class CNDImage : public CNeoBlob {
- public:
- /** Instance Methods **/
- CNDImage(void);
- virtual long getLength(void) const;
- virtual long getFileLength(void) const;
- virtual OSErr getValue(const NeoTag aName, const NeoTag aType, void *aValue);
-
- /** I/O Methods **/
- virtual void readObject(CNeoStream *aStream, const NeoTag aTag);
- virtual void writeObject(CNeoStream *aStream, const NeoTag aTag);
-
- /** Rendering Methods **/
- virtual void draw(Rect *aRect);
-
- /** Search Methods **/
- static CNDImage * FindByName(CNeoDatabase *aFile, const NeoID aClassID, const CNeoString &aName, const Boolean aDeeply, NeoTestFunc1 aFunc = nil, void *aParam = nil, const NeoLockType aLock = kNeoDefaultLock);
- CNDCamera * getCamera(void);
- static void * GetImageID(CNeoNode *aNode, const short aIndex, const NeoLockType aLock, void *aParam);
-
- /** Keyword Methods **/
- static CNeoKeywordSelect *
- GetKeywordKey(char *aKey);
- void buildKeyWordStr(char *str); /* construct single string from keywords array */
- void parseKeywords(char *str); /* get comma delimited strings into array */
-
- /** Instance Variables **/
- short fKeyCount; /* number of actual keys in fKeys */
- short fExposure;
- short fFilm;
- short fFocal;
- short fFStop;
- NeoID fCamera;
- keyArray fKeys; /* holds strings from comma delimited text in 'keywords' box */
- CNeoString fName;
- CNeoString fBy;
- CNeoString fDate;
- CNeoString fCatalog;
- };
-
- const long kNDImageFileLength = kNeoBlobFileLength + 600;
-
- const long kNDImageLength = sizeof(CNDImage);
-
- #define pImageExposure 'IMex'
- #define pImageFilm 'IMfl'
- #define pImageFocal 'IMfc'
- #define pImageFStop 'IMfs'
- #define pImageCamera 'IMcm'
- #define pImageKeyCount 'IMkc'
- #define pImageKeys 'IMky'
- #define pImageBy 'IMby'
- #define pImageDate 'IMdt'
- #define pImageCatalog 'IMcg'
-
- class CNeoKeywordSelect : public CNeoTypeSelect {
- public:
- /** Instance Methods **/
- CNeoKeywordSelect(const char *aKeyword);
-
- NeoOrder compare(CNeoPersist *aObject, const short aIndex, NeoOrder *aKeyOrder) const;
-
- /** Accessing Methods **/
- void getKeyword(char *aKeyword) const;
- void setKeyword(const char *aKeyword);
-
- /** Instance Variables **/
- protected:
- char fValue[33];
- };
-