home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 September / dppcpro0998.iso / Rwc / Sybase / Install.exe / hpp.z / mmlexus.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-12  |  7.2 KB  |  202 lines

  1. #ifndef _MMLEXUS_HPP
  2. #define _MMLEXUS_HPP
  3.  
  4. #include "mtdef.hpp"
  5.  
  6. class  MetaObject;
  7. class  MMReferenceNode;
  8. class  WStringList;
  9. class  DTFormEditBase;
  10. class  MTPropertySheetBase;
  11. class  DTWForm;
  12. struct MMLibraryData;
  13. struct MMPropertySheetThunk;
  14. struct MMFunctionData;
  15. class  DTRegistryKey;
  16. class  DTCodeBlockBase;
  17. class  MTImageInterface;
  18. class  MMPropertySheet;
  19.  
  20. class  DTObject;
  21. class  DTWObject;
  22.  
  23. class  MetaObjectHashTable;
  24.  
  25. // MMLexusInterfaceBase:
  26. //      this class represents Lexus to CompDll
  27.  
  28. typedef WBool WCMDEF (*EnumDTFormCB)( DTObject *form, void *userdata );
  29.  
  30. class IFormEditor;
  31. class IControl;
  32. struct MMFormInfo {
  33.     WString         name;
  34.     WString         fileName;
  35.     IFormEditor     *iFormEditor;
  36.     const IControl  *iControl;
  37. };
  38. struct MMControlInfo {
  39.     WString     instanceName;
  40.     WString     className;
  41.     IControl    *iControl;
  42. };
  43.  
  44. class METADEF MMLexusInterfaceBase : public WEventGenerator {
  45.     public:
  46.         enum Sheet {
  47.             TabControlEdit,
  48.             GridProperties,
  49.             PictureProperty,
  50.         };
  51.  
  52.         enum ClassType {
  53.             CT_OleServerObject,
  54.             CT_OleInterface,
  55.         };
  56.  
  57.         enum ViewWindow {
  58.             VW_Classes,
  59.             VW_Files,
  60.             VW_Objects,
  61.             VW_Resources,
  62.             VW_ObjectInspector,
  63.             VW_Targets,
  64.         };
  65.  
  66.         enum LoadOption {
  67.             LO_Load,    //  Load the form if required
  68.             LO_Check,   //  Don't load the form -- just check
  69.         };
  70.  
  71.         enum MacroName {
  72.             MN_JavaToolsClassPath,
  73.             MN_JavaClassPath,
  74.             MN_PowersoftClassPath,
  75.             MN_PowersoftClassPathAWT102Debug,
  76.             MN_PowersoftClassPathAWT102Release,
  77.             MN_PowersoftClassPathAWT110Debug,
  78.             MN_PowersoftClassPathAWT110Release,
  79.             MN_SunClassPathAWT102,
  80.             MN_SunBinPathAWT102,
  81.             MN_SunClassPathAWT110,
  82.             MN_SunBinPathAWT110,
  83.             MN_MicrosoftClassPathAWT102,
  84.             MN_MicrosoftClassPathAWT110,
  85.             MN_SunJDK102,
  86.             MN_SunJDK11,
  87.             MN_MSSDK15,
  88.             MN_UserClasses,
  89.             MN_UserClasses102,
  90.             MN_UserClasses11,
  91.             MN_SunImbeddedClassLib,
  92.             MN_GlobalClassPath,
  93.         };
  94.  
  95.     public:
  96.         virtual void                    OpenViewWindow( ViewWindow window ) = 0;
  97.         
  98.         virtual WBool                   ShowConsole( WBool visible ) = 0;
  99.         
  100.         virtual MTPropertySheetBase *   MakePropertySheet(
  101.                                             Sheet,
  102.                                             const MMPropertySheet * ) = 0;
  103.  
  104.         virtual DTFormEditBase *        FindForm(
  105.                                             DTObject * dttabctrl,
  106.                                             const WString &,
  107.                                             WWindow *parent = NULL,
  108.                                             WTabControl *tc = NULL ) = 0;
  109.  
  110.         virtual DTFormEditBase *        CreateTabForm(
  111.                                             DTObject * dttabctrl,
  112.                                             WString &formName,
  113.                                             WString &className,
  114.                                             WWindow *parent,
  115.                                             WTabControl *tabcontrol ) = 0;
  116.  
  117.         virtual WBool                   GetImage(
  118.                                             DTObject * obj,
  119.                                             const WString & name,
  120.                                             WBitmap & bmp,
  121.                                             WIcon & ico,
  122.                                             WCursor & cur,
  123.                                             const WSize * size=NULL ) = 0;
  124.  
  125.         virtual void                    GetImages( DTObject * obj,
  126.                                             const WString & type,
  127.                                             WStringList & icons ) = 0;
  128.  
  129.         virtual void                    EnumDTForms(
  130.                                             EnumDTFormCB rtn,
  131.                                             void * user ) = 0;
  132.  
  133.         virtual DTFormEditBase *        GetSelectedForm() const = 0;
  134.  
  135.         virtual void                    GetFormList( WArray<MMFormInfo> &list ) = 0;
  136.         virtual void                    GetControlList( IFormEditor *form,
  137.                                             WArray<MMControlInfo> &list ) = 0;
  138.         virtual DTObject *              GetControlDTObject( IControl *control,
  139.                                                             LoadOption option = LO_Load ) = 0;
  140.  
  141.         virtual WFilePath               GetFormFilePath(
  142.                                             DTObject * form ) = 0;
  143.  
  144.         virtual WFilePath               GetFormFilePath(
  145.                                             DTFormEditBase * dtform ) = 0;
  146.  
  147.         virtual void                    ObjectSelected(
  148.                                             DTObject * obj ) = 0;
  149.  
  150.         virtual DTRegistryKey *         GetRegistryKey() = 0;
  151.  
  152.         virtual WBool                   ValidateIdentifier( const WString & str,
  153.                                                             WString & message ) = 0;
  154.  
  155.         virtual WBool                   NotifyView( long event ) = 0;
  156.  
  157.         virtual WStringArray            GetClassList( ClassType, DTObject * ) = 0;
  158.  
  159.         /*  Start the tab editor.  Invokes FormEdit::StartTabDlg on
  160.             the given formedit and the control container.
  161.         */
  162.         virtual void            StartTabDlg( DTFormEditBase*,
  163.                                              DTObject* container = NULL ) = 0;
  164.  
  165.         /*  Start the menu editor.  Invokes FormPaint::StartMenuDlg on
  166.             the current formedit's form painter.  The menuClass string
  167.             is the name of the menu component's class that should be
  168.             instantiated if there isn't a menu already on the form.
  169.         */
  170.         virtual void            StartMenuDlg( const WString & menuClass ) = 0;
  171.  
  172.         /*  If you have a hot key control, and you don't want Power++ to
  173.             pay attention to the keys you press, turn stifling off. Just
  174.             turn it back on when you're done.
  175.         */
  176.         virtual void StifleGlobalAccelerators( WBool onOff ) = 0;
  177.  
  178.         /*  The image interface allows you to get resource images
  179.         */
  180.         virtual MTImageInterface * GetImageInterface() = 0;
  181.  
  182.         /*  Expand a macro using the CmdLine class on the Lexus
  183.             side.  Ex.: foo->ExpandMacro( "$(debug)", val )
  184.          */
  185.  
  186.         virtual WBool                   ExpandMacro( const WString &name,
  187.                                                      WString &buf ) = 0;
  188.  
  189.         /*  Get the macro name that corresponds to the given enumeration.
  190.             Basically just maps onto the list in lexus\hpp\cmdline.hpp.
  191.          */
  192.  
  193.         virtual WBool                   GetMacroName( MacroName name,
  194.                                                       WString & str ) = 0;
  195.  
  196.         /* Get the lexus shepherd window.
  197.          */
  198.         virtual WForm * GetShepherdWindow() = 0;
  199.  
  200. };
  201. #endif // _MMLEXUS_HPP
  202.