本文整理汇总了C++中TSharedRef::GetColumn方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::GetColumn方法的具体用法?C++ TSharedRef::GetColumn怎么用?C++ TSharedRef::GetColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedRef
的用法示例。
在下文中一共展示了TSharedRef::GetColumn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SelectCellRange
void FPropertyTable::SelectCellRange( const TSharedRef< class IPropertyTableCell >& StartingCell, const TSharedRef< class IPropertyTableCell >& EndingCell )
{
SelectedColumns.Empty();
SelectedRows.Empty();
SelectedCells.Empty();
const int32 StartingCellRowIndex = Rows.Find( StartingCell->GetRow() );
const int32 EndingCellRowIndex = Rows.Find( EndingCell->GetRow() );
for (int RowIndex = StartingCellRowIndex; RowIndex < Rows.Num() && RowIndex <= EndingCellRowIndex; RowIndex++)
{
SelectedRows.Add( Rows[ RowIndex ] );
}
const int32 StartingCellColumnIndex = Columns.Find( StartingCell->GetColumn() );
const int32 EndingCellColumnIndex = Columns.Find( EndingCell->GetColumn() );
for (int ColumnsIndex = StartingCellColumnIndex; ColumnsIndex < Columns.Num() && ColumnsIndex <= EndingCellColumnIndex; ColumnsIndex++)
{
SelectedColumns.Add( Columns[ ColumnsIndex ] );
for( auto RowIter = SelectedRows.CreateConstIterator(); RowIter; ++RowIter )
{
SelectedCells.Add( Columns[ ColumnsIndex ]->GetCell( *RowIter ) );
}
}
if ( CurrentRow.IsValid() && !SelectedRows.Contains( CurrentRow.ToSharedRef() ) )
{
CurrentRow = NULL;
}
if ( CurrentColumn.IsValid() && !SelectedColumns.Contains( CurrentColumn.ToSharedRef() ) )
{
CurrentColumn = NULL;
}
StartingCellSelectionRange = StartingCell;
EndingCellSelectionRange = EndingCell;
if ( CurrentCell.IsValid() && !SelectedCells.Contains( CurrentCell.ToSharedRef() ) )
{
CurrentCell->ExitEditMode();
CurrentCell = NULL;
}
SelectionChanged.Broadcast();
}
示例2: SetSelectedRows
void FPropertyTable::SetSelectedRows( const TSet< TSharedRef< IPropertyTableRow > >& InSelectedRows )
{
SelectedColumns.Empty();
SelectedRows.Empty();
if ( !CanSelectRows() )
{
return;
}
SelectedRows.Append( InSelectedRows );
TSet< TSharedRef< IPropertyTableCell > > PreviouslySelectedCells( SelectedCells );
bool RemovedCells = false;
for( auto CellIter = PreviouslySelectedCells.CreateConstIterator(); CellIter; ++CellIter )
{
const TSharedRef< IPropertyTableCell > Cell = *CellIter;
if ( !SelectedRows.Contains( Cell->GetRow() ) )
{
SelectedCells.Remove( Cell );
SelectedColumns.Add( Cell->GetColumn() );
RemovedCells = true;
}
}
if ( RemovedCells )
{
StartingCellSelectionRange = NULL;
EndingCellSelectionRange = NULL;
}
if ( CurrentRow.IsValid() && !SelectedRows.Contains( CurrentRow.ToSharedRef() ) )
{
CurrentRow = NULL;
}
if ( CurrentColumn.IsValid() && !SelectedColumns.Contains( CurrentColumn.ToSharedRef() ) )
{
CurrentColumn = NULL;
}
if ( CurrentCell.IsValid() && !SelectedCells.Contains( CurrentCell.ToSharedRef() ) )
{
CurrentCell->ExitEditMode();
CurrentCell = NULL;
}
SelectionChanged.Broadcast();
}
示例3: ScanForRowWithCells
TSharedPtr< class IPropertyTableCell > FPropertyTable::GetPreviousCellInColumn( const TSharedRef< class IPropertyTableCell >& Cell )
{
const int32 FoundIndex = Rows.Find( Cell->GetRow() );
if ( FoundIndex == INDEX_NONE )
{
return NULL;
}
const int32 StartIndex = FoundIndex - 1;
const int32 Step = -1;
TSharedPtr< IPropertyTableRow > NextRow = ScanForRowWithCells( StartIndex, Step );
if ( !NextRow.IsValid() )
{
return NULL;
}
return Cell->GetColumn()->GetCell( NextRow.ToSharedRef() );
}
示例4: ScanForColumnWithSelectableCells
TSharedPtr< class IPropertyTableCell > FPropertyTable::GetPreviousCellInRow( const TSharedRef< class IPropertyTableCell >& Cell )
{
const int32 FoundIndex = Columns.Find( Cell->GetColumn() );
if ( FoundIndex == INDEX_NONE )
{
return NULL;
}
const int32 StartIndex = FoundIndex - 1;
const int32 Step = -1;
TSharedPtr< IPropertyTableColumn > PreviousColumn = ScanForColumnWithSelectableCells( StartIndex, Step );
if ( !PreviousColumn.IsValid() )
{
return NULL;
}
return PreviousColumn->GetCell( Cell->GetRow() );
}