]>
Commit | Line | Data |
---|---|---|
03817a5e MB |
1 | \section{\class{wxGridCellRenderer}}\label{wxgridcellrenderer} |
2 | ||
2eebb742 JS |
3 | %suppress the stupid gcc warning about the class having private dtor and |
4 | %no friends | |
5 | This class is responsible for actually drawing the cell | |
03817a5e MB |
6 | in the grid. You may pass it to the wxGridCellAttr (below) to change the |
7 | format of one given cell or to wxGrid::SetDefaultRenderer() to change the | |
2eebb742 | 8 | view of all cells. This is an abstract class, and you will normally use one of the |
03817a5e MB |
9 | predefined derived classes or derive your own class from it. |
10 | ||
03817a5e MB |
11 | \wxheading{Derived from} |
12 | ||
2eebb742 | 13 | wxGridCellWorker |
03817a5e MB |
14 | |
15 | \wxheading{Data structures} | |
16 | ||
17 | \latexignore{\rtfignore{\wxheading{Members}}} | |
18 | ||
03817a5e MB |
19 | \membersection{wxGridCellRenderer::Draw}\label{wxgridcellrendererdraw} |
20 | ||
21 | \func{void}{Draw}{\param{wxGrid\& }{grid}, \param{wxGridCellAttr\& }{attr}, \param{wxDC\& }{dc}, \param{const wxRect\& }{rect}, \param{int }{row}, \param{int }{col}, \param{bool }{isSelected}} | |
22 | ||
2eebb742 | 23 | Draw the given cell on the provided DC inside the given rectangle |
03817a5e MB |
24 | using the style specified by the attribute and the default or selected |
25 | state corresponding to the isSelected value. | |
03817a5e | 26 | |
2eebb742 JS |
27 | This pure virtual function has a default implementation which will |
28 | prepare the DC using the given attribute: it will draw the rectangle | |
29 | with the background colour from attr and set the text colour and font. | |
03817a5e MB |
30 | |
31 | \membersection{wxGridCellRenderer::GetBestSize}\label{wxgridcellrenderergetbestsize} | |
32 | ||
33 | \func{wxSize}{GetBestSize}{\param{wxGrid\& }{grid}, \param{wxGridCellAttr\& }{attr}, \param{wxDC\& }{dc}, \param{int }{row}, \param{int }{col}} | |
34 | ||
2eebb742 | 35 | Get the preferred size of the cell for its contents. |
03817a5e MB |
36 | |
37 | \membersection{wxGridCellRenderer::Clone}\label{wxgridcellrendererclone} | |
38 | ||
2eebb742 JS |
39 | \constfunc{wxGridCellRenderer*}{Clone}{\void} |
40 |