home *** CD-ROM | disk | FTP | other *** search
- #ifndef _ICONTROL_
- #define _ICONTROL_
- /*******************************************************************************
- * FILE NAME: Icontrol.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * Icontrol - This is the abstract pure virtual base class for all control *
- * view windows. *
- * *
- * 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/ICONTROL.HPV $
- //
- // Rev 1.5 25 Oct 1992 17:05:14 nunn
- //changed library name to ICLUI
- //
- // Rev 1.4 25 Oct 1992 10:53:14 boezeman
- //Add documentation and converted file to skeleton.hpp format.
-
- Rev 1.1 12 Aug 1992 21:22:06 KKL
- For IBMCPP.
- *******************************************************************************/
- #ifndef _IWINDOW_
- #include <iwindow.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IControl;
- class IFontMgr;
- #ifndef _IHANDLE_
- #include <ihandle.hpp>
- #endif
- #ifndef _IPOINT_
- #include <ipoint.hpp>
- #endif
-
- class IControl : public IWindow {
- /*******************************************************************************
- * This is the abstract pure virtual base class for control *
- * view windows. *
- * EXAMPLE: *
- * <sample code> *
- *******************************************************************************/
- typedef IControl
- Inherited;
-
- public:
- INESTEDBITFLAGCLASSDEF1(Style, IControl, IWindow);
- static const Style
- group,
- tabstop;
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is 1 way to construct instances of this class: |
- | 1. default |
- ------------------------------------------------------------------------------*/
- IControl();
- //IControl(IWindowHandle wndh);
- virtual
- ~IControl() {;}
-
-
- /*----------------------------- LAYOUT SIZE ------------------------------------
- | This operation returns the minimum size for the check box control. |
- | calcMinSize - Virtual function returning the minimun allowable size of |
- | the window, used by canvas layout routined. Default |
- | operation returns the minimun size set by users. Typically, |
- | this should calculate the minimun size based on text and |
- | current font setting. |
- | setMinSize - Set the minimun allowable size of the window. In the library |
- | this only apply to window on a canvas. |
- | minSize - Returns the minimun allowable size set by the user's class |
- ------------------------------------------------------------------------------*/
- virtual ISize
- calcMinSize();
- void
- setMinSize(const ISize& sizMin);
- const ISize&
- minSize() const;
-
- //virtual void setFont(IFontMgr& fm);
-
- //void clearBackground();
- //void clearBackground(const IRectangle& rect);
-
- private:
- /*--------------------------------- PRIVATE ----------------------------------*/
- IControl(const IControl&);
- IControl& operator=(const IControl&);
-
- ISize
- sizClMin;
- }; // class IControl
-
- INESTEDBITFLAGCLASSFUNCS(Style, IControl);
- // global style functions
-
- /*--------------------------------- INLINES ----------------------------------*/
- inline IControl::IControl()
- /**************************************************************/
- /* Default constructor. */
- /**************************************************************/
- : sizClMin(100,100), IWindow()
- {;}
-
- //inline IControl::IControl(IWindowHandle wndh)
- /**************************************************************/
- /* Constructor. */
- /**************************************************************/
- // : sizClMin(100,100), IWindow(wndh)
- //{;}
-
- inline void IControl::setMinSize(const ISize& sizMin)
- /**************************************************************/
- /* Set the minimun allowable size of the window. In the */
- /* library this only apply to window on a canvas. */
- /**************************************************************/
- { sizClMin = sizMin; }
-
- inline const ISize& IControl::minSize() const
- /**************************************************************/
- /* Returns the minimun allowable size set by the user's class */
- /**************************************************************/
- { return sizClMin; }
- #endif /* _ICONTROL_ */