home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / runnable / ibmc / ibmclass / igroupbx.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-26  |  5.0 KB  |  117 lines

  1. #ifndef _IGROUPBX_
  2.   #define _IGROUPBX_
  3. /*******************************************************************************
  4. * FILE NAME: Igroupbx.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *    Igroupbx - This class creates and manages the group box control window.   *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. /* $Log:   R:/IBMCLASS/IBASECTL/VCS/IGROUPBX.HPV  $
  18. //
  19. //   Rev 1.6   25 Oct 1992 17:05:26   nunn
  20. //changed library name to ICLUI
  21. //
  22. //   Rev 1.5   25 Oct 1992 10:54:30   boezeman
  23. //Add documentation and converted file to skeleton.hpp format.
  24.  
  25.       Rev 1.4   13 Oct 1992 21:22:12   tsuji
  26.    Correct comments around log directive.
  27.  
  28.       Rev 1.3   13 Oct 1992 20:56:54   tsuji
  29.    Correct log directive, remove IBM Confidential classification.
  30.  
  31.       Rev 1.2   13 Oct 1992 19:05:50   tsuji
  32.    Remove no-op virtual destructor, add Inherited typedef.
  33. *******************************************************************************/
  34. #ifndef _ITEXTCTL_
  35.   #include <itextctl.hpp>
  36. #endif
  37.  
  38. // Forward declarations for other classes:
  39. class IGroupBox;  /* gbx */
  40. class IRectangle;
  41. class ISize;
  42. class IWindowHandle;
  43. #ifndef _IBITFLAG_
  44.   #include <ibitflag.hpp>
  45. #endif
  46.  
  47. class IGroupBox : public ITextControl  {
  48. /*******************************************************************************
  49. * This class creates and manages the group box control window.                 *
  50. *                                                                              (
  51. * To use this class, create an instance of this class as follows:              *
  52. *   IGroupBox gbxGroup(ID_GROUPBOX, this, IRectangle(10,10,110,210));          *
  53. *   gbxGroup.setText("Colors");                                                *
  54. * EXAMPLE:                                                                     *
  55. *   <sample code>                                                              *
  56. *******************************************************************************/
  57. typedef ITextControl
  58.   Inherited;
  59.  
  60. public:
  61. INESTEDBITFLAGCLASSDEF1(Style, IGroupBox, IWindow);
  62.                                   // style class definition
  63. static const Style
  64.   autosize;
  65. static const Style&
  66.   defStyle;
  67. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  68. | There are 3 ways to construct instances of this class:                       |
  69. |   1. default                                                                 |
  70. |   2. From a Dialog Template                                                  |
  71. |   3. From a Window                                                           |
  72. ------------------------------------------------------------------------------*/
  73.   IGroupBox(unsigned long Id,
  74.             const IWindow* parent,
  75.             const IWindow* owner,
  76.             const IRectangle& initial,
  77.             Style style = defStyle);
  78.  
  79.   IGroupBox(unsigned long Id,
  80.             const IWindow* parentDialog);
  81.  
  82.   IGroupBox(IWindowHandle handle);
  83.  
  84. /*-------------------------------- STYLES --------------------------------------
  85. | These function provide means of getting and setting the default style        |
  86. | attributes of instances of this class:                                       |
  87. |   defaultStyle    - returns the group box control default style setting      |
  88. |   setDefaultStyle - sets the group box control default style                 |
  89. ------------------------------------------------------------------------------*/
  90. static Style
  91.   defaultStyle();
  92. static void
  93.   setDefaultStyle(Style style);
  94.  
  95. protected:
  96. /*----------------------------- LAYOUT SIZE ------------------------------------
  97. | calcMinSize - returns the minimum size that this group box control should be.|
  98. ------------------------------------------------------------------------------*/
  99. virtual ISize
  100.   calcMinSize();
  101.  
  102. static Style
  103.   classDefaultStyle;
  104.  
  105. private:
  106. /*--------------------------------- PRIVATE ----------------------------------*/
  107.   IGroupBox(const IGroupBox&);
  108. //IGroupBox& operator=(const IGroupBox&);
  109.  
  110. static const Style
  111.   groupBox;
  112. };  // class IGroupBox
  113.  
  114. INESTEDBITFLAGCLASSFUNCS(Style, IGroupBox);
  115.                                   // global style functions
  116. #endif  /* _IGROUPBX_ */
  117.