xsi_griddata.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSIGRIDDATA_H__
00018 #define __XSIGRIDDATA_H__
00019 
00020 #include <xsi_base.h>
00021 #include <xsi_ppgitem.h>
00022 #include <xsi_value.h>
00023 #include <xsi_bitarray.h>
00024 
00025 namespace XSI {
00026 struct CColor ;
00027 //*****************************************************************************
00180 //*****************************************************************************
00181 
00182 class GridWidget ;
00183 
00184 class SICPPSDKDECL GridData : public CBase
00185 {
00186 public:
00188     GridData();
00189 
00191     ~GridData();
00192 
00196     GridData(const CRef& in_ref);
00197 
00201     GridData(const GridData& in_obj);
00202 
00207     bool IsA( siClassID in_ClassID) const;
00208 
00212     siClassID GetClassID() const;
00213 
00218     GridData& operator=(const GridData& in_obj);
00219 
00225     GridData& operator=(const CRef& in_ref);
00226 
00231     CValueArray GetData() const;
00232 
00239     CStatus PutData( const CValueArray& in_items ) ;
00240 
00246     CStatus PutColumnCount( LONG in_val );
00247 
00251     LONG GetColumnCount() const ;
00252 
00258     CStatus PutRowCount( LONG in_val ) ;
00259 
00263     LONG GetRowCount() const ;
00264 
00272     CStatus PutCell(LONG in_Column, LONG in_Row, const CValue& in_CellValue);
00273 
00282     CStatus PutCell(const CString& in_ColumnLabel, const CString& in_RowLabel, const CValue& in_CellValue);
00283 
00290     CValue GetCell(LONG in_Column, LONG in_Row) const;
00291 
00301     CValue GetCell(const CString& in_ColumnLabel, const CString& in_RowLabel) const;
00307     CStatus PutColumnValues( LONG in_Column, const CValueArray & in_ColumnItems );
00313     CStatus PutColumnValues( const CString& in_ColumnLabel, const CValueArray & in_ColumnItems );
00314 
00319     CValueArray GetColumnValues(LONG in_Column ) const ;
00320 
00325     CValueArray GetColumnValues(const CString& in_ColumnLabel ) const ;
00326 
00332     CStatus PutRowValues( LONG in_Row, const CValueArray & in_RowItems );
00333 
00339     CStatus PutRowValues( const CString& in_RowLabel, const CValueArray & in_RowItems );
00340 
00345     CValueArray GetRowValues(LONG in_Row ) const ;
00346 
00351     CValueArray GetRowValues(const CString& in_RowLabel ) const ;
00352 
00361     CStatus PutRowLabel(LONG in_RowIndex, const CString& in_RowLabel );
00362 
00368     CString GetRowLabel(LONG in_RowIndex) const;
00369 
00378     CStatus PutColumnLabel(LONG in_ColumnIndex, const CString& in_ColumnLabel);
00379 
00385     CString GetColumnLabel(LONG in_ColumnIndex) const;
00386 
00393     CStatus BeginEdit();
00394 
00400     CStatus EndEdit();
00401 
00409     CStatus PutColumnType(LONG in_ColumnIndex, siGridWidgetColumnType in_Type );
00410 
00416     siGridWidgetColumnType GetColumnType( LONG in_ColumnIndex ) const;
00417 
00426     CStatus PutColumnComboItems(LONG in_ColumnIndex, const CValueArray& in_Items);
00427 
00433     CValueArray GetColumnComboItems(LONG in_ColumnIndex);
00434 
00440     GridWidget GetGridWidget() ;
00441 
00449     CStatus SetRowBackgroundColor( LONG in_Row, const CColor &in_Color );
00450 
00456     CColor GetRowBackgroundColor(LONG in_Row );
00457 
00466     CStatus SetIntColumnDef( LONG in_lColumnIndex, LONG in_lMin = INT_MIN, LONG in_lMax = INT_MAX, LONG in_lInc = 1 );
00467 
00476     CStatus GetIntColumnDef( LONG in_lColumnIndex, LONG &out_lMin, LONG &out_lMax, LONG &out_lInc ) const;
00477 
00487     CStatus SetFloatColumnDef( LONG in_lColumnIndex, double in_dMin = DBL_MIN, double in_dMax = DBL_MAX, double in_dInc = 1.0, short in_sDecimal = 2 ) ;
00488 
00498     CStatus GetFloatColumnDef( LONG in_lColumnIndex, double &out_dMin, double &out_dMax, double &out_dInc, short &out_sDecimal ) const;
00499 
00510     CStatus SetVectorColumnDef( LONG in_lColumnIndex, short in_sVectorSize, double in_dMin = DBL_MIN, double in_dMax = DBL_MAX, double in_dInc = 1.0, short in_sDecimal = 2 ) ;
00511 
00522     CStatus GetVectorColumnDef( LONG in_lColumnIndex, short &out_sVectorSize, double &out_dMin, double &out_dMax, double &out_dInc, short &out_sDecimal ) const;
00523 
00532     CStatus SetFileColumnDef( LONG in_lColumnIndex, const CString &in_csBrowseType = "File", const CString &in_csStartupPath = "/", const CString &in_csFilter = ".*" ) ;
00533 
00542     CStatus GetFileColumnDef( LONG in_lColumnIndex, CString& out_csBrowseType, CString& out_csStartupPath, CString& out_csFilter ) const;
00543 
00550     CStatus SetShaderBallColumnDef( LONG in_lColumnIndex, LONG in_lThumbnailSize = 28 ) ;
00551 
00558     CStatus GetShaderBallColumnDef( LONG in_lColumnIndex, LONG &out_lThumbnailSize ) const;
00559 
00565     CStatus SetImageClipColumnDef( LONG in_lColumnIndex, LONG in_lThumbnailSize = 28 );
00566 
00572     CStatus GetImageClipColumnDef( LONG in_lColumnIndex, LONG &out_lThumbnailSize ) const;
00573 
00579     CStatus InsertRow( LONG in_lRowIndex ) ;
00580 
00586     CStatus RemoveRow( LONG in_lRowIndex ) ;
00587 
00593     CStatus InsertColumn( LONG in_lColumnIndex ) ;
00594 
00600     CStatus RemoveColumn( LONG in_lColumnIndex ) ;
00601 
00609     CStatus SetCellBackgroundColor( LONG in_lCol, LONG in_lRow, const CColor &in_Color ) ;
00610 
00617     CColor GetCellBackgroundColor( LONG in_lCol, LONG in_lRow ) const ;
00618 
00625     CStatus SetColumnsVisibility( const CLongArray &in_alCols, bool in_bVisible ) ;
00626 
00633     CStatus SetRowsVisibility( const CLongArray &in_alRows, bool in_bVisible ) ;
00634 
00641     CStatus SetCellReadOnlyFlags( const CLongArray &in_alCells, bool in_bROFlag ) ;
00642 
00649     CStatus GetCellReadOnlyFlags( const CLongArray &in_alCells, CBitArray &out_aROFlags ) const;
00650 
00656     CStatus PutMultiSelectionMode( XSI::siGridDataMultiSelectionMode in_eSelectionMode ) ;
00657 
00662     XSI::siGridDataMultiSelectionMode GetMultiSelectionMode() const;
00663 
00669     CStatus PutReadOnly( bool in_bROFlag ) ;
00670 
00675     bool GetReadOnly() const;
00676 
00677 private:
00678 
00679     GridData * operator&() const;
00680     GridData * operator&();
00681 };
00682 
00683 };
00684 #endif // __XSIGRIDDATA_H__