home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dho.zip / DHO / SRC / NOTEBK.H < prev    next >
C/C++ Source or Header  |  1995-08-27  |  2KB  |  75 lines

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: notebk.h 1.3 1995/08/13 03:21:12 teb Exp $ */
  8.  
  9.  
  10. #ifndef __NOTEBK_H__
  11. #define __NOTEBK_H__
  12.  
  13. #include<window.h>
  14.  
  15. enum binding {solid, spiral};
  16. enum tabStyle {tabMajor, tabMinor, tabNone};
  17. enum tabShape {tabSquare, tabRound, tabPoly};
  18. enum tabAlign {tabLeft, tabRight, tabCenter};
  19. enum bindSide {bnd_top, bnd_bottom, bnd_left, bnd_right};
  20.  
  21. struct NotebookAttrs
  22. {
  23.    binding fBindingStyle;
  24.    bindSide fBindingSide;
  25.    tabShape fTabShape;   
  26. };
  27.  
  28. class TNotebook: public TWindow
  29. {
  30.    protected:
  31.       int fNumPages;
  32.       ULONG *fPageIDs;
  33.       LONG fX, fY, fWidth, fHeight;
  34.       ULONG fId;
  35.       TWinBase *fParent;
  36.  
  37.       ULONG setStyleULONG();
  38.  
  39.    public:
  40.       NotebookAttrs fNBKattrs;             
  41.  
  42.       TNotebook(ULONG id, TWinBase *parent);
  43.       TNotebook(ULONG id, TWinBase *parent, binding bnd);
  44.       TNotebook( ULONG id, TWinBase *parent, binding bnd, LONG x, LONG y,
  45.                             LONG width, LONG height);
  46.       ~TNotebook();
  47.       virtual BOOL init();
  48.  
  49.       ULONG insertPageFirst(TWindow *page);
  50.       ULONG insertPageFirst(TWindow *page, char *sline);
  51.       ULONG insertPageFirst(TWindow *page, tabStyle tstyle, char *tabText);
  52.       ULONG insertPageFirst(TWindow *page, char *slineText,
  53.                             tabStyle tstyle, char *tabText);
  54.  
  55.       ULONG insertPageLast(TWindow *page);
  56.       ULONG insertPageLast(TWindow *page, char *sline);
  57.       ULONG insertPageLast(TWindow *page, tabStyle tstyle, char *tabText);
  58.       ULONG insertPageLast(TWindow *page, char *slineText,
  59.                            tabStyle tstyle, char *tabText);
  60.  
  61.       void deletePage(ULONG pageid);
  62.       void deleteFirstPage();
  63.       void deleteLastPage();
  64.       void setStatusLineText(ULONG pageId, char *slineText);
  65.       void setTabText(ULONG pageId, char *tabText);
  66.       void setTabBitmap(ULONG pageId, HBITMAP hbm);
  67.       void associateWindow(ULONG pageId, TWindow *win);
  68.       void associateDlog(ULONG pageId, ULONG dlogRes);
  69.       void setMajorTabSize(ULONG x, ULONG y);
  70.       void setMinorTabSize(ULONG x, ULONG y);
  71.       
  72. };
  73. #endif
  74.  
  75.