1wxGridCellRenderer(3)      Erlang Module Definition      wxGridCellRenderer(3)
2
3
4

NAME

6       wxGridCellRenderer - Functions for wxGridCellRenderer class
7

DESCRIPTION

9       This  class  is  responsible for actually drawing the cell in the grid.
10       You may pass it to the wxGridCellAttr (below) to change the  format  of
11       one  given cell or to wxGrid:setDefaultRenderer/2 to change the view of
12       all cells. This is an abstract class, and you will normally use one  of
13       the predefined derived classes or derive your own class from it.
14
15       See:  wxGridCellAutoWrapStringRenderer (not implemented in wx), wxGrid‐
16       CellBoolRenderer, wxGridCellDateTimeRenderer (not implemented  in  wx),
17       wxGridCellEnumRenderer  (not  implemented  in  wx), wxGridCellFloatRen‐
18       derer, wxGridCellNumberRenderer, wxGridCellStringRenderer
19
20       wxWidgets docs: wxGridCellRenderer
21

DATA TYPES

23       wxGridCellRenderer() = wx:wx_object()
24

EXPORTS

26       draw(This, Grid, Attr, Dc, Rect, Row, Col, IsSelected) -> ok
27
28              Types:
29
30                 This = wxGridCellRenderer()
31                 Grid = wxGrid:wxGrid()
32                 Attr = wxGridCellAttr:wxGridCellAttr()
33                 Dc = wxDC:wxDC()
34                 Rect =
35                     {X :: integer(),
36                      Y :: integer(),
37                      W :: integer(),
38                      H :: integer()}
39                 Row = Col = integer()
40                 IsSelected = boolean()
41
42              Draw the given cell on the provided DC inside the given  rectan‐
43              gle  using  the style specified by the attribute and the default
44              or selected state corresponding to the isSelected value.
45
46              This pure virtual function has a  default  implementation  which
47              will  prepare the DC using the given attribute: it will draw the
48              rectangle with the background colour from attr and set the  text
49              colour and font.
50
51       getBestSize(This, Grid, Attr, Dc, Row, Col) ->
52                      {W :: integer(), H :: integer()}
53
54              Types:
55
56                 This = wxGridCellRenderer()
57                 Grid = wxGrid:wxGrid()
58                 Attr = wxGridCellAttr:wxGridCellAttr()
59                 Dc = wxDC:wxDC()
60                 Row = Col = integer()
61
62              Get the preferred size of the cell for its contents.
63
64              This  method must be overridden in the derived classes to return
65              the minimal fitting size for displaying the content of the given
66              grid cell.
67
68              See:  GetBestHeight()  (not  implemented  in wx), GetBestWidth()
69              (not implemented in wx)
70
71
72
73wxWidgets team.                    wx 2.2.1              wxGridCellRenderer(3)
Impressum