home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / AWARE_H.PAK / DBTEXT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  4.1 KB  |  119 lines

  1. //--------------------------------------------------------
  2. // DBTEXT.H generated from BDBCTL.VBX
  3. // Copyrights (C) 1996 Borland International
  4. //--------------------------------------------------------
  5.  
  6. #if !defined(DBTEXT_H_)
  7. #define DBTEXT_H_
  8.  
  9. #include <vdbt/dbcontrl.h>
  10.  
  11. //--------------------------------------------------------
  12. // TDBText (VB3, subclassed from STATIC)
  13. //--------------------------------------------------------
  14.  
  15. class _DBAWARECLASS TDBText : public TDBControl {
  16.   DBPMECLASS( TDBText );
  17.  
  18.   // constructors
  19.   DECLARE_CONSTRUCTORS( TDBText );
  20.  
  21.   public:
  22.     // Properties
  23.     DECLARE_DB_PROP_RW2( TField, DataField );
  24.     DECLARE_DB_PROP_RW0( Bool,    DataChanged,    Prop_TDBText_DataChanged );
  25.     DECLARE_DB_PROP_RW0( COLORREF,ForeColor,      Prop_TDBText_ForeColor );
  26.     DECLARE_DB_PROP_RW0( COLORREF,BackColor,      Prop_TDBText_BackColor );
  27.     DECLARE_DB_PROP_RW2( string,  FontName );
  28.     DECLARE_DB_PROP_RW0( Bool,    FontBold,       Prop_TDBText_FontBold );
  29.     DECLARE_DB_PROP_RW0( Bool,    FontItalic,     Prop_TDBText_FontItalic );
  30.     DECLARE_DB_PROP_RW0( Bool,    FontStrikethru, Prop_TDBText_FontStrikethru );
  31.     DECLARE_DB_PROP_RW0( Bool,    FontUnderline,  Prop_TDBText_FontUnderline );
  32.     DECLARE_DB_PROP_RW0( float,   FontSize,       Prop_TDBText_FontSize );
  33.     DECLARE_DB_PROP_RW1( ENUM, TBorderStyle
  34.                              ,   BorderStyle,     Prop_TDBText_BorderStyle );
  35.     DECLARE_DB_PROP_RW1( ENUM, TAlignment
  36.                              ,    Alignment,      Prop_TDBText_Alignment );
  37.     DECLARE_DB_PROP_RW0( Bool,    AutoSize,       Prop_TDBText_AutoSize );
  38.     DECLARE_DB_PROP_RW2( string,  Caption );
  39.     DECLARE_DB_PROP_RW0( Bool,    Transparent,    Prop_TDBText_Transparent );
  40.     DECLARE_DB_PROP_RW1( ENUM, TTextWordWrap
  41.                              ,    WordWrap,       Prop_TDBText_WordWrap );
  42.  
  43.   private:
  44.     void FireOnClick()
  45.     {
  46.       OnClickSource( *this );
  47.     }
  48.     void FireOnDragDrop( TVbxControl& Source, SHORT x, SHORT y )
  49.     {
  50.       OnDragDropSource( *this, Source, x, y );
  51.     }
  52.     void FireOnDragOver( TVbxControl& Source, SHORT x, SHORT y, TDragState State )
  53.     {
  54.       OnDragOverSource( *this, Source, x, y, State );
  55.     }
  56.     void FireOnEndDrag( TVbxControl& Source, SHORT x, SHORT y )
  57.     {
  58.       OnEndDragSource( *this, Source, x, y );
  59.     }
  60.     void FireOnDblClick()
  61.     {
  62.       OnDblClickSource( *this );
  63.     }
  64.     void FireOnMouseDown( TMouseButton Button, TShiftState State, SHORT x, SHORT y )
  65.     {
  66.       OnMouseDownSource( *this, Button, State, x, y );
  67.     }
  68.     void FireOnMouseMove( TMouseButton Button, TShiftState State, SHORT x, SHORT y )
  69.     {
  70.       OnMouseMoveSource( *this, Button, State, x, y );
  71.     }
  72.     void FireOnMouseUp( TMouseButton Button, TShiftState State, SHORT x, SHORT y )
  73.     {
  74.       OnMouseUpSource( *this, Button, State, x, y );
  75.     }
  76.  
  77.   public:
  78.     // Event Source
  79.     DECLARE_SOURCE( OnClick,     TDBTextNotify );
  80.     DECLARE_SOURCE( OnDblClick,  TDBTextNotify );
  81.     DECLARE_SOURCE( OnDragDrop,  TDBTextDrag );
  82.     DECLARE_SOURCE( OnDragOver,  TDBTextDragOver );
  83.     DECLARE_SOURCE( OnEndDrag,   TDBTextDrag );
  84.     DECLARE_SOURCE( OnMouseDown, TDBTextMouse );
  85.     DECLARE_SOURCE( OnMouseMove, TDBTextMouse );
  86.     DECLARE_SOURCE( OnMouseUp,   TDBTextMouse );
  87.  
  88.     // Event Handlers
  89.     DECLARE_DB_EVENT( OnClick,     TNotifyEvent );
  90.     DECLARE_DB_EVENT( OnDragDrop,  TDragEvent );
  91.     DECLARE_DB_EVENT( OnDragOver,  TDragOverEvent );
  92.     DECLARE_DB_EVENT( OnEndDrag,   TDragEvent );
  93.     DECLARE_DB_EVENT( OnDblClick,  TNotifyEvent );
  94.     DECLARE_DB_EVENT( OnMouseDown, TMouseEvent );
  95.     DECLARE_DB_EVENT( OnMouseMove, TMouseEvent );
  96.     DECLARE_DB_EVENT( OnMouseUp,   TMouseEvent );
  97.  
  98.   protected:
  99.     char far* GetClassName();
  100.  
  101. #ifdef __OWL_VBXCTL_H
  102.   DECLARE_RESPONSE_TABLE( TDBText );
  103. #endif __OWL_VBXCTL_H
  104. };
  105.  
  106. // Inlines
  107. // Properties
  108. DEFINE_DB_PROP_DATAFIELD( TDBText, _TDBText )
  109. DEFINE_DB_PROP_STRING( TDBText, _TDBText, FontName );
  110. DEFINE_DB_PROP_STRING( TDBText, _TDBText, Caption );
  111.  
  112. // Methods
  113. inline char far* TDBText::GetClassName()
  114. {
  115.   return "DBTEXT";
  116. }
  117.  
  118. #endif DBTEXT_H_
  119.