.TH wxGridCellRenderer 3erl "wx 2.4.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxGridCellRenderer \- Functions for wxGridCellRenderer class .SH DESCRIPTION .LP This class is responsible for actually drawing the cell in the grid\&. You may pass it to the \fIwxGridCellAttr\fR\& (below) to change the format of one given cell or to \fIwxGrid:setDefaultRenderer/2\fR\& to change the view of all cells\&. This is an abstract class, and you will normally use one of the predefined derived classes or derive your own class from it\&. .LP See: \fIwxGridCellAutoWrapStringRenderer\fR\& (not implemented in wx), \fIwxGridCellBoolRenderer\fR\&, \fIwxGridCellDateTimeRenderer\fR\& (not implemented in wx), \fIwxGridCellEnumRenderer\fR\& (not implemented in wx), \fIwxGridCellFloatRenderer\fR\&, \fIwxGridCellNumberRenderer\fR\&, \fIwxGridCellStringRenderer\fR\& .LP wxWidgets docs: wxGridCellRenderer .SH DATA TYPES .nf \fBwxGridCellRenderer()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B draw(This, Grid, Attr, Dc, Rect, Row, Col, IsSelected) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxGridCellRenderer() .br Grid = wxGrid:wxGrid() .br Attr = wxGridCellAttr:wxGridCellAttr() .br Dc = wxDC:wxDC() .br Rect = .br {X :: integer(), .br Y :: integer(), .br W :: integer(), .br H :: integer()} .br Row = Col = integer() .br IsSelected = boolean() .br .RE .RE .RS .LP Draw the given cell on the provided DC inside the given rectangle using the style specified by the attribute and the default or selected state corresponding to the isSelected value\&. .LP This pure virtual function has a default implementation which will prepare the DC using the given attribute: it will draw the rectangle with the background colour from attr and set the text colour and font\&. .RE .LP .nf .B getBestSize(This, Grid, Attr, Dc, Row, Col) -> .B {W :: integer(), H :: integer()} .br .fi .br .RS .LP Types: .RS 3 This = wxGridCellRenderer() .br Grid = wxGrid:wxGrid() .br Attr = wxGridCellAttr:wxGridCellAttr() .br Dc = wxDC:wxDC() .br Row = Col = integer() .br .RE .RE .RS .LP Get the preferred size of the cell for its contents\&. .LP This method must be overridden in the derived classes to return the minimal fitting size for displaying the content of the given grid cell\&. .LP See: \fIGetBestHeight()\fR\& (not implemented in wx), \fIGetBestWidth()\fR\& (not implemented in wx) .RE