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

Lines Matching defs:grid

2 // Name:        src/generic/grid.cpp
7 // RCS-ID: $Id: grid.cpp 66945 2011-02-17 15:01:48Z JS $
21 #include "wx/grid.h"
44 const wxChar wxGridNameStr[] = wxT("grid");
150 // common base class for various grid subwindows
285 wxGridCellEditorEvtHandler(wxGrid* grid, wxGridCellEditor* editor)
286 : m_grid(grid),
455 // TODO: this doesn't work at all, grid cells have different sizes and approx
752 void wxGridCellTextEditor::BeginEdit(int row, int col, wxGrid* grid)
756 m_startValue = grid->GetTable()->GetValue(row, col);
769 bool wxGridCellTextEditor::EndEdit(int row, int col, wxGrid* grid)
779 grid->GetTable()->SetValue(row, col, value);
929 void wxGridCellNumberEditor::BeginEdit(int row, int col, wxGrid* grid)
932 wxGridTableBase *table = grid->GetTable();
962 wxGrid* grid)
979 const wxString textOld(grid->GetCellValue(row, col));
998 wxGridTableBase * const table = grid->GetTable();
1134 void wxGridCellFloatEditor::BeginEdit(int row, int col, wxGrid* grid)
1137 wxGridTableBase * const table = grid->GetTable();
1160 bool wxGridCellFloatEditor::EndEdit(int row, int col, wxGrid* grid)
1163 textOld(grid->GetCellValue(row, col));
1184 wxGridTableBase * const table = grid->GetTable();
1418 void wxGridCellBoolEditor::BeginEdit(int row, int col, wxGrid* grid)
1423 if (grid->GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL))
1425 m_startValue = grid->GetTable()->GetValueAsBool(row, col);
1429 wxString cellval( grid->GetTable()->GetValue(row, col) );
1450 wxGrid* grid)
1462 wxGridTableBase * const table = grid->GetTable();
1608 void wxGridCellChoiceEditor::BeginEdit(int row, int col, wxGrid* grid)
1621 m_startValue = grid->GetTable()->GetValue(row, col);
1650 wxGrid* grid)
1656 grid->GetTable()->SetValue(row, col, value);
1741 // if cell width is smaller than grid client area, cell is wholly visible
1863 void wxGridCellRenderer::Draw(wxGrid& grid,
1872 // grey out fields if the grid is disabled
1873 if ( grid.IsEnabled() )
1878 if ( wxWindow::FindFocus() == grid.GetGridWindow() )
1879 clr = grid.GetSelectionBackground();
1902 void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
1911 // different coloured text when the grid is disabled
1912 if ( grid.IsEnabled() )
1918 wx_const_cast(wxGrid&, grid).GetGridWindow() )
1919 clr = grid.GetSelectionBackground();
1923 dc.SetTextForeground( grid.GetSelectionForeground() );
1958 wxSize wxGridCellStringRenderer::GetBestSize(wxGrid& grid,
1963 return DoGetBestSize(attr, dc, grid.GetCellValue(row, col));
1966 void wxGridCellStringRenderer::Draw(wxGrid& grid,
1977 wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected);
1986 int cols = grid.GetNumberCols();
1987 int best_width = GetBestSize(grid,attr,dc,row,col).GetWidth();
1990 if ((best_width > rectCell.width) && (col < cols) && grid.GetTable())
1999 grid.GetCellSize(j, i, &c_rows, &c_cols);
2002 if (!grid.GetTable()->IsEmptyCell(j + c_rows, i))
2011 rect.width += grid.GetColSize(i);
2035 if (col_end >= grid.GetNumberCols())
2036 col_end = grid.GetNumberCols() - 1;
2039 clip.width = grid.GetColSize(i) - 1;
2043 SetTextColoursAndFont(grid, attr, dc,
2044 grid.IsInSelection(row,i));
2046 grid.DrawTextRectangle(dc, grid.GetCellValue(row, col),
2048 clip.x += grid.GetColSize(i) - 1;
2059 SetTextColoursAndFont(grid, attr, dc, isSelected);
2061 grid.DrawTextRectangle(dc, grid.GetCellValue(row, col),
2069 wxString wxGridCellNumberRenderer::GetString(const wxGrid& grid, int row, int col)
2071 wxGridTableBase *table = grid.GetTable();
2085 void wxGridCellNumberRenderer::Draw(wxGrid& grid,
2092 wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected);
2094 SetTextColoursAndFont(grid, attr, dc, isSelected);
2104 grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign);
2107 wxSize wxGridCellNumberRenderer::GetBestSize(wxGrid& grid,
2112 return DoGetBestSize(attr, dc, GetString(grid, row, col));
2135 wxString wxGridCellFloatRenderer::GetString(const wxGrid& grid, int row, int col)
2137 wxGridTableBase *table = grid.GetTable();
2188 void wxGridCellFloatRenderer::Draw(wxGrid& grid,
2195 wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected);
2197 SetTextColoursAndFont(grid, attr, dc, isSelected);
2207 grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign);
2210 wxSize wxGridCellFloatRenderer::GetBestSize(wxGrid& grid,
2215 return DoGetBestSize(attr, dc, GetString(grid, row, col));
2269 wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& grid,
2279 wxCheckBox *checkbox = new wxCheckBox(&grid, wxID_ANY, wxEmptyString);
2296 void wxGridCellBoolRenderer::Draw(wxGrid& grid,
2303 wxGridCellRenderer::Draw(grid, attr, dc, rect, row, col, isSelected);
2306 wxSize size = GetBestSize(grid, attr, dc, row, col);
2344 if ( grid.GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL) )
2346 value = grid.GetTable()->GetValueAsBool(row, col);
2350 wxString cellval( grid.GetTable()->GetValue(row, col) );
2573 // used, otherwise the default editor or renderer is fetched from the grid and
2575 // NULL (because the table has a type that the grid does not have in its
2576 // registry), then the grid's default editor or renderer is used.
2578 wxGridCellRenderer* wxGridCellAttr::GetRenderer(wxGrid* grid, int row, int col) const
2591 if ( grid )
2594 renderer = grid->GetDefaultRendererForCell(row, col);
2601 // if we still don't have one then use the grid default
2605 else // default grid attr
2622 wxGridCellEditor* wxGridCellAttr::GetEditor(wxGrid* grid, int row, int col) const
2635 if ( grid )
2638 editor = grid->GetDefaultEditorForCell(row, col);
2645 // if we still don't have one then use the grid default
2649 else // default grid attr
3298 wxFAIL_MSG( wxT("Called grid table class function InsertRows\nbut your derived table class does not override this function") );
3305 wxFAIL_MSG( wxT("Called grid table class function AppendRows\nbut your derived table class does not override this function"));
3313 wxFAIL_MSG( wxT("Called grid table class function DeleteRows\nbut your derived table class does not override this function"));
3321 wxFAIL_MSG( wxT("Called grid table class function InsertCols\nbut your derived table class does not override this function"));
3328 wxFAIL_MSG(wxT("Called grid table class function AppendCols\nbut your derived table class does not override this function"));
3336 wxFAIL_MSG( wxT("Called grid table class function DeleteCols\nbut your derived table class does not override this function"));
3439 // Message class for the grid table to send requests and notifications
3440 // to the grid view
3462 // A basic grid table for string data. An object of this class will
3706 wxFAIL_MSG( wxT("Unable to append cols to a grid table with no rows.\nCall AppendRows() first") );
4116 wxCLIP_CHILDREN, wxT("grid window") )
4192 // uses different colour when the grid is not focused:
4271 IMPLEMENT_DYNAMIC_CLASS_XTI(wxGrid, wxScrolledWindow,"wx/grid.h")
4346 // Ensure that the editor control is destroyed before the grid is,
4348 // half destroyed grid
4664 m_editable = true; // default for whole grid
4819 // this block of code tries to work around the following problem: the grid
4820 // could have been just resized to have enough space to show the full grid
4822 // not big enough because the grid has the scrollbars right now and so the
4830 // check if we have enough space for grid window after accounting for
4846 // the grid may be too small to have enough space for the labels yet, don't
4868 // this is called when the grid table sends a message
4928 // if we have just inserted cols into an empty grid the current
4973 // if we have just inserted cols into an empty grid the current
5091 // if we have just inserted cols into an empty grid the current
5150 // if we have just inserted cols into an empty grid the current
6004 wxLogTrace(_T("grid"),
6019 // by default use the grid itself
6405 // out of grid cell area
6704 // The behaviour of this function depends on the grid table class
6741 // operation to this view object as a grid table message
6763 // operation to this view object as a grid table message
6787 // operation to this view object as a grid table message
6811 // operation to this view object as a grid table message
6832 // operation to this view object as a grid table message
6856 // operation to this view object as a grid table message
6866 // Generate a grid event based on a mouse event and
6960 // Generate a grid event of specified type and return the result
7186 // at left of grid
7198 // at right of grid
7552 // all we need to do is repaint the grid
7784 // don't show highlight when the grid doesn't have focus
7898 // might have been damaged by the grid lines
7934 // This is used to redraw all grid lines e.g. when the grid line colour
7973 // avoid drawing grid lines past the last row and col
8040 // horizontal grid lines
8059 // vertical grid lines
8408 // repainting of the grid. Has no effect if you are already inside a
8656 // position can happen when the grid window gets a
8680 // return the focus to the grid itself if the editor had it
8734 // grid cells and labels so you will need to convert from device
8963 // if grid lines are enabled, then the area of the cell is a bit smaller
8985 // check against the client area of the grid window
9929 // access to the grid attributes: each of them has a default value in the grid
11269 // in device coords clipped to the client size of the grid window.
11334 // grid is scrolled downwards/to the right.
11395 // grid event classes