home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IPAGE_
- #define _IPAGE_
- /*******************************************************************************
- * FILE NAME: i3statbx.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * Ipage - This class creates and manages the pages of a notebook control. *
- * *
- * COPYRIGHT: *
- * Licensed Materials - Property of IBM *
- * (C) Copyright IBM Corporation 1992, 1993 *
- * All Rights Reserved *
- * US Government Users Restricted Rights - Use, duplication, or disclosure *
- * restricted by GSA ADP Schedule Contract with IBM Corp. *
- * *
- * $Log: R:/IBMCLASS/IBASECTL/VCS/IPAGE.HPV $
- //
- // Rev 1.4 25 Oct 1992 17:05:48 nunn
- //changed library name to ICLUI
- //
- // Rev 1.3 25 Oct 1992 10:56:00 boezeman
- //Add documentation and converted file to skeleton.hpp format.
-
- Rev 1.4 26 Feb 1992 21:17:36 Ken Fichthorn
- Made iNoteBook a friend class.
-
- Rev 1.3 26 Feb 1992 21:17:36 Ken Fichthorn
- Made setPageId method private.
-
- Rev 1.2 30 Oct 1991 20:55:52 Ken Fichthorn
- Palo Alto design changes
-
- Rev 1.1 11 Jul 1991 19:02:08 Mike K. Chan
- Original entry.
- *******************************************************************************/
- // Forward declarations for other classes:
- class IPage;
- class INoteBook;
- class IResourceId;
- class IWindow;
- class IString;
- class IBitmapHandle;
-
-
- #include "ibasetyp.hpp"
- #include "ibitflag.hpp"
-
- //const unsigned long IC_DEFAULTPAGESTYLE = BKA_AUTOPAGESIZE | BKA_STATUSTEXTON;
-
- class IPage {
- /*******************************************************************************
- * This class creates and manages the pages of a notebook control. *
- * *
- * EXAMPLE: *
- * #include <inotebk.hpp> *
- * #include <ipage.hpp> *
- * *
- * INoteBook *pnbkMyBook; *
- * pnbkMyBook = new INoteBook(ID_MYBOOK, this, *
- * IRectangle(IPoint(50,15), *
- * ISize(425,225))); *
- * pnbkMyBook->setMajorTabSize(ISize(50,23)); *
- * pnbkMyBook->setMinorTabSize(ISize(90,45)); *
- * ppageMyPage = new IPage(pnbkMyBook, *
- * BKA_MAJOR | IC_DEFAULTPAGESTYLE); *
- * ppageMyPage->setTabText( (CHAR *)"My Tab Text" ); *
- * sprintf(msgstr, (CHAR *)"Status text for page %d", lCount); *
- * ppageMyPage->setStatusText( msgstr ); *
- * ppageMyPage->setPageWindow( pviewwinMyWindow); *
- *******************************************************************************/
- friend class INoteBook;
-
- public:
- INESTEDBITFLAGCLASSDEF0(Style, IPage);
- INESTEDBITFLAGCLASSDEF0(Position, IPage);
- // style class definition
- static const Style
- autoPageSize,
- statusTextOn,
- majorTab,
- minorTab;
- static const Position
- firstPage,
- lastPage,
- prevPage,
- nextPage;
- static const Style&
- defaultStyle;
-
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is 1 way to construct instances of this class: |
- | 1. default |
- ------------------------------------------------------------------------------*/
- IPage( INoteBook* pnbkNoteBook,
- Style pgs = defaultStyle,
- Position pgpos = lastPage,
- IPage* ppgLocatePage = 0);
-
- /*-------------------------------- ASSOCIATION OPERATIONS ----------------------
- | setPageWindow - Associates a standard view window with this page of the |
- | notebook. This must be used before this page of the |
- | notebook is brought to the top of the notebook |
- | pageWindow - Returns the window associated with this page of the |
- | notebook. |
- ------------------------------------------------------------------------------*/
- void
- setPageWindow ( IWindow* ppgwnd);
- IWindow*
- pageWindow ();
-
- /*-------------------------------- STATUS TEXT OPERATIONS ----------------------
- | setStatusText - Sets the status line text for this page. |
- | statusText - Returns the current status text for this page. |
- ------------------------------------------------------------------------------*/
- void
- setStatusText( char* pszStatusText);
- IString
- statusText();
-
- /*-------------------------------- TAB TEXT OPERATIONS -------------------------
- | setTabText - Sets the tab text for this page. |
- | tabText - Returns the current tab text for this page. |
- ------------------------------------------------------------------------------*/
- void
- setTabText( char* pszTabText);
- IString
- tabText();
-
- /*-------------------------------- TAB BITMAP OPERATIONS -----------------------
- | setTabBitmap - Sets a bitmap on the tab for this page. |
- | tabBitmap - Returns the current tab bitmap for this page. |
- ------------------------------------------------------------------------------*/
- void
- setTabBitmap(IBitmapHandle hbm),
- setTabBitmap( IResourceId& resid);
- IBitmapHandle
- tabBitmap() const;
-
- /*-------------------------------- PAGEID OPERATION ----------------------------
- | pageId - Returns the identifier used by the notebook control to identify |
- | each of its pages. |
- ------------------------------------------------------------------------------*/
- unsigned long
- pageId() const {return ulClPageId;};
-
- protected:
- static Style
- classDefaultStyle;
-
- INoteBook*
- pnbkClNoteBook; // notebook this page belongs in
- unsigned long
- ulClPageId; // PageId (set by the notebook)
- IWindow*
- pwndCl;
-
- /*-------------------------------- PAGE OPERATIONS -----------------------------
- | pageStyle - Returns the style of the page. |
- | setPageId - Sets the identifier used by the notebook control to |
- | identify each of its pages. |
- | statusTextLen - Returns the length of the status text for this page. |
- | tabTextLen - Returns the length of the tab text, if any, for this page. |
- ------------------------------------------------------------------------------*/
- unsigned long
- ulClPageStyles;
- unsigned long
- pageStyle () const { return ulClPageStyles;}
- void
- setPageId( unsigned long ulPageIdIn) {ulClPageId = ulPageIdIn;};
- unsigned long
- statusTextLen() const,
- tabTextLen() const;
- };
-
- #endif /* _IPAGE_ */