Esempio n. 1
0
STDMETHODIMP CDrawTxt::put_AutoSize(VARIANT_BOOL newVal)
{
	m_bAutoSize = newVal != VARIANT_FALSE;
	FireViewChange();
	ReCalcBound();
	FireViewChange();
	return S_OK;
}
Esempio n. 2
0
STDMETHODIMP CDrawTxt::put_WordWrap(VARIANT_BOOL newVal)
{
	m_bWordWrap = newVal != VARIANT_FALSE;
	FireViewChange();
	ReCalcBound();
	FireViewChange();
	return S_OK;
}
Esempio n. 3
0
STDMETHODIMP CDrawTxt::put_FontStyle(enumFontStyle newVal)
{
	FireViewChange();
	m_lWeight = (newVal == FontStyleBold || newVal == FontStyleBoldItalic) ? FW_BOLD : FW_NORMAL;
	m_bItalic = (newVal == FontStyleItalic || newVal == FontStyleBoldItalic);
	ReCalcBound();
	FireViewChange();

	return S_OK;
}
Esempio n. 4
0
STDMETHODIMP CDrawTxt::put_FontName(CXFONTNAME newVal)
{
	if (m_bstrFontName == newVal)
		return S_OK;

	FireViewChange();
	m_bstrFontName = newVal;
	ReCalcBound();
	FireViewChange();

	return S_OK;
}
Esempio n. 5
0
STDMETHODIMP CDrawTxt::put_UnderLine(VARIANT_BOOL newVal)
{
	BOOL bUnderLine = (newVal != VARIANT_FALSE);
	if (m_bUnderLine == bUnderLine)
		return S_OK;

	FireViewChange();
	m_bUnderLine = bUnderLine;
	FireViewChange();

	return S_OK;
}
Esempio n. 6
0
STDMETHODIMP CDrawTxt::put_StrikeThrough(VARIANT_BOOL newVal)
{
	BOOL bStrikethrough = (newVal != VARIANT_FALSE);
	if (m_bStrikethrough == bStrikethrough)
		return S_OK;

	FireViewChange();
	m_bStrikethrough = bStrikethrough;
	FireViewChange();

	return S_OK;
}
Esempio n. 7
0
STDMETHODIMP CDrawTxt::put_HorizontalPosition(float newVal)
{
	if (m_rcPosition.left == newVal)
		return S_OK;

	FireViewChange();
	m_rcPosition.right = m_rcPosition.right - m_rcPosition.left + newVal;
	m_rcPosition.left = newVal;
	FireViewChange();

	return S_OK;
}
Esempio n. 8
0
STDMETHODIMP CDrawTxt::put_VerticalPosition(float newVal)
{
	if (m_rcPosition.top == newVal)
		return S_OK;

	FireViewChange();
	m_rcPosition.bottom = m_rcPosition.bottom - m_rcPosition.top + newVal;
	m_rcPosition.top = newVal;
	FireViewChange();

	return S_OK;
}
Esempio n. 9
0
STDMETHODIMP CDrawTxt::put_Caption(BSTR newVal)
{
	if (m_bstrCaption == newVal)
		return S_OK;
	
	FireViewChange();
	m_bstrCaption = newVal;
	ReCalcBound();
	FireViewChange();
	
	return S_OK;
}
Esempio n. 10
0
//暂时以象素为单位
STDMETHODIMP CDrawTxt::put_FontSize(long newVal)
{
	FireViewChange();

	HDC hDC = ::GetDC(NULL);
	m_dFontHeight = MulDiv(newVal, GetDeviceCaps(hDC, LOGPIXELSY), 72);
	m_dFontWidth = 0;
	::ReleaseDC(NULL, hDC);
	
	ReCalcBound();
	FireViewChange();

	return S_OK;
}
Esempio n. 11
0
STDMETHODIMP CDrawMenu::put_ButtonDisplayed(/*[in] */VARIANT_BOOL newVal)
{
	m_bButtonDisplayed = (newVal != VARIANT_FALSE);
	FireViewChange();
	
	return S_OK;
}
Esempio n. 12
0
STDMETHODIMP CDrawTxt::put_Height(float newVal)
{
	if (newVal < 0)
		return S_FALSE;
	
	if (m_rcPosition.bottom == m_rcPosition.top + newVal)
		return S_OK;
	
	FireViewChange();
	m_rcPosition.bottom = m_rcPosition.top + newVal;
	if (m_bAutoSize)
		ReCalcFontSize(m_dFontHeight, m_dFontWidth);
	FireViewChange();

	return S_OK;
}
Esempio n. 13
0
STDMETHODIMP CLX3DViewer::replaceWorld(ILX3DScene *scene)
{
	ATLASSERT(0);
	return E_NOTIMPL;
#if 0
	m_viewpointStack.RemoveAll();
	m_navigationinfoStack.RemoveAll();

	if (m_scene)
	{
		m_scene->Release();
		m_scene = NULL;
	}

	m_scene = static_cast<CComObject<CLSAIScene>*>(scene);

	if (m_scene)
	{
		InitStacks();
	}

	FireViewChange();
#endif

	return S_OK;
}
Esempio n. 14
0
LRESULT CLX3DViewer::OnAdvance(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	//AdvancePlay();
	//UpdateAllViews();
	//MessageBeep(-1);
#if 0	// TODO, have something like this

	for (int i = 0; i < m_scene->m_nodes.GetSize(); i++)
	{
		CComQIPtr<CLX3DNodeImplImpl> node(m_scene->m_nodes[i]);

		CComQIPtr<ILX3DTimeDependentNode> timeDependant = node;
		if (timeDependant)
		{
			node->DoTime(m_currentVideoTime);
		}
	}
#endif

	FireViewChange();

#if 0	// TODO, have something like this
	DWORD currentTime = GetTickCount();

	m_currentSpeed = 1000.0/(currentTime-oldTime);
	oldTime = currentTime;
#endif

	return 0;
}
Esempio n. 15
0
LRESULT CLX3DViewer::OnBrowserDisplayPoints(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
#if 0
	m_display = 3;
	FireViewChange();
#endif
	return 0;
}
Esempio n. 16
0
void CGifSmileyCtrl::OnBackColorChanged()
{
	if ( (m_clrBackColor&0xFF000000)==0xFF000000) 
		m_bTransparent=true;
	else
		m_bTransparent=false;
	FireViewChange();
}
STDMETHODIMP CMyControl::put_Shape(int newVal)
{
   // store newVal in m_nShape user-defined member
   m_nShape = newVal;

   // notify container to redraw control
   FireViewChange();
   return S_OK;
}
Esempio n. 18
0
STDMETHODIMP CDrawTxt::put_BackStyle(enumBackStyle newVal)
{
	if (m_bsBackStyle == newVal)
		return S_OK;

	m_bsBackStyle = newVal;
	FireViewChange();

	return S_OK;
}
Esempio n. 19
0
STDMETHODIMP CDrawMenu::OnMouseLeave()
{
	if (m_bMouseOn)
	{
		m_bMouseOn = FALSE;
		FireViewChange();
	}

	return ICxDrawObjectImpl<CDrawMenu>::OnMouseLeave();
}
Esempio n. 20
0
STDMETHODIMP CDrawTxt::put_FontColor(OLE_COLOR newVal)
{
	if (m_clrForeColor == newVal)
		return S_OK;

	m_clrForeColor = newVal;
	FireViewChange();

	return S_OK;
}
Esempio n. 21
0
STDMETHODIMP CPolyCtl::put_Sides(short newVal)
{
	if (newVal > 2 && newVal < 101)
	{
		m_nSides = newVal;
		FireViewChange();
		return S_OK;
	}
	else
		return Error(_T("Shape must have between 3 and 100 sides"));
}
Esempio n. 22
0
STDMETHODIMP CDrawTxt::put_Alignment(enumTextAlign newVal)
{
	if (m_nTextAlign == newVal)
		return S_OK;

	m_nTextAlign = newVal;

	FireViewChange();

	return S_OK;
}
Esempio n. 23
0
/*! set the new cards value on deck
// \param long newVal : 
*/
STDMETHODIMP CAxJpgCard::put_NumCardOnDeck(long newVal)
{
    if (newVal >= 0 && newVal <= CS_MAXDECK)
    {
	    m_lNumMazzoItems = newVal;
        FireViewChange();
    }
    else
        return E_INVALIDARG;

	return S_OK;
}
Esempio n. 24
0
STDMETHODIMP CDispCtl::OnTransmit(VARIANT data)
{
	if(data.vt == VT_BSTR)
	{
		VariantClear(&m_OutText);
		HRESULT hr = VariantCopy(&m_OutText, &data);
		if (hr != S_OK)
		{
			return hr;
		}
	}
	FireViewChange();
	return S_OK;
}
Esempio n. 25
0
/*! Add a new status
// \param LP_CARDSHOWSTATUS pVal : 
*/
STDMETHODIMP CAxJpgCard::put_CardStatus(LP_CARDSHOWSTATUS pVal)
{
    if (pVal != NULL)
    {
        m_eCardStatus = *pVal;
        m_bCreatedRot = false;
        if (m_eOldStatus == CSW_ST_INVISIBLE)
        {
                            // control was hidden, restore it
            DoVerbShow(&m_rc, m_hWnd);
            
        }
        FireViewChange();
    }
    return S_OK;
}
Esempio n. 26
0
/*! New Index for bitmap  card
// \param long newVal : 
*/
STDMETHODIMP CAxJpgCard::put_CardIndex(long newVal)
{
    if (newVal >= 0 && newVal < CS_MAXINDEX)
    {
        m_lCardIndex = newVal;
        m_hCurrentImage = g_ImageHandle[m_lCardIndex];
        OLE_HANDLE hOleHandle;
        m_hCurrentImage->get_Handle(&hOleHandle);  
        m_hCurrentBitmap = (HBITMAP)hOleHandle;
        _ASSERT(m_hCurrentImage != 0);
        FireViewChange();
        
    }
    
    return S_OK;
}
Esempio n. 27
0
STDMETHODIMP CDispCtl::Disconnect()
{
	if(m_bConnected){
		HRESULT hr = DispEventUnadvise(m_pIServ); 
		((IUnknown*)m_pIServ)->Release();
		if(hr == S_OK)
		{
			m_bConnected = FALSE;
			SysFreeString(m_OutText.bstrVal);
			m_OutText.bstrVal = SysAllocString(L"Disconnected");
			FireViewChange();
		}
		return hr;
	}
	return S_OK;
}
Esempio n. 28
0
STDMETHODIMP CDispCtl::Connect()
{
	if(!m_bConnected){
		HRESULT hr = CoCreateInstance(CLSID_DispServ, NULL, CLSCTX_ALL ,IID_IDispServ, (void **)&m_pIServ);
		AtlGetObjectSourceInterface(m_pIServ, &m_libid, &m_iid, &m_wMajorVerNum, &m_wMinorVerNum);
		hr = DispEventAdvise(m_pIServ, &m_iid); 
		if(hr == S_OK)
		{
			m_bConnected = TRUE;
			SysFreeString(m_OutText.bstrVal);
			m_OutText.bstrVal = SysAllocString(L"Connected");
			FireViewChange();
		}
		return hr;
	}
	return S_OK;
}
Esempio n. 29
0
LRESULT CLX3DViewer::OnBrowserHeadlight(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
#if 0
	if (m_navigationinfoStack.GetSize() > 0)
	{
		CLNavigationInfo* pNavigationInfo = static_cast<CLNavigationInfo*>(m_navigationinfoStack[0]);

		CLSFBool* pHeadlight = static_cast<CLSFBool*>(pNavigationInfo->m_headlight);

		// Toggle headlight
		if (pHeadlight->m_value)
			pHeadlight->m_value = false;
		else
			pHeadlight->m_value = true;

		FireViewChange();
	}
#endif
	return 0;
}
Esempio n. 30
0
void CGifSmileyCtrl::OnTimer()
{
	m_nTimerId=NULL;
	m_nCurrentFrame=(m_nCurrentFrame+1)%m_nFrameCount;
	FireViewChange();
}