void FPropertyTable::Tick() { // Execute any deferred actions for( int32 ActionIndex = 0; ActionIndex < DeferredActions.Num(); ++ActionIndex ) { DeferredActions[ActionIndex].ExecuteIfBound(); } DeferredActions.Empty(); for( int32 ColumnIdx = 0; ColumnIdx < Columns.Num(); ColumnIdx++ ) { Columns[ColumnIdx]->Tick(); } if( bRefreshRequested ) { bRefreshRequested = false; PurgeInvalidObjectNodes(); UpdateRows(); if( Orientation == EPropertyTableOrientation::AlignPropertiesInRows ) { UpdateColumns(); } } }
bool HistList::Create(wxWindow* parent, wxWindowID id ) { bool res = wxListView::Create(parent, id, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_VIRTUAL | wxLC_SINGLE_SEL ); wxListItem col1; //wxListItem col2; //col1.SetColumn(0); col1.SetText(wxString(wxT("Last time"))); //col1.SetWidth(wxLIST_AUTOSIZE); col1.SetAlign(wxLIST_FORMAT_CENTRE); InsertColumn( 0, col1 ); col1.SetAlign(wxLIST_FORMAT_LEFT); col1.SetText(wxString(wxT("Book"))); InsertColumn( 1, col1 ); col1.SetText(wxString(wxT("Pos"))); InsertColumn( 2, col1 ); SetItemCount(20); UpdateColumns(); Update(); //SetColumnWidth(0, wxLIST_AUTOSIZE); //col1. //col2.SetColumn(1); //SetColumnWidth(1, wxLIST_AUTOSIZE); //SetColumn( 0, col1 ); //SetColumn( 1, col2 ); //SetColumn( 2, col3 ); return res; }
void FPropertyTable::SetOrientation( EPropertyTableOrientation::Type InOrientation ) { Orientation = InOrientation; UpdateColumns(); UpdateRows(); }
void FPropertyTable::SetObjects( const TArray< TWeakObjectPtr< UObject > >& Objects ) { SourceObjects.Empty(); SourceObjects.Append( Objects ); UpdateColumns(); UpdateRows(); }
int CColumnTreeWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CWnd::OnCreate(lpCreateStruct) == -1) { return -1; } // create tree and header controls as children m_Tree.Create(WS_CHILD | WS_VISIBLE | TVS_NOHSCROLL | TVS_NOTOOLTIPS, CRect(), this, TreeID); m_Header.Create(WS_CHILD | WS_VISIBLE | HDS_FULLDRAG, CRect(), this, HeaderID); // set correct font for the header CFont* pFont = m_Tree.GetFont(); m_Header.SetFont(pFont); // check if the common controls library version 6.0 is available BOOL bIsComCtl6 = FALSE; HMODULE hComCtlDll = LoadLibrary("comctl32.dll"); if (hComCtlDll) { typedef HRESULT (CALLBACK *PFNDLLGETVERSION)(DLLVERSIONINFO*); PFNDLLGETVERSION pfnDllGetVersion = (PFNDLLGETVERSION)GetProcAddress(hComCtlDll, "DllGetVersion"); if (pfnDllGetVersion) { DLLVERSIONINFO dvi; ZeroMemory(&dvi, sizeof(dvi)); dvi.cbSize = sizeof(dvi); HRESULT hRes = (*pfnDllGetVersion)(&dvi); if (SUCCEEDED(hRes) && dvi.dwMajorVersion >= 6) { bIsComCtl6 = TRUE; } } FreeLibrary(hComCtlDll); } // calculate correct header's height CDC* pDC = GetDC(); pDC->SelectObject(pFont); CSize szExt = pDC->GetTextExtent("A"); m_cyHeader = szExt.cy + (bIsComCtl6 ? 7 : 4); ReleaseDC(pDC); // offset from column start to text start m_xOffset = bIsComCtl6 ? 9 : 6; m_xPos = 0; UpdateColumns(); return 0; }
void CColumnTreeView::OnHeaderItemChanged(NMHDR* pNMHDR, LRESULT* pResult) { UNREFERENCED_PARAMETER( pResult ); UNREFERENCED_PARAMETER( pNMHDR ); UpdateColumns(); m_Tree.Invalidate(); }
void HistList::SetRecords(LVPtrVector<CRFileHistRecord> & records ) { if ( _records ) delete _records; _records = new LVPtrVector<CRFileHistRecord>( records ); SetItemCount(_records->length()); UpdateColumns(); if ( GetItemCount()>0 ) { Select(0); } }
void FPropertyTable::SetObjects( const TArray< UObject* >& Objects ) { SourceObjects.Empty(); for( auto ObjectIter = Objects.CreateConstIterator(); ObjectIter; ++ObjectIter ) { SourceObjects.Add( *ObjectIter ); } UpdateColumns(); UpdateRows(); }
void FPropertyTable::SetRootPath( const TSharedPtr< FPropertyPath >& Path ) { if ( Path.IsValid() ) { RootPath = Path.ToSharedRef(); } else { RootPath = FPropertyPath::CreateEmpty(); } RootPathChanged.Broadcast(); UpdateRows(); UpdateColumns(); }
void CColumnTreeView::OnHeaderItemChanged(NMHDR* /*pNMHDR*/, LRESULT* /*pResult*/) { UpdateColumns(); m_Tree.Invalidate(); }
void FPropertyTable::SetShowObjectName( const bool InShowObjectName ) { ShowObjectName = InShowObjectName; UpdateColumns(); }
void FPropertyTable::SetShowRowHeader( const bool InShowRowHeader ) { ShowRowHeader = InShowRowHeader; UpdateColumns(); }