home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / dtwobj.hpp < prev    next >
C/C++ Source or Header  |  1996-12-23  |  4KB  |  95 lines

  1. #ifndef _DTWOBJ_HPP
  2. #define _DTWOBJ_HPP
  3.  
  4. #include "dtobject.hpp"
  5. #include <iostream>
  6. #include <iomanip>
  7.  
  8. #if defined( __BUILDING_DTWCM_DLL__ )
  9. #  define DTWOBJ_DECLSPEC METADECLSPEC_EXPORT
  10. #else
  11. #  define DTWOBJ_DECLSPEC METADECLSPEC_IMPORT
  12. #endif
  13.  
  14. oapp<WUInt> & METAEXPORTDEF GetPadder();
  15. #define Pad( __x ) GetPadder()( __x )
  16.  
  17. extern void METAEXPORTDEF TabTo( ostream & src, WUInt curr, WUInt column );
  18. #define _DT( __x )  WCTEXT( __x )
  19.  
  20. enum MMWCodeGeneration {
  21.     MM_CG_AppInit,                      // "WRichTextBox::GetRegistered.."
  22.     MM_CB_HPP,                          // form1.hpp
  23.     MM_CB_CPP,                          // form1.cpp
  24.     MM_CB_RC,                           // form1.rc
  25.  
  26.     MM_CG_FORM_CreateDecl,              // "WBool Create( WWindow * );"
  27.     MM_CG_FORM_CreateDefn,              // "WBool Form1::Create( WWindow * )"
  28.     MM_CG_FORM_CallCreate,              // "ok = WWindow::Create( parent, ... )"
  29.  
  30.     MM_CG_HPP_EnumeratorID,             // "CB_1 = 101,"
  31.     MM_CG_HPP_EventDecl,                // "WBool cb_1_Clicked( ... );"
  32.     MM_CG_HPP_MemberDecl,               // "WCommandButton *  cb_1;"
  33.  
  34.     MM_CG_ConstructorInitializer,       // "    , cb_1( NULL )"
  35.     MM_CG_ConstructorCode,              // "// any constructor code"
  36.  
  37.     MM_CG_InitNew,                      // "cb_1 = new WCommandButton;"
  38.     MM_CG_InitEventHandlerList,         // "WEventHandlerList cb_1_Event..."
  39.     MM_CG_InitEventHandlers,            // "cb_1->SetEventHandlerList( ... );"
  40.     MM_CG_RemoveEventHandlers,          // "cb_1->RemoveEventHandlerList( ... );"
  41.     MM_CG_InitDDXDataSource,            // "cb_1->SetDDXDataSource( ... );"
  42.     MM_CG_InitCreate,                   // "cb_1->Create( ... );"
  43.     MM_CG_InitProperties,               // "cb_1->SetFont( ... );"
  44.     MM_CG_CallCreateEventHandler,       // "cb_1->CallEventHandler( ... );"
  45.     MM_CG_CallDestroyEventHandler,      // "cb_1->CallEventHandler( ... );"
  46.     MM_CG_InitTransaction,              // "trans_1->Connect( ... );"
  47.     MM_CG_InitQuery,                    // "query_1->Open( ... );"
  48.     MM_CG_AutoOpenQuery,                // "WOptima::AuotOpen...;"
  49.     MM_CG_InitTabControl,               // "_TabForm1->Create( this, ...);"
  50.  
  51.     MM_CG_FiniTransaction,              // "trans_1->Disconnect();"
  52.     MM_CG_FiniQuery,                    // "query_1->Close();"
  53.     MM_CG_FiniDelete,                   // "delete cb_1;"
  54.     MM_CG_FiniReset,                    // "cb_1 = NULL;"
  55.  
  56.     MM_CG_MemberFunctions,              // "WBool Form1::..."
  57.  
  58.     MM_CG_DDXMember,                    // "WString     ddxNum;"
  59.     MM_CG_DDXGetDefault,                // "ddx->gender = 'M';"
  60.  
  61.     MM_CG_RC_Defines,                   // "#define CB_1 101"
  62.     MM_CG_RC_MainLevel,                 // "SPINDIAL_1_DATA RCDATA"
  63.     MM_CG_RC_Control,                   // "CB_1 CONTROL ..."
  64.  
  65.     MM_CG_StaticData,                   // "WStaticToolbarData __Form1_Base::toolb_1_table[] = ..."
  66.     MM_CG_HPP_BaseMemberFuncDecl,       // WBool __Base_toolb_1_ClickEvent(...);
  67.     MM_CG_CPP_BaseMemberFuncDefn,       // WBool __Base_toolb_1_ClickEvent(...) {...}
  68. };
  69.  
  70. class METAEXPORTCLASSDEF DTWObject : public DTObjectBase
  71. {
  72.     public:
  73.         DTWObject( const MetaObject * );
  74.  
  75.         virtual void            DTGetRectangle( WRect & r,
  76.                                                 WBool abs = FALSE ) const;
  77.         virtual void            DTSetRectangle( const WRect & r );
  78.  
  79.         virtual void            DTGetClientRectangle( WRect & r ) const;
  80.  
  81.         virtual void            DTGetRCRectangle( WRect & r ) const;
  82.  
  83.         virtual WRect           DTMapPixelsToDLU( const WRect & pix ) const;
  84.         virtual WRect           DTMapDLUToPixels( const WRect & dlu ) const;
  85.  
  86.         virtual void            DTBringToTop();
  87.  
  88.         virtual void            DTRepaint();
  89.  
  90.         virtual void            GetRequiredIncludes( WStringList & includes ) const;
  91.         virtual void            GenerateCode( MMCodeGeneration, ostream &, MMCodeGenerationParms & );
  92. };
  93.  
  94. #endif // _DTWOBJ_HPP
  95.