Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# PluginControlsCommon.hpp

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file PluginControlsCommon.hpp
    00003 ///
    00004 /// @brief Extended MFC based interfaces for plugin controls and UI hooks
    00005 ///
    00006 /// @author jwvanderbeck
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date May 2002
    00023 /// @author jwvanderbeck
    00024 /// @remarks Creation
    00025 ///
    00026 ///////////////////////////////////////////////////////////////////////////////
    00027
    00028 // Define exports or imports
    00029 #ifdef PLUGIN_EXPORTS
    00030 #define PLUGIN_API __declspec(dllexport)
    00031 #else
    00032 #define PLUGIN_API __declspec(dllimport)
    00033 #endif
    00034
    00035 // Include Destiny3D master datatypes
    00036 #include "deGlobalTypes.hpp"
    00037 #include "destring.hpp"
    00038
    00039 // UI Info Struct
    00040 struct UIInfo
    00041 {
    00042     // CWnd of the overall parent UI control
    00043     CWnd*       pUIWindow;
    00044     // CWnd of the actual list control.  This should normally be used as the "parent"
    00045     CWnd*       pListWindow;
    00046     CFont*      pRegularFont;
    00047     CFont*      pBoldFont;
    00048 };
    00049
    00050 /*****************
    00051 IDPControl interface
    00052 *****************/
    00053 class IDPControl
    00054 {
    00055 public:
    00056     virtual ~IDPControl() {};
    00057
    00058     // The attribute area needs drawing
    00059     virtual void DrawAttribute(CDC* pDC, deRect* rc) = 0;
    00060
    00061     // Return the height of the item
    00062     virtual LONG GetHeight() = 0;
    00063
    00064     // Retrieve the item's attribute value
    00065     virtual void GetItemValue(deString *Value) = 0;
    00066
    00067     // Set the item's attribute value
    00068     virtual void SetItemValue(deString *Value) = 0;
    00069
    00070     // Called when attribute area has changed size
    00071     virtual void OnMove() = 0;
    00072
    00073     // Called when the item needs to refresh its data
    00074     virtual void OnRefresh() = 0;
    00075
    00076     // Called when the item needs to commit its changes
    00077     virtual void OnCommit() = 0;
    00078
    00079     // Called to activate the item
    00080     virtual void OnActivate() = 0;
    00081
    00082     // Called to pass in the UIInfo struct
    00083     virtual void SetUIInfo(UIInfo* pInfo) = 0;
    00084
    00085     /// Called to delete the Control instance
    00086     virtual void Release() = 0;
    00087 };
    00088
    00089 /************
    00090 IDPMUIHandler
    00091 ************/
    00092 class IDPMUIHandler
    00093 {
    00094 public:
    00095     virtual ~IDPMUIHandler() {};
    00096
    00097     virtual IDPMResult AddSettingsPage(CPropertyPage* pPage) = 0;
    00098     virtual IDPMResult RemoveSettingsPage(CPropertyPage *pPage) = 0;
    00099
    00100     virtual IDPMResult AddWorkspaceTab(CWnd* pControl, const char* szLabel) = 0;
    00101     virtual IDPMResult RemoveWorkspaceTab(CWnd* pControl) = 0;
    00102
    00103     virtual IDPMResult AddOutputTab(CWnd* pControl, const char* szLabel) = 0;
    00104     virtual IDPMResult RemoveOuputTab(CWnd* pControl) = 0;
    00105 };