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

  1. //--------------------------------------------------------
  2. // DBCHKBX.H generated from BDBCTL.VBX
  3. // Copyrights (C) 1996 Borland International
  4. //--------------------------------------------------------
  5.  
  6. #if !defined(DBCHECKBOX_H_)
  7. #define DBCHECKBOX_H_
  8.  
  9. #include <vdbt/dbcontrl.h>
  10.  
  11. //--------------------------------------------------------
  12. // TDBCheckBox (VB3, subclassed from BUTTON)
  13. //--------------------------------------------------------
  14.  
  15. class _DBAWARECLASS TDBCheckBox : public TDBControl {
  16.  
  17.   DBPMECLASS( TDBCheckBox );
  18.  
  19.   // constructors
  20.   DECLARE_CONSTRUCTORS( TDBCheckBox );
  21.  
  22.   public:
  23.     // Properties
  24.     DECLARE_DB_PROP_RW2( TField,DataField );
  25.     DECLARE_DB_PROP_RW0( Bool,  DataChanged,   Prop_TDBCheckBox_DataChanged );
  26.     DECLARE_DB_PROP_RW0( COLORREF,ForeColor,   Prop_TDBCheckBox_ForeColor );
  27.     DECLARE_DB_PROP_RW0( COLORREF,BackColor,   Prop_TDBCheckBox_BackColor );
  28.     DECLARE_DB_PROP_RW2( string,FontName );
  29.     DECLARE_DB_PROP_RW0( Bool,  FontBold,      Prop_TDBCheckBox_FontBold );
  30.     DECLARE_DB_PROP_RW0( Bool,  FontItalic,    Prop_TDBCheckBox_FontItalic );
  31.     DECLARE_DB_PROP_RW0( Bool,  FontStrikethru,Prop_TDBCheckBox_FontStrikethru );
  32.     DECLARE_DB_PROP_RW0( Bool,  FontUnderline, Prop_TDBCheckBox_FontUnderline );
  33.     DECLARE_DB_PROP_RW0( float, FontSize,      Prop_TDBCheckBox_FontSize );
  34.     DECLARE_DB_PROP_RW1( ENUM, TLeftRight
  35.                              ,  Alignment,     Prop_TDBCheckBox_Alignment );
  36.     DECLARE_DB_PROP_RW0( Bool,  AllowGrayed,   Prop_TDBCheckBox_AllowGrayed );
  37.     DECLARE_DB_PROP_RW2( string,Caption );
  38.     DECLARE_DB_PROP_RW0( Bool,  Checked,       Prop_TDBCheckBox_Checked );
  39.     DECLARE_DB_PROP_RW0( Bool,  ReadOnly,      Prop_TDBCheckBox_ReadOnly );
  40.     DECLARE_DB_PROP_RW1( ENUM,  TCheckBoxState, State, Prop_TDBCheckBox_State );
  41.     DECLARE_DB_PROP_RW2( string,ValueChecked );
  42.     DECLARE_DB_PROP_RW2( string,ValueUnChecked );
  43.  
  44.   private:
  45.     void FireOnClick()
  46.     {
  47.       OnClickSource( *this );
  48.     }
  49.     void FireOnDragDrop( TVbxControl& Source, SHORT x, SHORT y )
  50.     {
  51.       OnDragDropSource( *this, Source, x, y );
  52.     }
  53.     void FireOnDragOver( TVbxControl& Source, SHORT x, SHORT y, TDragState State )
  54.     {
  55.       OnDragOverSource( *this, Source, x, y, State );
  56.     }
  57.     void FireOnEndDrag( TVbxControl& Source, SHORT x, SHORT y )
  58.     {
  59.       OnEndDragSource( *this, Source, x, y );
  60.     }
  61.     void FireOnEnter()
  62.     {
  63.       OnEnterSource( *this );
  64.     }
  65.     void FireOnExit()
  66.     {
  67.       OnExitSource( *this );
  68.     }
  69.     void FireOnKeyDown( SHORT *Key, TShiftState State )
  70.     {
  71.       OnKeyDownSource( *this, Key, State );
  72.     }
  73.     void FireOnKeyPress( SHORT Key )
  74.     {
  75.       OnKeyPressSource( *this, Key );
  76.     }
  77.     void FireOnKeyUp( SHORT *Key, TShiftState State )
  78.     {
  79.       OnKeyUpSource( *this, Key, State );
  80.     }
  81.     void FireOnMouseDown( TMouseButton Button, TShiftState State, SHORT x, SHORT y )
  82.     {
  83.       OnMouseDownSource( *this, Button, State, x, y );
  84.     }
  85.     void FireOnMouseMove( TMouseButton Button, TShiftState State, SHORT x, SHORT y )
  86.     {
  87.       OnMouseMoveSource( *this, Button, State, x, y );
  88.     }
  89.     void FireOnMouseUp( TMouseButton Button, TShiftState State, SHORT x, SHORT y )
  90.     {
  91.       OnMouseUpSource( *this, Button, State, x, y );
  92.     }
  93.  
  94.   public:
  95.     // Event Source
  96.     DECLARE_SOURCE( OnClick,     TDBCheckBoxNotify );
  97.     DECLARE_SOURCE( OnDragDrop,  TDBCheckBoxDrag );
  98.     DECLARE_SOURCE( OnDragOver,  TDBCheckBoxDragOver );
  99.     DECLARE_SOURCE( OnEndDrag,   TDBCheckBoxDrag );
  100.     DECLARE_SOURCE( OnEnter,     TDBCheckBoxNotify );
  101.     DECLARE_SOURCE( OnExit,      TDBCheckBoxNotify );
  102.     DECLARE_SOURCE( OnKeyDown,   TDBCheckBoxKey );
  103.     DECLARE_SOURCE( OnKeyPress,  TDBCheckBoxKeyPress );
  104.     DECLARE_SOURCE( OnKeyUp,     TDBCheckBoxKey );
  105.     DECLARE_SOURCE( OnMouseDown, TDBCheckBoxMouse );
  106.     DECLARE_SOURCE( OnMouseMove, TDBCheckBoxMouse );
  107.     DECLARE_SOURCE( OnMouseUp,   TDBCheckBoxMouse );
  108.  
  109.     // Event Handlers
  110.     DECLARE_DB_EVENT( OnClick,     TNotifyEvent );
  111.     DECLARE_DB_EVENT( OnDragDrop,  TDragEvent );
  112.     DECLARE_DB_EVENT( OnDragOver,  TDragOverEvent );
  113.     DECLARE_DB_EVENT( OnEndDrag,   TDragEvent );
  114.     DECLARE_DB_EVENT( OnEnter,     TNotifyEvent );
  115.     DECLARE_DB_EVENT( OnExit,      TNotifyEvent );
  116.     DECLARE_DB_EVENT( OnKeyDown,   TKeyEvent );
  117.     DECLARE_DB_EVENT( OnKeyPress,  TKeyPressEvent );
  118.     DECLARE_DB_EVENT( OnKeyUp,     TKeyEvent );
  119.     DECLARE_DB_EVENT( OnMouseDown, TMouseEvent );
  120.     DECLARE_DB_EVENT( OnMouseMove, TMouseEvent );
  121.     DECLARE_DB_EVENT( OnMouseUp,   TMouseEvent );
  122.  
  123.  
  124.   protected:
  125.     char far* GetClassName();
  126.  
  127. #ifdef __OWL_VBXCTL_H
  128.   DECLARE_RESPONSE_TABLE( TDBCheckBox );
  129. #endif __OWL_VBXCTL_H
  130. };
  131.  
  132. // Inlines
  133. // Properties
  134. DEFINE_DB_PROP_DATAFIELD( TDBCheckBox, _TDBCheckBox )
  135. DEFINE_DB_PROP_STRING( TDBCheckBox, _TDBCheckBox, FontName );
  136. DEFINE_DB_PROP_STRING( TDBCheckBox, _TDBCheckBox, Caption );
  137. DEFINE_DB_PROP_STRING( TDBCheckBox, _TDBCheckBox, ValueChecked );
  138. DEFINE_DB_PROP_STRING( TDBCheckBox, _TDBCheckBox, ValueUnChecked );
  139.  
  140. // Methods
  141. inline char far* TDBCheckBox::GetClassName()
  142. {
  143.   return "DBCHECKBOX";
  144. }
  145.  
  146. #endif DBCHECKBOX_H_
  147.