| 129 | return false; |
| 130 | } |
| 131 | bool Render(wxRect cell, wxDC* dc, int state) override |
| 132 | { |
| 133 | if(mValue.IsNull()) |
| 134 | return false; |
| 135 | //Duplicated from wxDataViewToggleRenderer |
| 136 | int flags = 0; |
| 137 | if (mValue.GetBool()) |
| 138 | flags |= wxCONTROL_CHECKED; |
| 139 | if (GetMode() != wxDATAVIEW_CELL_ACTIVATABLE || |
| 140 | !(GetOwner()->GetOwner()->IsEnabled() && GetEnabled())) |
| 141 | { |
| 142 | flags |= wxCONTROL_DISABLED; |
| 143 | } |
| 144 | wxSize size = cell.GetSize(); |
| 145 | size.IncTo(GetSize()); |
| 146 | cell.SetSize(size); |
| 147 | |
| 148 | wxRendererNative& renderer = wxRendererNative::Get(); |
| 149 | wxWindow* const win = GetOwner()->GetOwner(); |
| 150 | renderer.DrawCheckBox(win, *dc, cell, flags); |
| 151 | return true; |
| 152 | } |
| 153 | |
| 154 | wxSize GetSize() const override |
| 155 | { |