iplugview.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // Project     : SDK Core
00003 // Version     : 1.0
00004 //
00005 // Category    : SDK GUI Interfaces
00006 // Filename    : iplugview.h
00007 // Created by  : Steinberg, 12/2007
00008 // Modified    : $Date: 2008/01/15 16:00:24 $
00009 // Description : Plug-In User Interface
00010 //
00011 //-----------------------------------------------------------------------------
00012 // LICENSE
00013 // © 2008, Steinberg Media Technologies GmbH, All Rights Reserved
00014 //-----------------------------------------------------------------------------
00015 // This Software Development Kit may not be distributed in parts or its entirety  
00016 // without prior written agreement by Steinberg Media Technologies GmbH. 
00017 // This SDK must not be used to re-engineer or manipulate any technology used  
00018 // in any Steinberg or Third-party application or software module, 
00019 // unless permitted by law.
00020 // Neither the name of the Steinberg Media Technologies nor the names of its
00021 // contributors may be used to endorse or promote products derived from this 
00022 // software without specific prior written permission.
00023 // 
00024 // THIS SDK IS PROVIDED BY STEINBERG MEDIA TECHNOLOGIES GMBH "AS IS" AND
00025 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00026 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00027 // IN NO EVENT SHALL STEINBERG MEDIA TECHNOLOGIES GMBH BE LIABLE FOR ANY DIRECT, 
00028 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00029 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
00031 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
00032 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00033 // OF THE POSSIBILITY OF SUCH DAMAGE.
00034 //------------------------------------------------------------------------------
00035 
00036 #ifndef __iplugview__
00037 #define __iplugview__
00038 
00039 #include "../base/funknown.h"
00040 
00041 namespace Steinberg {
00042 
00043 class IPlugFrame;
00044 
00045 //------------------------------------------------------------------------
00047 //------------------------------------------------------------------------
00048 struct ViewRect
00049 {
00050 //------------------------------------------------------------------------
00051         ViewRect (int32 l = 0, int32 t = 0, int32 r = 0, int32 b = 0)
00052         : left (l), top (t), right (r), bottom (b) {}
00053 
00054         int32 left;
00055         int32 top;
00056         int32 right;
00057         int32 bottom;
00058 //------------------------------------------------------------------------
00059         int32 getWidth () const { return right - left; }
00060         int32 getHeight () const { return bottom - top; }
00061 //------------------------------------------------------------------------
00062 };
00063 
00064 //------------------------------------------------------------------------
00070 const FIDString kPlatformTypeHWND = "HWND";                     
00071 
00073 const FIDString kPlatformTypeHIView = "HIView";         
00074 
00076 const FIDString kPlatformTypeNSView = "NSView";         
00077 
00078 //------------------------------------------------------------------------
00079 
00080 //------------------------------------------------------------------------
00084 //------------------------------------------------------------------------
00085 class IPlugView: public FUnknown
00086 {
00087 public:
00088 //------------------------------------------------------------------------
00091         virtual tresult PLUGIN_API isPlatformTypeSupported (FIDString type) = 0;
00092         
00097         virtual tresult PLUGIN_API attached (void* parent, FIDString type) = 0;
00098 
00100         virtual tresult PLUGIN_API removed () = 0;
00101 
00103         virtual tresult PLUGIN_API onWheel (float distance) = 0;
00104         
00109         virtual tresult PLUGIN_API onKeyDown (char16 key, int16 keyCode, int16 modifiers) = 0;
00110 
00115         virtual tresult PLUGIN_API onKeyUp (char16 key, int16 keyCode, int16 modifiers) = 0;
00116 
00118         virtual tresult PLUGIN_API getSize (ViewRect* size) = 0;
00119 
00121         virtual tresult PLUGIN_API onSize (ViewRect* newSize) = 0;
00122 
00124         virtual tresult PLUGIN_API onFocus (TBool state) = 0;
00125 
00127         virtual tresult PLUGIN_API setFrame (IPlugFrame* frame) = 0;
00128 
00130         virtual tresult PLUGIN_API canResize () = 0;
00131 
00133         virtual tresult PLUGIN_API checkSizeConstraint (ViewRect* rect) = 0;
00134 //------------------------------------------------------------------------
00135         static const FUID iid;
00136 };
00137 
00138 DECLARE_CLASS_IID (IPlugView, 0x5BC32507, 0xD06049EA, 0xA6151B52, 0x2B755B29)
00139 
00140 //------------------------------------------------------------------------
00144 //------------------------------------------------------------------------
00145 class IPlugFrame: public FUnknown
00146 {
00147 public:
00148 //------------------------------------------------------------------------
00150         virtual tresult PLUGIN_API resizeView (IPlugView* view, ViewRect* newSize) = 0;
00151 //------------------------------------------------------------------------
00152         static const FUID iid;
00153 };
00154 
00155 DECLARE_CLASS_IID (IPlugFrame, 0x367FAF01, 0xAFA94693, 0x8D4DA2A0, 0xED0882A3)
00156 
00157 } // namespace Steinberg
00158 
00159 #endif __iplugview__
Empty

Copyright ©2008 Steinberg Media Technologies. All Rights Reserved.