home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-27 | 1.9 KB | 59 lines | [TEXT/MMCC] |
- // ===========================================================================
- // CCustomListBox.h ©1994 Jan Bruyndonckx All rights reserved.
- // v1.0 18/6/94
- //
- // A listbox subclass containing custom data.
- // The default listbox contains only string data.
- // ===========================================================================
-
- #pragma once
-
- #include <LListBox.h>
-
- //----------------------------------------------------------------------------
-
- class CCustomListBox : public LListBox {
-
- public:
- enum {
- classID = 'clst'
- } ;
-
- static CCustomListBox* CreateFromStream(LStream *inStream);
-
- CCustomListBox() ;
- CCustomListBox(const SPaneInfo &inPaneInfo,
- Boolean inHasHorizScroll, Boolean inHasVertScroll,
- Boolean inHasGrow, Boolean inHasFocusBox,
- MessageT inDoubleClickMessage, Int16 inTextTraitsID,
- LCommander *inSuper);
- CCustomListBox(const CCustomListBox &inOriginal) ;
- CCustomListBox(LStream *inStream);
-
- virtual void *GetSelection (void *outDescriptor, short *outDescLen) const;
- virtual void SetSelection (const void *inDescriptor, const short inDescLen);
-
- virtual void *GetCellPtr (const Cell cell, short *dataLen = NULL) ;
-
- virtual void PrintPanelSelf(const PanelSpec &inPanel);
-
- protected:
- virtual void DrawElement (const short lMessage, const Boolean lSelect, const Rect *lRect,
- const void *lElement, const short lDataLen) ;
- virtual void DrawElementSelf (const Rect *lRect, const void *lElement, const short lDataLen) ;
-
- private:
-
- void init (void) ;
- friend pascal static void LDefProc (short lMessage, Boolean lSelect, Rect *lRect,
- Cell lCell, unsigned short lDataOffset, unsigned short lDataLen, ListHandle lHandle) ;
-
-
- enum {
- callerLDEFResID = 1100 // LDEF stub resource ID
- } ;
- static ListDefUPP callerLDEFUPP ;
- } ;
-
- //----------------------------------------------------------------------------
-