home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IOUTLBOX_
- #define _IOUTLBOX_
- /*******************************************************************************
- * FILE NAME: ioutlbox.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * Ioutlbox - This class creates and manages an unfilled 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/IOUTLBOX.HPV $
- //
- // Rev 1.6 25 Oct 1992 17:05:44 nunn
- //changed library name to ICLUI
- //
- // Rev 1.5 25 Oct 1992 10:55:48 boezeman
- //Add documentation and converted file to skeleton.hpp format.
-
- Rev 1.4 13 Oct 1992 21:22:22 tsuji
- Correct comments around log directive.
-
- Rev 1.3 13 Oct 1992 20:57:08 tsuji
- Correct log directive, remove IBM Confidential classification.
-
- Rev 1.2 13 Oct 1992 19:05:58 tsuji
- Remove no-op virtual destructor, add Inherited typedef.
- *******************************************************************************/
- #ifndef _ICONTROL_
- #include <icontrol.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IOutlineBox; /* olbx */
- class IRectangle;
- class ISize;
- class IWindowHandle;
- #ifndef _IBITFLAG_
- #include <ibitflag.hpp>
- #endif
-
- class IOutlineBox : public IControl {
- /*******************************************************************************
- * This class creates and manages an unfilled rectangle control. *
- * *
- * To use this class, create an outline box control window with the current *
- * background, current foreground, or halftone pattern in the current *
- * foreground color, as follows: *
- * IOutlineBox olbx(ID_BKGNDRECT, this, IRectangle(10,10,110,210)); *
- * *
- * IOutlineBox olbx(ID_BKGNDRECT, this, IRectangle(10,10,110,210), *
- * WS_VISIBLE | SS_FGNDFRAME); *
- * *
- * IOutlineBox olbx(ID_BKGNDRECT, this, IRectangle(10,10,110,210), *
- * WS_VISIBLE | SS_HALFTONEFRAME); *
- * *
- * Valid styles for an outline box are: *
- * IOutlineBox::foreground, *
- * IOutlineBox::background, *
- * IOutlineBox::halftone, *
- * IOutlineBox::defStyle, and any of the IWindow styles. *
- * *
- * EXAMPLE: *
- * <sample code> *
- *******************************************************************************/
- typedef IControl
- Inherited;
- public:
- INESTEDBITFLAGCLASSDEF1(Style, IOutlineBox, IWindow);
- // style class definition
- 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 |
- ------------------------------------------------------------------------------*/
- IOutlineBox(unsigned long Id,
- const IWindow* parent,
- const IWindow* owner,
- const IRectangle& initial,
- Style style = defStyle);
-
- IOutlineBox(unsigned long Id,
- const IWindow* parentDialog);
-
- IOutlineBox(IWindowHandle handle);
-
- /*-------------------------------- STYLES --------------------------------------
- | These function provide means of getting and setting the default style |
- | attributes of instances of this class: |
- | defaultStyle - returns the outline box control default style setting |
- | setDefaultStyle - sets the outline box control default style |
- ------------------------------------------------------------------------------*/
- static Style
- defaultStyle();
- static void
- setDefaultStyle(Style style);
-
- /*-------------------------------- FILLTYPE ------------------------------------
- | This function sets how the rectangle is drawn. |
- | setOutlineType - 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 OutlineType { foreground, background, halftone };
- void
- setOutlineType(OutlineType type);
-
- protected:
- /*----------------------------- LAYOUT SIZE ------------------------------------
- | calcMinSize - returns the minimum size that this outline box control should be|
- ------------------------------------------------------------------------------*/
- virtual ISize
- calcMinSize();
-
- static Style
- classDefaultStyle;
-
- private:
- /*--------------------------------- PRIVATE ----------------------------------*/
- IOutlineBox(const IOutlineBox&);
- //IOutlineBox& operator=(const IOutlineBox&);
-
- static const Style
- backgroundFrame,
- foregroundFrame,
- halftoneFrame,
- defaultFrame,
- allFrames;
- }; // class IOutlineBox
-
- INESTEDBITFLAGCLASSFUNCS(Style, IOutlineBox);
- // global style functions
- #endif // _IOUTLBOX_