• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/samples/grid/

Lines Matching defs:grid

34 #include "wx/grid.h"
133 : wxFrame( (wxFrame *)NULL, wxID_ANY, _T("wxWidgets grid class demo"),
191 editMenu->Append( ID_CLEARGRID, _T("Cl&ear grid cell contents") );
234 grid = new wxGrid( this,
255 // this will create a grid and, by default, an associated grid
257 grid->CreateGrid( 0, 0 );
258 grid->AppendRows(100);
259 grid->AppendCols(100);
261 int ir = grid->GetNumberRows();
262 grid->DeleteRows(0, ir);
263 grid->AppendRows(ir);
265 grid->SetRowSize( 0, 60 );
266 grid->SetCellValue( 0, 0, _T("Ctrl+Home\nwill go to\nthis cell") );
268 grid->SetCellValue( 0, 1, _T("A long piece of text to demonstrate wrapping.") );
269 grid->SetCellRenderer(0 , 1, new wxGridCellAutoWrapStringRenderer);
270 grid->SetCellEditor( 0, 1 , new wxGridCellAutoWrapStringEditor);
272 grid->SetCellValue( 0, 2, _T("Blah") );
273 grid->SetCellValue( 0, 3, _T("Read only") );
274 grid->SetReadOnly( 0, 3 );
276 grid->SetCellValue( 0, 4, _T("Can veto edit this cell") );
278 grid->SetCellValue( 0, 5, _T("Press\nCtrl+arrow\nto skip over\ncells") );
280 grid->SetRowSize( 99, 60 );
281 grid->SetCellValue( 99, 99, _T("Ctrl+End\nwill go to\nthis cell") );
282 grid->SetCellValue( 1, 0, _T("This default cell will overflow into neighboring cells, but not if you turn overflow off."));
284 grid->SetCellTextColour(1, 2, *wxRED);
285 grid->SetCellBackgroundColour(1, 2, *wxGREEN);
287 grid->SetCellValue( 1, 4, _T("I'm in the middle"));
289 grid->SetCellValue(2, 2, _T("red"));
291 grid->SetCellTextColour(2, 2, *wxRED);
292 grid->SetCellValue(3, 3, _T("green on grey"));
293 grid->SetCellTextColour(3, 3, *wxGREEN);
294 grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY);
296 grid->SetCellValue(4, 4, _T("a weird looking cell"));
297 grid->SetCellAlignment(4, 4, wxALIGN_CENTRE, wxALIGN_CENTRE);
298 grid->SetCellRenderer(4, 4, new MyGridCellRenderer);
300 grid->SetCellRenderer(3, 0, new wxGridCellBoolRenderer);
301 grid->SetCellEditor(3, 0, new wxGridCellBoolEditor);
306 grid->SetColAttr(5, attr);
309 grid->SetRowAttr(5, attr);
311 grid->SetCellValue(2, 4, _T("a wider column"));
312 grid->SetColSize(4, 120);
313 grid->SetColMinimalWidth(4, 120);
315 grid->SetCellTextColour(5, 8, *wxGREEN);
316 grid->SetCellValue(5, 8, _T("Bg from row attr\nText col from cell attr"));
317 grid->SetCellValue(5, 5, _T("Bg from row attr Text col from col attr and this text is so long that it covers over many many empty cells but is broken by one that isn't"));
319 grid->SetColFormatFloat(6);
320 grid->SetCellValue(0, 6, _T("3.1415"));
321 grid->SetCellValue(1, 6, _T("1415"));
322 grid->SetCellValue(2, 6, _T("12345.67890"));
324 grid->SetColFormatFloat(7, 6, 2);
325 grid->SetCellValue(0, 7, _T("3.1415"));
326 grid->SetCellValue(1, 7, _T("1415"));
327 grid->SetCellValue(2, 7, _T("12345.67890"));
335 grid->SetCellEditor(4, 0, new wxGridCellChoiceEditor(WXSIZEOF(choices), choices));
336 grid->SetCellSize(4, 0, 1, 2);
337 grid->SetCellValue(4, 0, choices[0]);
338 grid->SetCellOverflow(4, 0, false);
340 grid->SetCellSize(7, 1, 3, 4);
341 grid->SetCellAlignment(7, 1, wxALIGN_CENTRE, wxALIGN_CENTRE);
342 grid->SetCellValue(7, 1, _T("Big box!"));
345 topSizer->Add( grid,
392 grid->SetRowLabelSize( grid->GetDefaultRowLabelSize() );
396 grid->SetRowLabelSize( 0 );
405 grid->SetColLabelSize( grid->GetDefaultColLabelSize() );
409 grid->SetColLabelSize( 0 );
416 grid->EnableEditing(
423 grid->EnableDragRowSize(
430 grid->EnableDragColSize(
436 grid->EnableDragColMove(
442 grid->EnableDragGridSize(
448 grid->EnableDragCell(
454 grid->EnableGridLines(
465 int current = grid->GetCellHighlightPenWidth();
468 grid->SetCellHighlightPenWidth(dlg.GetSelection());
479 int current = grid->GetCellHighlightROPenWidth();
482 grid->SetCellHighlightROPenWidth(dlg.GetSelection());
490 grid->AutoSizeColumns();
491 grid->Refresh();
496 grid->SetDefaultCellOverflow(ev.IsChecked());
497 grid->Refresh();
503 grid->SetCellSize( 7, 1, 5, 5 );
505 grid->SetCellSize( 7, 1, 1, 5 );
506 grid->Refresh();
518 grid->SetLabelBackgroundColour( colour );
532 grid->SetLabelTextColour( colour );
541 grid->SetLabelFont(font);
548 grid->GetRowLabelAlignment( &horiz, &vert );
565 grid->SetRowLabelAlignment( horiz, vert );
571 grid->GetRowLabelAlignment( &horiz, &vert );
588 grid->SetRowLabelAlignment( horiz, vert );
595 grid->GetColLabelAlignment( &horiz, &vert );
612 grid->SetColLabelAlignment( horiz, vert );
619 grid->GetColLabelAlignment( &horiz, &vert );
636 grid->SetColLabelAlignment( horiz, vert );
649 grid->SetGridLineColour( colour );
656 grid->InsertRows( grid->GetGridCursorRow(), 1 );
662 grid->InsertCols( grid->GetGridCursorCol(), 1 );
668 if ( grid->IsSelection() )
670 grid->BeginBatch();
671 for ( int n = 0; n < grid->GetNumberRows(); )
673 if ( grid->IsInSelection( n , 0 ) )
674 grid->DeleteRows( n, 1 );
678 grid->EndBatch();
685 if ( grid->IsSelection() )
687 grid->BeginBatch();
688 for ( int n = 0; n < grid->GetNumberCols(); )
690 if ( grid->IsInSelection( 0 , n ) )
691 grid->DeleteCols( n, 1 );
695 grid->EndBatch();
702 grid->ClearGrid();
707 grid->SetSelectionMode( wxGrid::wxGridSelectCells );
712 grid->SetSelectionMode( wxGrid::wxGridSelectRows );
717 grid->SetSelectionMode( wxGrid::wxGridSelectColumns );
725 grid->SetDefaultCellTextColour(col);
726 grid->Refresh();
736 // which exactly fits the grid.
738 wxRect r(pt, grid->GetSize());
739 grid->SetDefaultCellBackgroundColour(col);
740 grid->Refresh(true, &r);
746 grid->DeselectCell(3, 1);
751 grid->DeselectCol(2);
756 grid->DeselectRow(2);
761 grid->ClearSelection();
766 grid->SelectBlock(3, 1, 3, 1, m_addToSel);
771 grid->SelectCol(2, m_addToSel);
776 grid->SelectRow(2, m_addToSel);
781 grid->SelectAll();
811 // you must call event skip if you want default grid processing
821 // you must call event skip if you want default grid processing
851 switch ( grid->GetSelectionMode() )
855 const wxGridCellCoordsArray cells(grid->GetSelectedCells());
894 const wxArrayInt sels((rows ? grid->GetSelectedRows()
895 : grid->GetSelectedCols()));
972 row, col, grid->GetCellValue(row, col).c_str());
1044 wxGrid* grid = new wxGrid(panel, wxID_ANY, wxPoint(10,10), wxSize(400,400),
1046 grid->CreateGrid(3,3);
1086 void MyGridCellRenderer::Draw(wxGrid& grid,
1093 wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected);
1160 // MB: the grid isn't getting a sensible default size under wxMotif
1449 wxGrid *grid = new wxGrid(this, wxID_ANY, wxDefaultPosition);
1452 grid->SetTable(table, true);
1463 grid->SetColAttr(Col_Id, attrRO);
1464 grid->SetColAttr(Col_Priority, attrRangeEditor);
1465 grid->SetColAttr(Col_Severity, attrCombo);
1467 grid->Fit();
1468 SetClientSize(grid->GetSize());