home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / dtjcomp.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-23  |  3.6 KB  |  116 lines

  1. // Design Time Java Text Box implementation. (HPP)
  2.  
  3. #ifndef _DTJCOMP_HPP
  4. #define _DTJCOMP_HPP
  5.  
  6. #include "dtjobjct.hpp"
  7.                       
  8. struct MMJCodeGenerationParms;
  9. struct DTSelectedEventData;
  10. class DTJContainer;
  11.                       
  12. class METAEXPORTCLASSDEF DTJComponent : public DTJObject 
  13. {
  14.     public:
  15.         DTJComponent( const MetaObject * pMetaObj );
  16.         virtual ~DTJComponent();
  17.  
  18.     //
  19.     // Create
  20.     //
  21.     //    Call Create on the windowed object.
  22.     //
  23.     virtual WBool        Create( WWindow * parent, const WRect & r,
  24.                         const WChar * text, WStyle style,
  25.                     WStyle exStyle, void * data = NULL,
  26.                     WBool isLoading = FALSE );
  27.  
  28.     virtual void        RemoveFromContainer();
  29.  
  30.     virtual void        AddToContainer();
  31.  
  32.     virtual void        ContainerLayoutManagerChanged( DTJContainer * );
  33.  
  34.         virtual void            DTBringToTop();
  35.         
  36.     //
  37.     // DefaultStyle
  38.     //
  39.     //    The style with which new instances are created.  Default
  40.     //    implementation returns GetWindow()->GetDefaultStyle().
  41.  
  42.     virtual WStyle        GetDefaultStyle() const;
  43.  
  44.         virtual void GenerateCode( MMCodeGeneration mmCodeGen,
  45.                    ostream& src,
  46.                    MMCodeGenerationParms& pGenParms );
  47.  
  48.     virtual const MetaObject *  GetRefCardMeta() const;
  49.  
  50.     virtual WBool AllowEvent( const MMEvent * ) const;
  51.  
  52.     virtual void PropertyChanged( const WString & name );
  53.         
  54.         virtual WBool GetIsResizeable();
  55.         virtual WBool GetIsMoveable();
  56.  
  57.     virtual void DTSetName( const WString & name );
  58.  
  59.     WBool    GetBoundControl() const;
  60.     void    SetBoundControl( WBool bound );
  61.  
  62.     WBool    GetBackgroundIsDefault() const;
  63.     void    SetBackgroundIsDefault( WBool isDefault );
  64.  
  65.     WBool    GetForegroundIsDefault() const;
  66.     void    SetForegroundIsDefault( WBool isDefault );
  67.  
  68.     WBool    GetFontIsDefault() const;
  69.     void    SetFontIsDefault( WBool isDefault );
  70.  
  71.     static PropertyInspectObject * MakePropEditor_BoundControl(
  72.             const MMProperty * prop, PropertyInspector * prt,
  73.             WUInt numObject, DTObject ** objects );
  74.  
  75.     static PropertyInspectObject * MakePropEditor_FDX(
  76.             const MMProperty * prop, PropertyInspector * prt,
  77.             WUInt numObject, DTObject ** objects );
  78.  
  79.     protected:
  80.         virtual void GenerateCreate( const WString& objPrefix,
  81.                                  ostream& src,
  82.                        MMJCodeGenerationParms* pGenParms ) const;
  83.     virtual void GenerateImports( ostream& src,
  84.                         MMJCodeGenerationParms* pGenParms ) const;
  85.         virtual void GenerateDatabaseProps( const WString& objPrefix,
  86.                                    ostream& src,
  87.                          MMJCodeGenerationParms* pGenParms ) const;
  88.         virtual void GenerateFontProp( const WString& objPrefix,
  89.                                    ostream& src,
  90.                          MMJCodeGenerationParms* pGenParms ) const;
  91.         virtual void GenerateColourProp( const WString& objPrefix,
  92.                                      ostream& src,
  93.                      MMJCodeGenerationParms* pGenParms ) const;
  94.     virtual void GenerateFDXDeclaration( ostream & src,
  95.                 MMJCodeGenerationParms * pGenParms ) const;
  96.     virtual void GenerateFDXRead( ostream & src,
  97.                 MMJCodeGenerationParms * pGenParms ) const;
  98.     virtual void GenerateFDXWrite( ostream & src,
  99.                 MMJCodeGenerationParms * pGenParms ) const;
  100.                                
  101.     private:
  102.     WBool        handleSelected( WObject *, DTSelectedEventData* );
  103.         
  104.     private:
  105.     WBool    _boundControl;
  106.     WBool    _backgroundIsDefault;
  107.     WBool    _foregroundIsDefault;
  108.     WBool    _fontIsDefault;
  109. };
  110.  
  111. // needed for mdreader
  112. typedef DTJComponent DTjava__dot__awt__dot__Component__dot__102;
  113. typedef WObject java__dot__awt__dot__Component__dot__102;
  114.  
  115. #endif // _DTJCOMP_HPP
  116.