Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

  1. /**********************************************************************
  2. * FontList.h -- Manages a list of FontID objects via an array of
  3. * FontVector objects.
  4. *
  5. **********************************************************************/
  6. #if !defined(__FONTLIST_H__)
  7. #define __FONTLIST_H__
  8. #include "fontvect.h"
  9. class CFontClass;
  10. const int kDefaultVectSize = 50; // Number of fonts in each CFontArray
  11. class CFontList {
  12. public:
  13. CFontList( int iSize, int iVectorSize = kDefaultVectSize );
  14. ~CFontList();
  15. int bInit();
  16. CFontList *Clone(void);
  17. //
  18. // The real array functions.
  19. //
  20. int iCount( void );
  21. int bAdd( CFontClass * t );
  22. CFontClass * poObjectAt( int idx );
  23. CFontClass * poDetach( int idx );
  24. CFontClass * poDetach( CFontClass * t );
  25. void vDetachAll( );
  26. int bDelete( int idx );
  27. int bDelete( CFontClass * t );
  28. void vDeleteAll( );
  29. int iFind( CFontClass * t );
  30. void ReleaseAll(void);
  31. void AddRefAll(void);
  32. private:
  33. CFontVector ** m_pData;
  34. int m_iCount; // Number of Fonts
  35. int m_iVectorCount; // Number of vectors allocated
  36. int m_iVectorBounds; // Total number of vector points
  37. int m_iVectorSize; // Number of fonts in each vector
  38. };
  39. /**********************************************************************
  40. * Some things you can do with a font list.
  41. */
  42. HDROP hDropFromList( CFontList * poList );
  43. #endif // __FONTLIST_H__