1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/renderer.h
3 // Purpose: wxRenderer class declaration
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
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 wxScrollBar
;
36 class WXDLLEXPORT wxTextCtrl
;
37 class WXDLLEXPORT wxWindow
;
39 class WXDLLEXPORT wxGauge
;
42 #include "wx/string.h"
43 #include "wx/gdicmn.h"
44 #include "wx/scrolbar.h" // for wxScrollBar::Element
47 #include "wx/menu.h" // for wxMenuGeometryInfo
50 // ----------------------------------------------------------------------------
51 // wxRenderer: abstract renderers interface
52 // ----------------------------------------------------------------------------
54 class WXDLLEXPORT wxRenderer
60 // draw the controls background
61 virtual void DrawBackground(wxDC
& dc
,
66 // draw the label inside the given rectangle with the specified alignment
67 // and optionally emphasize the character with the given index
68 virtual void DrawLabel(wxDC
& dc
,
69 const wxString
& label
,
72 int alignment
= wxALIGN_LEFT
| wxALIGN_TOP
,
74 wxRect
*rectBounds
= NULL
) = 0;
76 // same but also draw a bitmap if it is valid
77 virtual void DrawButtonLabel(wxDC
& dc
,
78 const wxString
& label
,
79 const wxBitmap
& image
,
82 int alignment
= wxALIGN_LEFT
| wxALIGN_TOP
,
84 wxRect
*rectBounds
= NULL
) = 0;
86 // draw the border and optionally return the rectangle containing the
87 // region inside the border
88 virtual void DrawBorder(wxDC
& dc
,
92 wxRect
*rectIn
= (wxRect
*)NULL
) = 0;
94 // draw text control border (I hate to have a separate method for this but
95 // it is needed to accomodate GTK+)
96 virtual void DrawTextBorder(wxDC
& dc
,
100 wxRect
*rectIn
= (wxRect
*)NULL
) = 0;
102 // draw push button border and return the rectangle left for the label
103 virtual void DrawButtonBorder(wxDC
& dc
,
106 wxRect
*rectIn
= (wxRect
*)NULL
) = 0;
108 // draw a horizontal line
109 virtual void DrawHorizontalLine(wxDC
& dc
,
110 wxCoord y
, wxCoord x1
, wxCoord x2
) = 0;
112 // draw a vertical line
113 virtual void DrawVerticalLine(wxDC
& dc
,
114 wxCoord x
, wxCoord y1
, wxCoord y2
) = 0;
116 // draw a frame with the label (horizontal alignment can be specified)
117 virtual void DrawFrame(wxDC
& dc
,
118 const wxString
& label
,
121 int alignment
= wxALIGN_LEFT
,
122 int indexAccel
= -1) = 0;
124 // draw an arrow in the given direction
125 virtual void DrawArrow(wxDC
& dc
,
130 // draw a scrollbar arrow (may be the same as arrow but may be not)
131 virtual void DrawScrollbarArrow(wxDC
& dc
,
136 // draw the scrollbar thumb
137 virtual void DrawScrollbarThumb(wxDC
& dc
,
138 wxOrientation orient
,
142 // draw a (part of) scrollbar shaft
143 virtual void DrawScrollbarShaft(wxDC
& dc
,
144 wxOrientation orient
,
148 // draw the rectangle in the corner between two scrollbars
149 virtual void DrawScrollCorner(wxDC
& dc
,
150 const wxRect
& rect
) = 0;
152 // draw an item of a wxListBox
153 virtual void DrawItem(wxDC
& dc
,
154 const wxString
& label
,
158 // draw an item of a wxCheckListBox
159 virtual void DrawCheckItem(wxDC
& dc
,
160 const wxString
& label
,
161 const wxBitmap
& bitmap
,
165 // draw a checkbutton (bitmap may be invalid to use default one)
166 virtual void DrawCheckButton(wxDC
& dc
,
167 const wxString
& label
,
168 const wxBitmap
& bitmap
,
171 wxAlignment align
= wxALIGN_LEFT
,
172 int indexAccel
= -1) = 0;
174 // draw a radio button
175 virtual void DrawRadioButton(wxDC
& dc
,
176 const wxString
& label
,
177 const wxBitmap
& bitmap
,
180 wxAlignment align
= wxALIGN_LEFT
,
181 int indexAccel
= -1) = 0;
183 // draw a (part of) line in the text control
184 virtual void DrawTextLine(wxDC
& dc
,
185 const wxString
& text
,
191 // draw a line wrap indicator
192 virtual void DrawLineWrapMark(wxDC
& dc
, const wxRect
& rect
) = 0;
194 // draw a notebook tab
195 virtual void DrawTab(wxDC
& dc
,
198 const wxString
& label
,
199 const wxBitmap
& bitmap
= wxNullBitmap
,
201 int indexAccel
= -1) = 0;
203 // draw the slider shaft
204 virtual void DrawSliderShaft(wxDC
& dc
,
206 wxOrientation orient
,
208 wxRect
*rectShaft
= NULL
) = 0;
210 // draw the slider thumb
211 virtual void DrawSliderThumb(wxDC
& dc
,
213 wxOrientation orient
,
216 // draw the slider ticks
217 virtual void DrawSliderTicks(wxDC
& dc
,
219 const wxSize
& sizeThumb
,
220 wxOrientation orient
,
226 // draw a menu bar item
227 virtual void DrawMenuBarItem(wxDC
& dc
,
229 const wxString
& label
,
231 int indexAccel
= -1) = 0;
233 // draw a menu item (also used for submenus if flags has ISSUBMENU flag)
235 // the geometryInfo is calculated by GetMenuGeometry() function from below
236 virtual void DrawMenuItem(wxDC
& dc
,
238 const wxMenuGeometryInfo
& geometryInfo
,
239 const wxString
& label
,
240 const wxString
& accel
,
241 const wxBitmap
& bitmap
= wxNullBitmap
,
243 int indexAccel
= -1) = 0;
245 // draw a menu bar separator
246 virtual void DrawMenuSeparator(wxDC
& dc
,
248 const wxMenuGeometryInfo
& geomInfo
) = 0;
253 // return the bitmaps to use for combobox button
254 virtual void GetComboBitmaps(wxBitmap
*bmpNormal
,
255 wxBitmap
*bmpPressed
,
256 wxBitmap
*bmpDisabled
) = 0;
258 // geometry functions
259 // ------------------
261 // get the dimensions of the border: rect.x/y contain the width/height of
262 // the left/top side, width/heigh - of the right/bottom one
263 virtual wxRect
GetBorderDimensions(wxBorder border
) const = 0;
265 // the scrollbars may be drawn either inside the window border or outside
266 // it - this function is used to decide how to draw them
267 virtual bool AreScrollbarsInsideBorder() const = 0;
269 // adjust the size of the control of the given class: for most controls,
270 // this just takes into account the border, but for some (buttons, for
271 // example) it is more complicated - the result being, in any case, that
272 // the control looks "nice" if it uses the adjusted rectangle
273 virtual void AdjustSize(wxSize
*size
, const wxWindow
*window
) = 0;
275 // get the size of a scrollbar arrow
276 virtual wxSize
GetScrollbarArrowSize() const = 0;
278 // gets the bounding box for a scrollbar element for the given (by default
279 // - current) thumb position
280 virtual wxRect
GetScrollbarRect(const wxScrollBar
*scrollbar
,
281 wxScrollBar::Element elem
,
282 int thumbPos
= -1) const = 0;
284 // returns the size of the scrollbar shaft excluding the arrows
285 virtual wxCoord
GetScrollbarSize(const wxScrollBar
*scrollbar
) = 0;
287 // returns one of wxHT_SCROLLBAR_XXX constants
288 virtual wxHitTest
HitTestScrollbar(const wxScrollBar
*scrollbar
,
289 const wxPoint
& pt
) const = 0;
291 // translate the scrollbar position (in logical units) into physical
292 // coordinate (in pixels) and the other way round
293 virtual wxCoord
ScrollbarToPixel(const wxScrollBar
*scrollbar
,
294 int thumbPos
= -1) = 0;
295 virtual int PixelToScrollbar(const wxScrollBar
*scrollbar
,
298 // get the height of a listbox item from the base font height
299 virtual wxCoord
GetListboxItemHeight(wxCoord fontHeight
) = 0;
301 // get the size of a checkbox/radio button bitmap
302 virtual wxSize
GetCheckBitmapSize() const = 0;
303 virtual wxSize
GetRadioBitmapSize() const = 0;
304 virtual wxCoord
GetCheckItemMargin() const = 0;
306 // convert between text rectangle and client rectangle for text controls:
307 // the former is typicall smaller to leave margins around text
308 virtual wxRect
GetTextTotalArea(const wxTextCtrl
*text
,
309 const wxRect
& rectText
) = 0;
311 // extra space is for line indicators
312 virtual wxRect
GetTextClientArea(const wxTextCtrl
*text
,
313 const wxRect
& rectTotal
,
314 wxCoord
*extraSpaceBeyond
) = 0;
316 // get the overhang of a selected tab
317 virtual wxSize
GetTabIndent() const = 0;
319 // get the padding around the text in a tab
320 virtual wxSize
GetTabPadding() const = 0;
322 // get the default size of the slider in lesser dimension (i.e. height of a
323 // horizontal slider or width of a vertical one)
324 virtual wxCoord
GetSliderDim() const = 0;
326 // get the length of the slider ticks displayed along side slider
327 virtual wxCoord
GetSliderTickLen() const = 0;
329 // get the slider shaft rect from the total slider rect
330 virtual wxRect
GetSliderShaftRect(const wxRect
& rect
,
331 wxOrientation orient
) const = 0;
333 // get the size of the slider thumb for the given total slider rect
334 virtual wxSize
GetSliderThumbSize(const wxRect
& rect
,
335 wxOrientation orient
) const = 0;
337 // get the size of one progress bar step (in horz and vertical directions)
338 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
); }
553 virtual void DrawMenuBarItem(wxDC
& dc
,
555 const wxString
& label
,
558 { m_renderer
->DrawMenuBarItem(dc
, rect
, label
, flags
, indexAccel
); }
559 virtual void DrawMenuItem(wxDC
& dc
,
561 const wxMenuGeometryInfo
& gi
,
562 const wxString
& label
,
563 const wxString
& accel
,
564 const wxBitmap
& bitmap
= wxNullBitmap
,
567 { m_renderer
->DrawMenuItem(dc
, y
, gi
, label
, accel
,
568 bitmap
, flags
, indexAccel
); }
569 virtual void DrawMenuSeparator(wxDC
& dc
,
571 const wxMenuGeometryInfo
& geomInfo
)
572 { m_renderer
->DrawMenuSeparator(dc
, y
, geomInfo
); }
574 virtual void GetComboBitmaps(wxBitmap
*bmpNormal
,
575 wxBitmap
*bmpPressed
,
576 wxBitmap
*bmpDisabled
)
577 { m_renderer
->GetComboBitmaps(bmpNormal
, bmpPressed
, bmpDisabled
); }
579 virtual void AdjustSize(wxSize
*size
, const wxWindow
*window
)
580 { m_renderer
->AdjustSize(size
, window
); }
581 virtual wxRect
GetBorderDimensions(wxBorder border
) const
582 { return m_renderer
->GetBorderDimensions(border
); }
583 virtual bool AreScrollbarsInsideBorder() const
584 { return m_renderer
->AreScrollbarsInsideBorder(); }
586 virtual wxSize
GetScrollbarArrowSize() const
587 { return m_renderer
->GetScrollbarArrowSize(); }
588 virtual wxRect
GetScrollbarRect(const wxScrollBar
*scrollbar
,
589 wxScrollBar::Element elem
,
590 int thumbPos
= -1) const
591 { return m_renderer
->GetScrollbarRect(scrollbar
, elem
, thumbPos
); }
592 virtual wxCoord
GetScrollbarSize(const wxScrollBar
*scrollbar
)
593 { return m_renderer
->GetScrollbarSize(scrollbar
); }
594 virtual wxHitTest
HitTestScrollbar(const wxScrollBar
*scrollbar
,
595 const wxPoint
& pt
) const
596 { return m_renderer
->HitTestScrollbar(scrollbar
, pt
); }
597 virtual wxCoord
ScrollbarToPixel(const wxScrollBar
*scrollbar
,
599 { return m_renderer
->ScrollbarToPixel(scrollbar
, thumbPos
); }
600 virtual int PixelToScrollbar(const wxScrollBar
*scrollbar
,
602 { return m_renderer
->PixelToScrollbar(scrollbar
, coord
); }
603 virtual wxCoord
GetListboxItemHeight(wxCoord fontHeight
)
604 { return m_renderer
->GetListboxItemHeight(fontHeight
); }
605 virtual wxSize
GetCheckBitmapSize() const
606 { return m_renderer
->GetCheckBitmapSize(); }
607 virtual wxSize
GetRadioBitmapSize() const
608 { return m_renderer
->GetRadioBitmapSize(); }
609 virtual wxCoord
GetCheckItemMargin() const
610 { return m_renderer
->GetCheckItemMargin(); }
612 virtual wxRect
GetTextTotalArea(const wxTextCtrl
*text
, const wxRect
& rect
)
613 { return m_renderer
->GetTextTotalArea(text
, rect
); }
614 virtual wxRect
GetTextClientArea(const wxTextCtrl
*text
,
616 wxCoord
*extraSpaceBeyond
)
617 { return m_renderer
->GetTextClientArea(text
, rect
, extraSpaceBeyond
); }
619 virtual wxSize
GetTabIndent() const { return m_renderer
->GetTabIndent(); }
620 virtual wxSize
GetTabPadding() const { return m_renderer
->GetTabPadding(); }
622 virtual wxCoord
GetSliderDim() const
623 { return m_renderer
->GetSliderDim(); }
624 virtual wxCoord
GetSliderTickLen() const
625 { return m_renderer
->GetSliderTickLen(); }
626 virtual wxRect
GetSliderShaftRect(const wxRect
& rect
,
627 wxOrientation orient
) const
628 { return GetSliderShaftRect(rect
, orient
); }
629 virtual wxSize
GetSliderThumbSize(const wxRect
& rect
,
630 wxOrientation orient
) const
631 { return m_renderer
->GetSliderThumbSize(rect
, orient
); }
632 virtual wxSize
GetProgressBarStep() const
633 { return m_renderer
->GetProgressBarStep(); }
634 virtual wxSize
GetMenuBarItemSize(const wxSize
& sizeText
) const
635 { return m_renderer
->GetMenuBarItemSize(sizeText
); }
636 virtual wxMenuGeometryInfo
*GetMenuGeometry(wxWindow
*win
,
637 const wxMenu
& menu
) const
638 { return m_renderer
->GetMenuGeometry(win
, menu
); }
641 wxRenderer
*m_renderer
;
644 // ----------------------------------------------------------------------------
645 // wxControlRenderer: wraps the wxRenderer functions in a form easy to use from
647 // ----------------------------------------------------------------------------
649 class WXDLLEXPORT wxControlRenderer
652 // create a renderer for this dc with this "fundamental" renderer
653 wxControlRenderer(wxWindow
*control
, wxDC
& dc
, wxRenderer
*renderer
);
656 void DrawLabel(const wxBitmap
& bitmap
= wxNullBitmap
,
657 wxCoord marginX
= 0, wxCoord marginY
= 0);
659 void DrawItems(const wxListBox
*listbox
,
660 size_t itemFirst
, size_t itemLast
);
661 #endif // wxUSE_LISTBOX
662 #if wxUSE_CHECKLISTBOX
663 void DrawCheckItems(const wxCheckListBox
*listbox
,
664 size_t itemFirst
, size_t itemLast
);
665 #endif // wxUSE_CHECKLISTBOX
666 void DrawButtonBorder();
667 // the line must be either horizontal or vertical
668 void DrawLine(wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
);
670 void DrawBitmap(const wxBitmap
& bitmap
);
671 void DrawBackgroundBitmap();
672 void DrawScrollbar(const wxScrollBar
*scrollbar
, int thumbPosOld
);
674 void DrawProgressBar(const wxGauge
*gauge
);
675 #endif // wxUSE_GAUGE
678 wxWindow
*GetWindow() const { return m_window
; }
679 wxRenderer
*GetRenderer() const { return m_renderer
; }
681 wxDC
& GetDC() { return m_dc
; }
683 const wxRect
& GetRect() const { return m_rect
; }
684 wxRect
& GetRect() { return m_rect
; }
687 static void DrawBitmap(wxDC
&dc
,
688 const wxBitmap
& bitmap
,
690 int alignment
= wxALIGN_CENTRE
|
691 wxALIGN_CENTRE_VERTICAL
,
692 wxStretch stretch
= wxSTRETCH_NOT
);
695 // common part of DrawItems() and DrawCheckItems()
696 void DoDrawItems(const wxListBox
*listbox
,
697 size_t itemFirst
, size_t itemLast
,
698 bool isCheckLbox
= FALSE
);
701 wxRenderer
*m_renderer
;
706 #endif // _WX_UNIV_RENDERER_H_