1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/renderer.h
3 // Purpose: wxRenderer class declaration
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
13 wxRenderer class is used to draw all wxWindows controls. This is an ABC and
14 the look of the application is determined by the concrete derivation of
15 wxRenderer used in the program.
17 It also contains a few static methods which may be used by the concrete
18 renderers and provide the functionality which is often similar or identical
19 in all renderers (using inheritance here would be more restrictive as the
20 given concrete renderer may need an arbitrary subset of the base class
25 #pragma interface "renderer.h"
28 #ifndef _WX_UNIV_RENDERER_H_
29 #define _WX_UNIV_RENDERER_H_
31 class WXDLLEXPORT wxDC
;
32 class WXDLLEXPORT wxCheckListBox
;
33 class WXDLLEXPORT wxListBox
;
34 class WXDLLEXPORT wxMenu
;
35 class WXDLLEXPORT wxMenuGeometryInfo
;
36 class WXDLLEXPORT wxScrollBar
;
37 class WXDLLEXPORT wxTextCtrl
;
38 class WXDLLEXPORT wxWindow
;
40 class WXDLLEXPORT wxGauge
;
43 #include "wx/string.h"
44 #include "wx/gdicmn.h"
45 #include "wx/scrolbar.h" // for wxScrollBar::Element
47 // ----------------------------------------------------------------------------
48 // wxRenderer: abstract renderers interface
49 // ----------------------------------------------------------------------------
51 class WXDLLEXPORT wxRenderer
57 // draw the controls background
58 virtual void DrawBackground(wxDC
& dc
,
63 // draw the label inside the given rectangle with the specified alignment
64 // and optionally emphasize the character with the given index
65 virtual void DrawLabel(wxDC
& dc
,
66 const wxString
& label
,
69 int alignment
= wxALIGN_LEFT
| wxALIGN_TOP
,
71 wxRect
*rectBounds
= NULL
) = 0;
73 // same but also draw a bitmap if it is valid
74 virtual void DrawButtonLabel(wxDC
& dc
,
75 const wxString
& label
,
76 const wxBitmap
& image
,
79 int alignment
= wxALIGN_LEFT
| wxALIGN_TOP
,
81 wxRect
*rectBounds
= NULL
) = 0;
83 // draw the border and optionally return the rectangle containing the
84 // region inside the border
85 virtual void DrawBorder(wxDC
& dc
,
89 wxRect
*rectIn
= (wxRect
*)NULL
) = 0;
91 // draw text control border (I hate to have a separate method for this but
92 // it is needed to accomodate GTK+)
93 virtual void DrawTextBorder(wxDC
& dc
,
97 wxRect
*rectIn
= (wxRect
*)NULL
) = 0;
99 // draw push button border and return the rectangle left for the label
100 virtual void DrawButtonBorder(wxDC
& dc
,
103 wxRect
*rectIn
= (wxRect
*)NULL
) = 0;
105 // draw a horizontal line
106 virtual void DrawHorizontalLine(wxDC
& dc
,
107 wxCoord y
, wxCoord x1
, wxCoord x2
) = 0;
109 // draw a vertical line
110 virtual void DrawVerticalLine(wxDC
& dc
,
111 wxCoord x
, wxCoord y1
, wxCoord y2
) = 0;
113 // draw a frame with the label (horizontal alignment can be specified)
114 virtual void DrawFrame(wxDC
& dc
,
115 const wxString
& label
,
118 int alignment
= wxALIGN_LEFT
,
119 int indexAccel
= -1) = 0;
121 // draw an arrow in the given direction
122 virtual void DrawArrow(wxDC
& dc
,
127 // draw a scrollbar arrow (may be the same as arrow but may be not)
128 virtual void DrawScrollbarArrow(wxDC
& dc
,
133 // draw the scrollbar thumb
134 virtual void DrawScrollbarThumb(wxDC
& dc
,
135 wxOrientation orient
,
139 // draw a (part of) scrollbar shaft
140 virtual void DrawScrollbarShaft(wxDC
& dc
,
141 wxOrientation orient
,
145 // draw the rectangle in the corner between two scrollbars
146 virtual void DrawScrollCorner(wxDC
& dc
,
147 const wxRect
& rect
) = 0;
149 // draw an item of a wxListBox
150 virtual void DrawItem(wxDC
& dc
,
151 const wxString
& label
,
155 // draw an item of a wxCheckListBox
156 virtual void DrawCheckItem(wxDC
& dc
,
157 const wxString
& label
,
158 const wxBitmap
& bitmap
,
162 // draw a checkbutton (bitmap may be invalid to use default one)
163 virtual void DrawCheckButton(wxDC
& dc
,
164 const wxString
& label
,
165 const wxBitmap
& bitmap
,
168 wxAlignment align
= wxALIGN_LEFT
,
169 int indexAccel
= -1) = 0;
171 // draw a radio button
172 virtual void DrawRadioButton(wxDC
& dc
,
173 const wxString
& label
,
174 const wxBitmap
& bitmap
,
177 wxAlignment align
= wxALIGN_LEFT
,
178 int indexAccel
= -1) = 0;
180 // draw a (part of) line in the text control
181 virtual void DrawTextLine(wxDC
& dc
,
182 const wxString
& text
,
188 // draw a line wrap indicator
189 virtual void DrawLineWrapMark(wxDC
& dc
, const wxRect
& rect
) = 0;
191 // draw a notebook tab
192 virtual void DrawTab(wxDC
& dc
,
195 const wxString
& label
,
196 const wxBitmap
& bitmap
= wxNullBitmap
,
198 int indexAccel
= -1) = 0;
200 // draw the slider shaft
201 virtual void DrawSliderShaft(wxDC
& dc
,
203 wxOrientation orient
,
205 wxRect
*rectShaft
= NULL
) = 0;
207 // draw the slider thumb
208 virtual void DrawSliderThumb(wxDC
& dc
,
210 wxOrientation orient
,
213 // draw the slider ticks
214 virtual void DrawSliderTicks(wxDC
& dc
,
216 const wxSize
& sizeThumb
,
217 wxOrientation orient
,
224 // draw a menu bar item
225 virtual void DrawMenuBarItem(wxDC
& dc
,
227 const wxString
& label
,
229 int indexAccel
= -1) = 0;
231 // draw a menu item (also used for submenus if flags has ISSUBMENU flag)
233 // the geometryInfo is calculated by GetMenuGeometry() function from below
234 virtual void DrawMenuItem(wxDC
& dc
,
236 const wxMenuGeometryInfo
& geometryInfo
,
237 const wxString
& label
,
238 const wxString
& accel
,
239 const wxBitmap
& bitmap
= wxNullBitmap
,
241 int indexAccel
= -1) = 0;
243 // draw a menu bar separator
244 virtual void DrawMenuSeparator(wxDC
& dc
,
246 const wxMenuGeometryInfo
& geomInfo
) = 0;
251 // return the bitmaps to use for combobox button
252 virtual void GetComboBitmaps(wxBitmap
*bmpNormal
,
254 wxBitmap
*bmpPressed
,
255 wxBitmap
*bmpDisabled
) = 0;
257 // geometry functions
258 // ------------------
260 // get the dimensions of the border: rect.x/y contain the width/height of
261 // the left/top side, width/heigh - of the right/bottom one
262 virtual wxRect
GetBorderDimensions(wxBorder border
) const = 0;
264 // the scrollbars may be drawn either inside the window border or outside
265 // it - this function is used to decide how to draw them
266 virtual bool AreScrollbarsInsideBorder() const = 0;
268 // adjust the size of the control of the given class: for most controls,
269 // this just takes into account the border, but for some (buttons, for
270 // example) it is more complicated - the result being, in any case, that
271 // the control looks "nice" if it uses the adjusted rectangle
272 virtual void AdjustSize(wxSize
*size
, const wxWindow
*window
) = 0;
274 // get the size of a scrollbar arrow
275 virtual wxSize
GetScrollbarArrowSize() const = 0;
277 // gets the bounding box for a scrollbar element for the given (by default
278 // - current) thumb position
279 virtual wxRect
GetScrollbarRect(const wxScrollBar
*scrollbar
,
280 wxScrollBar::Element elem
,
281 int thumbPos
= -1) const = 0;
283 // returns the size of the scrollbar shaft excluding the arrows
284 virtual wxCoord
GetScrollbarSize(const wxScrollBar
*scrollbar
) = 0;
286 // returns one of wxHT_SCROLLBAR_XXX constants
287 virtual wxHitTest
HitTestScrollbar(const wxScrollBar
*scrollbar
,
288 const wxPoint
& pt
) const = 0;
290 // translate the scrollbar position (in logical units) into physical
291 // coordinate (in pixels) and the other way round
292 virtual wxCoord
ScrollbarToPixel(const wxScrollBar
*scrollbar
,
293 int thumbPos
= -1) = 0;
294 virtual int PixelToScrollbar(const wxScrollBar
*scrollbar
,
297 // get the height of a listbox item from the base font height
298 virtual wxCoord
GetListboxItemHeight(wxCoord fontHeight
) = 0;
300 // get the size of a checkbox/radio button bitmap
301 virtual wxSize
GetCheckBitmapSize() const = 0;
302 virtual wxSize
GetRadioBitmapSize() const = 0;
303 virtual wxCoord
GetCheckItemMargin() const = 0;
305 // convert between text rectangle and client rectangle for text controls:
306 // the former is typicall smaller to leave margins around text
307 virtual wxRect
GetTextTotalArea(const wxTextCtrl
*text
,
308 const wxRect
& rectText
) = 0;
310 // extra space is for line indicators
311 virtual wxRect
GetTextClientArea(const wxTextCtrl
*text
,
312 const wxRect
& rectTotal
,
313 wxCoord
*extraSpaceBeyond
) = 0;
315 // get the overhang of a selected tab
316 virtual wxSize
GetTabIndent() const = 0;
318 // get the padding around the text in a tab
319 virtual wxSize
GetTabPadding() const = 0;
321 // get the default size of the slider in lesser dimension (i.e. height of a
322 // horizontal slider or width of a vertical one)
323 virtual wxCoord
GetSliderDim() const = 0;
325 // get the length of the slider ticks displayed along side slider
326 virtual wxCoord
GetSliderTickLen() const = 0;
328 // get the slider shaft rect from the total slider rect
329 virtual wxRect
GetSliderShaftRect(const wxRect
& rect
,
330 wxOrientation orient
) const = 0;
332 // get the size of the slider thumb for the given total slider rect
333 virtual wxSize
GetSliderThumbSize(const wxRect
& rect
,
334 wxOrientation orient
) const = 0;
336 // get the size of one progress bar step (in horz and vertical directions)
337 virtual wxSize
GetProgressBarStep() const = 0;
340 // get the size of rectangle to use in the menubar for the given text rect
341 virtual wxSize
GetMenuBarItemSize(const wxSize
& sizeText
) const = 0;
343 // get the struct storing all layout info needed to draw all menu items
344 // (this can't be calculated for each item separately as they should be
347 // the returned pointer must be deleted by the caller
348 virtual wxMenuGeometryInfo
*GetMenuGeometry(wxWindow
*win
,
349 const wxMenu
& menu
) const = 0;
351 // virtual dtor for any base class
352 virtual ~wxRenderer();
355 // draw a frame around rectFrame rectangle but not touching the rectLabel
356 // one: this is used by DrawFrame()
357 void StandardDrawFrame(wxDC
& dc
,
358 const wxRect
& rectFrame
,
359 const wxRect
& rectLabel
);
361 // standard text line drawing: just use DrawText() and highlight the
363 static void StandardDrawTextLine(wxDC
& dc
,
364 const wxString
& text
,
366 int selStart
, int selEnd
,
369 // standard scrollbar hit testing: this assumes that it only has 2 arrows
370 // and a thumb, so the themes which have more complicated scrollbars (e.g.
371 // BeOS) can't use this method
372 static wxRect
StandardGetScrollbarRect(const wxScrollBar
*scrollbar
,
373 wxScrollBar::Element elem
,
375 const wxSize
& sizeArrow
);
376 static wxHitTest
StandardHitTestScrollbar(const wxScrollBar
*scrollbar
,
378 const wxSize
& sizeArrow
);
379 static wxCoord
StandardScrollbarToPixel(const wxScrollBar
*scrollbar
,
381 const wxSize
& sizeArrow
);
382 static int StandardPixelToScrollbar(const wxScrollBar
*scrollbar
,
384 const wxSize
& sizeArrow
);
385 static wxCoord
StandardScrollBarSize(const wxScrollBar
*scrollbar
,
386 const wxSize
& sizeArrow
);
387 static void StandardScrollBarThumbSize(wxCoord lenBar
,
395 // ----------------------------------------------------------------------------
396 // wxDelegateRenderer: it is impossible to inherit from any of standard
397 // renderers as their declarations are in private code, but you can use this
398 // class to override only some of the Draw() functions - all the other ones
399 // will be left to the original renderer
400 // ----------------------------------------------------------------------------
402 class WXDLLEXPORT wxDelegateRenderer
: public wxRenderer
405 wxDelegateRenderer(wxRenderer
*renderer
) : m_renderer(renderer
) { }
407 virtual void DrawBackground(wxDC
& dc
,
411 { m_renderer
->DrawBackground(dc
, col
, rect
, flags
); }
412 virtual void DrawLabel(wxDC
& dc
,
413 const wxString
& label
,
416 int align
= wxALIGN_LEFT
| wxALIGN_TOP
,
418 wxRect
*rectBounds
= NULL
)
419 { m_renderer
->DrawLabel(dc
, label
, rect
,
420 flags
, align
, indexAccel
, rectBounds
); }
421 virtual void DrawButtonLabel(wxDC
& dc
,
422 const wxString
& label
,
423 const wxBitmap
& image
,
426 int align
= wxALIGN_LEFT
| wxALIGN_TOP
,
428 wxRect
*rectBounds
= NULL
)
429 { m_renderer
->DrawButtonLabel(dc
, label
, image
, rect
,
430 flags
, align
, indexAccel
, rectBounds
); }
431 virtual void DrawBorder(wxDC
& dc
,
435 wxRect
*rectIn
= (wxRect
*)NULL
)
436 { m_renderer
->DrawBorder(dc
, border
, rect
, flags
, rectIn
); }
437 virtual void DrawTextBorder(wxDC
& dc
,
441 wxRect
*rectIn
= (wxRect
*)NULL
)
442 { m_renderer
->DrawTextBorder(dc
, border
, rect
, flags
, rectIn
); }
443 virtual void DrawButtonBorder(wxDC
& dc
,
446 wxRect
*rectIn
= (wxRect
*)NULL
)
447 { m_renderer
->DrawButtonBorder(dc
, rect
, flags
, rectIn
); }
448 virtual void DrawFrame(wxDC
& dc
,
449 const wxString
& label
,
452 int align
= wxALIGN_LEFT
,
454 { m_renderer
->DrawFrame(dc
, label
, rect
, flags
, align
, indexAccel
); }
455 virtual void DrawHorizontalLine(wxDC
& dc
,
456 wxCoord y
, wxCoord x1
, wxCoord x2
)
457 { m_renderer
->DrawHorizontalLine(dc
, y
, x1
, x2
); }
458 virtual void DrawVerticalLine(wxDC
& dc
,
459 wxCoord x
, wxCoord y1
, wxCoord y2
)
460 { m_renderer
->DrawVerticalLine(dc
, x
, y1
, y2
); }
461 virtual void DrawArrow(wxDC
& dc
,
465 { m_renderer
->DrawArrow(dc
, dir
, rect
, flags
); }
466 virtual void DrawScrollbarArrow(wxDC
& dc
,
470 { m_renderer
->DrawScrollbarArrow(dc
, dir
, rect
, flags
); }
471 virtual void DrawScrollbarThumb(wxDC
& dc
,
472 wxOrientation orient
,
475 { m_renderer
->DrawScrollbarThumb(dc
, orient
, rect
, flags
); }
476 virtual void DrawScrollbarShaft(wxDC
& dc
,
477 wxOrientation orient
,
480 { m_renderer
->DrawScrollbarShaft(dc
, orient
, rect
, flags
); }
481 virtual void DrawScrollCorner(wxDC
& dc
,
483 { m_renderer
->DrawScrollCorner(dc
, rect
); }
484 virtual void DrawItem(wxDC
& dc
,
485 const wxString
& label
,
488 { m_renderer
->DrawItem(dc
, label
, rect
, flags
); }
489 virtual void DrawCheckItem(wxDC
& dc
,
490 const wxString
& label
,
491 const wxBitmap
& bitmap
,
494 { m_renderer
->DrawCheckItem(dc
, label
, bitmap
, rect
, flags
); }
495 virtual void DrawCheckButton(wxDC
& dc
,
496 const wxString
& label
,
497 const wxBitmap
& bitmap
,
500 wxAlignment align
= wxALIGN_LEFT
,
502 { m_renderer
->DrawCheckButton(dc
, label
, bitmap
, rect
,
503 flags
, align
, indexAccel
); }
504 virtual void DrawRadioButton(wxDC
& dc
,
505 const wxString
& label
,
506 const wxBitmap
& bitmap
,
509 wxAlignment align
= wxALIGN_LEFT
,
511 { m_renderer
->DrawRadioButton(dc
, label
, bitmap
, rect
,
512 flags
, align
, indexAccel
); }
513 virtual void DrawTextLine(wxDC
& dc
,
514 const wxString
& text
,
518 { m_renderer
->DrawTextLine(dc
, text
, rect
, selStart
, selEnd
); }
519 virtual void DrawLineWrapMark(wxDC
& dc
, const wxRect
& rect
)
520 { m_renderer
->DrawLineWrapMark(dc
, rect
); }
522 virtual void DrawTab(wxDC
& dc
,
525 const wxString
& label
,
526 const wxBitmap
& bitmap
= wxNullBitmap
,
529 { m_renderer
->DrawTab(dc
, rect
, dir
, label
, bitmap
, flags
, accel
); }
531 virtual void DrawSliderShaft(wxDC
& dc
,
533 wxOrientation orient
,
535 wxRect
*rectShaft
= NULL
)
536 { m_renderer
->DrawSliderShaft(dc
, rect
, orient
, flags
, rectShaft
); }
537 virtual void DrawSliderThumb(wxDC
& dc
,
539 wxOrientation orient
,
541 { m_renderer
->DrawSliderThumb(dc
, rect
, orient
, flags
); }
542 virtual void DrawSliderTicks(wxDC
& dc
,
544 const wxSize
& sizeThumb
,
545 wxOrientation orient
,
550 { m_renderer
->DrawSliderTicks(dc
, rect
, sizeThumb
, orient
,
551 start
, end
, start
, flags
); }
554 virtual void DrawMenuBarItem(wxDC
& dc
,
556 const wxString
& label
,
559 { m_renderer
->DrawMenuBarItem(dc
, rect
, label
, flags
, indexAccel
); }
560 virtual void DrawMenuItem(wxDC
& dc
,
562 const wxMenuGeometryInfo
& gi
,
563 const wxString
& label
,
564 const wxString
& accel
,
565 const wxBitmap
& bitmap
= wxNullBitmap
,
568 { m_renderer
->DrawMenuItem(dc
, y
, gi
, label
, accel
,
569 bitmap
, flags
, indexAccel
); }
570 virtual void DrawMenuSeparator(wxDC
& dc
,
572 const wxMenuGeometryInfo
& geomInfo
)
573 { m_renderer
->DrawMenuSeparator(dc
, y
, geomInfo
); }
575 virtual void GetComboBitmaps(wxBitmap
*bmpNormal
,
577 wxBitmap
*bmpPressed
,
578 wxBitmap
*bmpDisabled
)
579 { m_renderer
->GetComboBitmaps(bmpNormal
, bmpFocus
,
580 bmpPressed
, bmpDisabled
); }
582 virtual void AdjustSize(wxSize
*size
, const wxWindow
*window
)
583 { m_renderer
->AdjustSize(size
, window
); }
584 virtual wxRect
GetBorderDimensions(wxBorder border
) const
585 { return m_renderer
->GetBorderDimensions(border
); }
586 virtual bool AreScrollbarsInsideBorder() const
587 { return m_renderer
->AreScrollbarsInsideBorder(); }
589 virtual wxSize
GetScrollbarArrowSize() const
590 { return m_renderer
->GetScrollbarArrowSize(); }
591 virtual wxRect
GetScrollbarRect(const wxScrollBar
*scrollbar
,
592 wxScrollBar::Element elem
,
593 int thumbPos
= -1) const
594 { return m_renderer
->GetScrollbarRect(scrollbar
, elem
, thumbPos
); }
595 virtual wxCoord
GetScrollbarSize(const wxScrollBar
*scrollbar
)
596 { return m_renderer
->GetScrollbarSize(scrollbar
); }
597 virtual wxHitTest
HitTestScrollbar(const wxScrollBar
*scrollbar
,
598 const wxPoint
& pt
) const
599 { return m_renderer
->HitTestScrollbar(scrollbar
, pt
); }
600 virtual wxCoord
ScrollbarToPixel(const wxScrollBar
*scrollbar
,
602 { return m_renderer
->ScrollbarToPixel(scrollbar
, thumbPos
); }
603 virtual int PixelToScrollbar(const wxScrollBar
*scrollbar
,
605 { return m_renderer
->PixelToScrollbar(scrollbar
, coord
); }
606 virtual wxCoord
GetListboxItemHeight(wxCoord fontHeight
)
607 { return m_renderer
->GetListboxItemHeight(fontHeight
); }
608 virtual wxSize
GetCheckBitmapSize() const
609 { return m_renderer
->GetCheckBitmapSize(); }
610 virtual wxSize
GetRadioBitmapSize() const
611 { return m_renderer
->GetRadioBitmapSize(); }
612 virtual wxCoord
GetCheckItemMargin() const
613 { return m_renderer
->GetCheckItemMargin(); }
615 virtual wxRect
GetTextTotalArea(const wxTextCtrl
*text
, const wxRect
& rect
)
616 { return m_renderer
->GetTextTotalArea(text
, rect
); }
617 virtual wxRect
GetTextClientArea(const wxTextCtrl
*text
,
619 wxCoord
*extraSpaceBeyond
)
620 { return m_renderer
->GetTextClientArea(text
, rect
, extraSpaceBeyond
); }
622 virtual wxSize
GetTabIndent() const { return m_renderer
->GetTabIndent(); }
623 virtual wxSize
GetTabPadding() const { return m_renderer
->GetTabPadding(); }
625 virtual wxCoord
GetSliderDim() const
626 { return m_renderer
->GetSliderDim(); }
627 virtual wxCoord
GetSliderTickLen() const
628 { return m_renderer
->GetSliderTickLen(); }
629 virtual wxRect
GetSliderShaftRect(const wxRect
& rect
,
630 wxOrientation orient
) const
631 { return GetSliderShaftRect(rect
, orient
); }
632 virtual wxSize
GetSliderThumbSize(const wxRect
& rect
,
633 wxOrientation orient
) const
634 { return m_renderer
->GetSliderThumbSize(rect
, orient
); }
635 virtual wxSize
GetProgressBarStep() const
636 { return m_renderer
->GetProgressBarStep(); }
638 virtual wxSize
GetMenuBarItemSize(const wxSize
& sizeText
) const
639 { return m_renderer
->GetMenuBarItemSize(sizeText
); }
640 virtual wxMenuGeometryInfo
*GetMenuGeometry(wxWindow
*win
,
641 const wxMenu
& menu
) const
642 { return m_renderer
->GetMenuGeometry(win
, menu
); }
645 wxRenderer
*m_renderer
;
648 // ----------------------------------------------------------------------------
649 // wxControlRenderer: wraps the wxRenderer functions in a form easy to use from
651 // ----------------------------------------------------------------------------
653 class WXDLLEXPORT wxControlRenderer
656 // create a renderer for this dc with this "fundamental" renderer
657 wxControlRenderer(wxWindow
*control
, wxDC
& dc
, wxRenderer
*renderer
);
660 void DrawLabel(const wxBitmap
& bitmap
= wxNullBitmap
,
661 wxCoord marginX
= 0, wxCoord marginY
= 0);
663 void DrawItems(const wxListBox
*listbox
,
664 size_t itemFirst
, size_t itemLast
);
665 #endif // wxUSE_LISTBOX
666 #if wxUSE_CHECKLISTBOX
667 void DrawCheckItems(const wxCheckListBox
*listbox
,
668 size_t itemFirst
, size_t itemLast
);
669 #endif // wxUSE_CHECKLISTBOX
670 void DrawButtonBorder();
671 // the line must be either horizontal or vertical
672 void DrawLine(wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
);
674 void DrawBitmap(const wxBitmap
& bitmap
);
675 void DrawBackgroundBitmap();
676 void DrawScrollbar(const wxScrollBar
*scrollbar
, int thumbPosOld
);
678 void DrawProgressBar(const wxGauge
*gauge
);
679 #endif // wxUSE_GAUGE
682 wxWindow
*GetWindow() const { return m_window
; }
683 wxRenderer
*GetRenderer() const { return m_renderer
; }
685 wxDC
& GetDC() { return m_dc
; }
687 const wxRect
& GetRect() const { return m_rect
; }
688 wxRect
& GetRect() { return m_rect
; }
691 static void DrawBitmap(wxDC
&dc
,
692 const wxBitmap
& bitmap
,
694 int alignment
= wxALIGN_CENTRE
|
695 wxALIGN_CENTRE_VERTICAL
,
696 wxStretch stretch
= wxSTRETCH_NOT
);
699 // common part of DrawItems() and DrawCheckItems()
700 void DoDrawItems(const wxListBox
*listbox
,
701 size_t itemFirst
, size_t itemLast
,
702 bool isCheckLbox
= FALSE
);
705 wxRenderer
*m_renderer
;
710 #endif // _WX_UNIV_RENDERER_H_