home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IFILLBOX_
- #define _IFILLBOX_
- /*******************************************************************************
- * FILE NAME: Ifillbox.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * Ifillbox - This class creates a filled rectangle 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/IFILLBOX.HPV $
- //
- // Rev 1.7 25 Oct 1992 17:05:22 nunn
- //changed library name to ICLUI
- //
- // Rev 1.6 25 Oct 1992 10:54:14 boezeman
- //Add documentation and converted file to skeleton.hpp format.
-
- Rev 1.5 13 Oct 1992 21:22:06 tsuji
- Correct comments around log directive.
-
- Rev 1.4 13 Oct 1992 20:56:50 tsuji
- Correct log directive, remove IBM Confidential classification.
-
- Rev 1.3 13 Oct 1992 19:05:46 tsuji
- Remove no-op virtual destructor, add Inherited typedef.
- *******************************************************************************/
- #ifndef _ICONTROL_
- #include <icontrol.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IFillBox; /* fbx */
- class IRectangle;
- class ISize;
- class IWindowHandle;
- #ifndef _IBITFLAG_
- #include <ibitflag.hpp>
- #endif
-
- class IFillBox : public IControl {
- /*******************************************************************************
- * This class creates a filled rectangle control. *
- * To use this class, create a filled rectangle control window with the current *
- * background, current foreground, or halftone pattern in the current *
- * foreground color, as follows: *
- * IFillBox fbx(ID_BKGNDRECT, this, IRectangle(10,10,110,210)); *
- * *
- * IFillBox fbx(ID_BKGNDRECT, this, IRectangle(10,10,110,210), *
- * WS_VISIBLE | WS_CLIPSIBLINGS | SS_FGNDRECT); *
- * *
- * IFillBox fbx(ID_BKGNDRECT, this, IRectangle(10,10,110,210), *
- * WS_VISIBLE | WS_CLIPSIBLINGS | SS_HALFTONERECT); *
- * *
- * *
- * Valid styles for a fill box control are: *
- * IFillBox::foregroundRect, *
- * IFillBox::backgroundRect, *
- * IFillBox::halftoneRect, *
- * IFillBox::defStyle, and any of the IWindow styles. * *
- * *
- * EXAMPLE: *
- * <sample code> *
- *******************************************************************************/
- typedef IControl
- Inherited;
-
- public:
- INESTEDBITFLAGCLASSDEF1(Style, IFillBox, IWindow);
- // style class definition
- static const Style
- backgroundRect,
- foregroundRect,
- halftoneRect;
- static const Style&
- defStyle;
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There are 3 ways to construct instances of this class: |
- | 1. default |
- | 2. From a Dialog Template |
- | 3. From a Window |
- ------------------------------------------------------------------------------*/
- IFillBox(unsigned long Id,
- const IWindow* parent,
- const IWindow* owner,
- const IRectangle& initial,
- Style style = defStyle);
-
- IFillBox(unsigned long Id,
- const IWindow* parentDialog);
-
- IFillBox(IWindowHandle handle);
-
- /*-------------------------------- STYLES --------------------------------------
- | These function provide means of getting and setting the default style |
- | attributes of instances of this class: |
- | defaultStyle - returns the fillbox control default style setting |
- | setDefaultStyle - sets the fillbox control default style |
- ------------------------------------------------------------------------------*/
- static Style
- defaultStyle();
- static void
- setDefaultStyle(Style style);
-
- /*-------------------------------- FILLTYPE ------------------------------------
- | This function sets how the rectangle is filled. |
- | setFillType - takes one of the following inputs: |
- | foreground - for foreground color |
- | background - for background color (default if function not called) | *
- | halftone - for halftone shading in the foreground color |
- ------------------------------------------------------------------------------*/
- enum FillType { foreground, background, halftone };
- void
- setFillType(FillType type);
-
- protected:
- /*----------------------------- LAYOUT SIZE ------------------------------------
- | calcMinSize - returns the minimum size that this fill box control should be. |
- ------------------------------------------------------------------------------*/
- virtual ISize
- calcMinSize();
-
- static Style
- classDefaultStyle;
-
- private:
- /*--------------------------------- PRIVATE ----------------------------------*/
- IFillBox(const IFillBox&);
- //IFillBox& operator=(const IFillBox&);
-
- static const Style
- defaultRect,
- allRects;
- }; // class IFillBox
-
- INESTEDBITFLAGCLASSFUNCS(Style, IFillBox);
- // global style functions
- #endif /* _IFILLBOX_ */