Log Message:
-----------
get/put_Transparent properties for views, added a protection clause for put_Alpha if views are transparent
Modified Files:
--------------
/cvsroot/decaldev/source/Inject:
Inject.idl
View.cpp
View.h
Revision Data
-------------
Index: Inject.idl
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/Inject.idl,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- Inject.idl 17 Sep 2003 23:10:06 -0000 1.39
+++ Inject.idl 17 Sep 2003 23:20:18 -0000 1.40
@@ -623,6 +623,8 @@
[propput, helpstring("property Alpha")] HRESULT Alpha(long Alpha);
[propget, helpstring("property Activated")] HRESULT Activated([out, retval] VARIANT_BOOL* pVal);
[propput, helpstring("property Activated")] HRESULT Activated([in] VARIANT_BOOL newVal);
+ [propget, helpstring("property Transparent")] HRESULT Transparent([out, retval] VARIANT_BOOL* pVal);
+ [propput, helpstring("property Transparent")] HRESULT Transparent([in] VARIANT_BOOL newVal);
};
[
Index: View.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/View.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- View.cpp 17 Sep 2003 23:10:06 -0000 1.20
+++ View.cpp 17 Sep 2003 23:20:18 -0000 1.21
@@ -428,6 +428,9 @@
STDMETHODIMP cView::put_Alpha(long Alpha)
{
+ if( m_bTransparent )
+ return S_FALSE;
+
m_VP.alpha = Alpha;
long nActiveView;
@@ -453,3 +456,32 @@
else
return Activate();
}
+
+STDMETHODIMP cView::get_Transparent(VARIANT_BOOL *pVal)
+{
+ *pVal = ( m_bTransparent ? VARIANT_TRUE : VARIANT_FALSE );
+ return S_OK;
+}
+
+STDMETHODIMP cView::put_Transparent(VARIANT_BOOL newVal)
+{
+ if( newVal == VARIANT_FALSE )
+ {
+ m_bTransparent = false;
+ m_VP.alpha = -1;
+ }
+
+ else
+ {
+ m_bTransparent = true;
+ m_VP.alpha = 255;
+
+ long nActiveView;
+ m_pPanel->get_ActiveView( &nActiveView );
+
+ if( nActiveView == m_nViewID )
+ m_pPanel->ActivateView(m_nViewID, &m_VP, (long*)this);
+ }
+
+ return S_OK;
+}
\ No newline at end of file
Index: View.h
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/View.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- View.h 17 Sep 2003 23:10:06 -0000 1.10
+++ View.h 17 Sep 2003 23:20:18 -0000 1.11
@@ -81,6 +81,8 @@
STDMETHOD(put_Alpha)(long Alpha);
STDMETHOD(get_Activated)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_Activated)(/*[in]*/ VARIANT_BOOL newVal);
+ STDMETHOD(get_Transparent)(/*[out, retval]*/ VARIANT_BOOL *pVal);
+ STDMETHOD(put_Transparent)(/*[in]*/ VARIANT_BOOL newVal);
};
#endif //__VIEW_H_
|