Example #1
0
    void ObjectLink::SetProperty(Int32 propOffset, Char newValue)
    {
	    char* pVal = (char*)(((Byte*)mGDObject) + propOffset);
	    *pVal = newValue;

	    NotifyPropertyChanged("");
    }
NS_IMETHODIMP nsAbMDBDirectory::OnListEntryChange
(uint32_t abCode, nsIAbDirectory *list)
{
  nsresult rv = NS_OK;
  
  if (abCode == AB_NotifyPropertyChanged && list)
  {
    bool bIsMailList = false;
    rv = list->GetIsMailList(&bIsMailList);
    NS_ENSURE_SUCCESS(rv,rv);
    
    nsCOMPtr<nsIAbMDBDirectory> dblist(do_QueryInterface(list, &rv));
    NS_ENSURE_SUCCESS(rv,rv);

    if (bIsMailList) {
      nsString listName;
      rv = list->GetDirName(listName);
      NS_ENSURE_SUCCESS(rv,rv);

      rv = NotifyPropertyChanged(list, "DirName", nullptr, listName.get());
      NS_ENSURE_SUCCESS(rv,rv);
    }
  }
  return rv;
}
Example #3
0
    void ObjectLink::SetProperty(Int32 propOffset, Int64 newValue)
    {
	    Int64* pVal = (Int64*)(((Byte*)mGDObject) + propOffset);
	    *pVal = newValue;

	    NotifyPropertyChanged("");
    }
Example #4
0
    void ObjectLink::SetProperty(Int32 propOffset, Double newValue)
    {
	    double* pVal = (double*)(((Byte*)mGDObject) + propOffset);
	    *pVal = newValue;

	    NotifyPropertyChanged("");
    }
Example #5
0
    void ObjectLink::SetProperty(Int32 propOffset, Boolean newValue)
    {
	    bool* pVal = (bool*)(((Byte*)mGDObject) + propOffset);
	    *pVal = newValue;

	    NotifyPropertyChanged("");
    }
Example #6
0
    void ObjectLink::SetProperty(Int32 propOffset, UInt16 newValue)
    {
	    UInt16* pVal = (UInt16*)(((Byte*)mGDObject) + propOffset);
	    *pVal = newValue;

	    NotifyPropertyChanged("");
    }
Example #7
0
    void ObjectLink::SetProperty(Int32 propOffset, Single newValue)
    {
	    float* pVal = (float*)(((Byte*)mGDObject) + propOffset);
	    *pVal = newValue;

	    NotifyPropertyChanged("");
    }
Example #8
0
BOOL EPropWnd::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	int nBeg;
	int nEnd;
	GetIDRange(nBeg,nEnd);

//	TRACE("PropView wParam=%d lParam=%d!\n" , wParam , lParam );

	int nCommandID           = LOWORD(wParam);	//command of menu, control or accelerator
	int nNotificationMessage = HIWORD(wParam);	//notification message if this is from a control

	bool bMessageIsFromAccelerator = (HIWORD(wParam)==1);
	bool bMessageIsFromMenu        = (HIWORD(wParam)==0);
	bool bMessageFromControl       = (bMessageIsFromAccelerator==false) && (bMessageIsFromMenu==false);

	if( bMessageFromControl )
	{
		int nControlThatSendTheMessage = lParam;
	}

	if( nNotificationMessage==0 )
	{
		if( nBeg <= nCommandID && nCommandID <= nEnd )
		{
			if( GetActiveProperty() != NULL )
			{
				bool bChanged = GetActiveProperty()->OnCommand(this,wParam,lParam);

				if( bChanged )
				{
					NotifyPropertyChanged();
				}

				Invalidate();

			}

			return TRUE;
		}
	}

	return CWnd::OnCommand(wParam, lParam);
}
void EGridCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
	SetCapture();

	m_MouseDownCP = point;

	bool bOnHeaderRow = ( 0<=point.y && point.y<GetHeaderRowHeight() );

	if( bOnHeaderRow )
	{
		m_pDragColumn = GetColumn(point.x,true);

		if( m_pDragColumn!=NULL )
		{
			SetCursor( LoadCursor(NULL,IDC_SIZEWE) );
		}
	}
	else
	{
		int nCol=-1;
		int nRow=-1;

		EProperty* pProperty = GetProperty( point , nCol , nRow );

		m_SeletectPropertyIndex.x = nCol;
		m_SeletectPropertyIndex.y = nRow;

		SetActiveProperty(pProperty);

		if( m_pActiveProperty != NULL )
		{
			if( m_pActiveProperty->OnLButtonDown( this , point ) )
			{
				NotifyPropertyChanged();
				Invalidate();
			}
		}
	}

}
void EPropWnd::SetActiveProperty( EProperty* pNewActiveProperty )
{
	if( pNewActiveProperty != m_pActiveProperty )
	{
		//
		// close old active (apply and close)
		//

		bool bChanged = false;

		if( m_pActiveProperty != NULL )
		{
			m_pActiveProperty->OnPropClose();	//causes killfocus on properties with cedit control!
		}

		//
		// set and activate
		//

		m_pActiveProperty = pNewActiveProperty;

		if( m_pActiveProperty != NULL )
		{
			m_pActiveProperty->OnPropActivate(this);
		}

		if(bChanged)
		{
			NotifyPropertyChanged();
		}

		Invalidate();								//only update this view (selection changed)

		if( m_pCommentPane != NULL )
		{
			m_pCommentPane->Invalidate();
		}

	}
}
void EPropWnd::OnDoPropApply()
{
	if( m_pActiveProperty != NULL )
	{
		if( m_pActiveProperty->IsEnabled() )
		{
			bool bChanged = m_pActiveProperty->OnPropApply();

			if( bChanged )
			{
				if( m_pActiveProperty->m_pParentHost!=NULL )
				{
					m_pActiveProperty->m_pParentHost->PropertyChanging( m_pActiveProperty->m_pProperty , NULL );
				}

				NotifyPropertyChanged();
			}

			Invalidate();
		}
	}
}
Example #12
0
void EPropWnd::ApplyActiveProperty()
{
	TR( _T("EPropWnd::ApplyActiveProperty()"),(GetActiveProperty()==NULL)?( _T("NULL") ):(GetActiveProperty()->GetName()));

	if( GetActiveProperty() != NULL )
	{
		if( GetActiveProperty()->IsEnabled() )
		{
			bool bChanged = GetActiveProperty()->OnPropApply();

			if( bChanged )
			{
				if( GetActiveProperty()->m_pParentHost!=NULL )
				{
					GetActiveProperty()->m_pParentHost->PropertyChanging( GetActiveProperty()->m_pProperty , NULL );
				}

				NotifyPropertyChanged();
			}

			Invalidate();
		}
	}
}
void MainWindowController::SetMakeFileLocation(BEntry& path)
{
	_makeFileLocation = path;
	NotifyPropertyChanged(kMakeFileProperty);	
}
void MainWindowController::RunMake()
{
	_errorsAndWarnings.clear();
	_runnerInterface->Run(_makeFileLocation);
	NotifyPropertyChanged(kErrorListProperty);
}
void EPropWnd::PropertyChanged()
{
	NotifyPropertyChanged();
}