| 233 | //----------------------------------------------------------------------------- |
| 234 | |
| 235 | void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect) |
| 236 | { |
| 237 | // The unmodified offset which was passed into this method. |
| 238 | const Point2I inOffset( offset ); |
| 239 | |
| 240 | //Parent::onRender( offset, updateRect ); |
| 241 | |
| 242 | // We render our fill, borders, and child controls ourself. |
| 243 | // This allows us to render child controls after we render cells, |
| 244 | // so child controls appear on-top, as they should. |
| 245 | |
| 246 | // Render our fill and borders. |
| 247 | // This code from GuiControl::onRender(). |
| 248 | { |
| 249 | RectI ctrlRect(offset, getExtent()); |
| 250 | |
| 251 | //if opaque, fill the update rect with the fill color |
| 252 | if ( mProfile->mOpaque ) |
| 253 | GFX->getDrawUtil()->drawRectFill(ctrlRect, mProfile->mFillColor); |
| 254 | |
| 255 | //if there's a border, draw the border |
| 256 | if ( mProfile->mBorder ) |
| 257 | renderBorder(ctrlRect, mProfile); |
| 258 | } |
| 259 | |
| 260 | //make sure we have a parent |
| 261 | GuiControl *parent = getParent(); |
| 262 | if (! parent) |
| 263 | return; |
| 264 | |
| 265 | S32 i, j; |
| 266 | RectI headerClip; |
| 267 | RectI clipRect(updateRect.point, updateRect.extent); |
| 268 | |
| 269 | Point2I parentOffset = parent->localToGlobalCoord(Point2I(0, 0)); |
| 270 | |
| 271 | //if we have column headings |
| 272 | if (mHeaderDim.y > 0) |
| 273 | { |
| 274 | headerClip.point.x = parentOffset.x + mHeaderDim.x; |
| 275 | headerClip.point.y = parentOffset.y; |
| 276 | headerClip.extent.x = clipRect.extent.x;// - headerClip.point.x; // This seems to fix some strange problems with some Gui's, bug? -pw |
| 277 | headerClip.extent.y = mHeaderDim.y; |
| 278 | |
| 279 | if (headerClip.intersect(clipRect)) |
| 280 | { |
| 281 | GFX->setClipRect(headerClip); |
| 282 | |
| 283 | //now render the header |
| 284 | onRenderColumnHeaders(offset, parentOffset, mHeaderDim); |
| 285 | |
| 286 | clipRect.point.y += headerClip.extent.y; |
| 287 | clipRect.extent.y -= headerClip.extent.y; |
| 288 | } |
| 289 | offset.y += mHeaderDim.y; |
| 290 | } |
| 291 | |
| 292 | //if we have row headings |
nothing calls this directly
no test coverage detected