void LayoutArray::matchColWidth(const int n1, const int n2) { resizeGrid(std::max(n1, n2) + 1, 0); const std::vector<int> widths = getSizes(0, LayoutType::DEF); const int s = std::max(widths[n1], widths[n2]); mSizes[0][n1] = s; mSizes[0][n2] = s; }
LayoutCell &LayoutArray::at(const int x, const int y, const int w, const int h) { resizeGrid(x + w, y + h); LayoutCell *&cell = mCells[y][x]; if (!cell) cell = new LayoutCell; return *cell; }
void StGeometryTest::stglResize() { StGLWidget::stglResize(); myPixelSize.x() = 2.0f / GLfloat(myRoot->getRectPx().width()); myPixelSize.y() = 2.0f / GLfloat(myRoot->getRectPx().height()); resizeGrid(myRoot->getRectPx()); // grid lines and circles (main test) resizeColor(); // color rectangles resizeBrightness(); // brightness rectangles }
CGUIimageGrid::CGUIimageGrid(int x, int y, int _cols, int _rows, int size) { GenName("ImageGrid",Count++); type = imageGrid; cols = _cols; rows = _rows; cellSize = size; SetPos(x,y,cols*cellSize,rows*cellSize); highlightColour = UIblue; selectColour = UIyellow; resizeGrid(); tilesheet = noTileset; selected = NONE; borderWidth = 1; cellScale = 1; }
void TfrmRetrieveMain::init( ) { resizeGrid( ); grdSamples->Cells[ SAMPLE ][ 0 ] = "Sample"; grdSamples->Cells[ CRYOVIAL ][ 0 ] = "Cryovial"; grdSamples->Cells[ ALIQUOT ][ 0 ] = "Aliquot"; grdSamples->Cells[ SITE ][ 0 ] = "Site"; grdSamples->Cells[ LOCATION ][ 0 ] = "Location"; grdSamples->Cells[ VESSEL ][ 0 ] = "Vessel"; grdSamples->Cells[ SHELF ][ 0 ] = "Shelf"; grdSamples->Cells[ STRUCTURE ][ 0 ] = "Structure"; grdSamples->Cells[ SLOT_POS ][ 0 ] = "Slot"; grdSamples->Cells[ OLD_POS ][ 0 ] = "Old pos"; grdSamples->Cells[ OLD_BOX ][ 0 ] = "Old box"; grdSamples->Cells[ NEW_BOX ][ 0 ] = "New box"; grdSamples->Cells[ NEW_POS ][ 0 ] = "New pos"; rows.clear( ); sortList.clear( ); updateDisplay( ); }
/** Resize the grid with the cell size set to the given number of pixels.*/ void CGUIimageGrid::setCellSize(int size) { cellSize = size; resizeGrid(); }
/** Resize the grid with the given number of columns. */ void CGUIimageGrid::setColumns(int newCols) { cols = newCols; resizeGrid(); }
/** Resize the grid with the given number of rows. */ void CGUIimageGrid::setRows(int newRows) { rows = newRows; resizeGrid(); }
void __fastcall TfrmRetrieveMain::FormResize( TObject *Sender ) { resizeGrid( ); updateDisplay( ); }
void LayoutArray::setColWidth(const int n, const int w) { resizeGrid(n + 1, 0); mSizes[0][n] = w; }
void LayoutArray::setRowHeight(const int n, const int h) { resizeGrid(0, n + 1); mSizes[1][n] = h; }