home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / OWL1.PAK / BDIVIDER.CPP < prev    next >
Text File  |  1995-08-29  |  2KB  |  56 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. /* --------------------------------------------------------
  4.   BDIVIDER.CPP
  5.   Defines type TBDivider.  This is a static control that draws
  6.   a beveled dividing line
  7.   -------------------------------------------------------- */
  8.  
  9. #include "bdivider.h"
  10. #include "bwcc.h"
  11.  
  12. /* Constructor for a TBDivider object.  Initializes its data fields using
  13.   parameters passed and default values. */
  14.  
  15. TBDivider::TBDivider(PTWindowsObject AParent, int AnId, LPSTR AText, int X,
  16.              int Y, int W, int H, BOOL IsVertical, BOOL IsBump,
  17.              PTModule AModule)
  18.       : TControl(AParent, AnId, AText, X, Y, W, H, AModule)
  19. {
  20.   if ( IsVertical )
  21.   {
  22.  
  23.     if (IsBump)
  24.       Attr.Style |= BSS_VBUMP;
  25.     else
  26.       Attr.Style |= BSS_VDIP;
  27.   }
  28.   else
  29.   {
  30.     if (IsBump)
  31.       Attr.Style |= BSS_HBUMP;
  32.     else
  33.       Attr.Style |= BSS_HDIP;
  34.   }
  35. }
  36.  
  37. /* Constructor for a TBDivider to be associated with a MS-Windows
  38.    interface element created by MS-Windows from a resource definition.
  39.    Initializes its data fields using passed parameters.  Disables
  40.    transfer of state data for the TBDivider. */
  41.  
  42. TBDivider::TBDivider(PTWindowsObject AParent, int ResourceId,
  43.                PTModule AModule)
  44.                  : TControl(AParent, ResourceId, AModule)
  45. {
  46.   DisableTransfer();
  47. }
  48.  
  49. PTStreamable TBDivider::build()
  50. {
  51.   return new TBDivider(streamableInit);
  52. }
  53.  
  54. TStreamableClass RegBDivider("TBDivider", TBDivider::build,
  55.                   __DELTA(TBDivider));
  56.