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 #include "wx/string.h"
40 #include "wx/gdicmn.h"
41 #include "wx/scrolbar.h" // for wxScrollBar::Element
44 #include "wx/menu.h" // for wxMenuGeometryInfo
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
,
223 // draw a menu bar item
224 virtual void DrawMenuBarItem(wxDC
& dc
,
226 const wxString
& label
,
228 int indexAccel
= -1) = 0;
230 // draw a menu item (also used for submenus if flags has ISSUBMENU flag)
232 // the geometryInfo is calculated by GetMenuGeometry() function from below
233 virtual void DrawMenuItem(wxDC
& dc
,
235 const wxMenuGeometryInfo
& geometryInfo
,
236 const wxString
& label
,
237 const wxString
& accel
,
238 const wxBitmap
& bitmap
= wxNullBitmap
,
240 int indexAccel
= -1) = 0;
242 // draw a menu bar separator
243 virtual void DrawMenuSeparator(wxDC
& dc
,
245 const wxMenuGeometryInfo
& geomInfo
) = 0;
250 // return the bitmaps to use for combobox button
251 virtual void GetComboBitmaps(wxBitmap
*bmpNormal
,
252 wxBitmap
*bmpPressed
,
253 wxBitmap
*bmpDisabled
) = 0;
255 // geometry functions
256 // ------------------
258 // get the dimensions of the border: rect.x/y contain the width/height of
259 // the left/top side, width/heigh - of the right/bottom one
260 virtual wxRect
GetBorderDimensions(wxBorder border
) const = 0;
262 // the scrollbars may be drawn either inside the window border or outside
263 // it - this function is used to decide how to draw them
264 virtual bool AreScrollbarsInsideBorder() const = 0;
266 // adjust the size of the control of the given class: for most controls,
267 // this just takes into account the border, but for some (buttons, for
268 // example) it is more complicated - the result being, in any case, that
269 // the control looks "nice" if it uses the adjusted rectangle
270 virtual void AdjustSize(wxSize
*size
, const wxWindow
*window
) = 0;
272 // get the size of a scrollbar arrow
273 virtual wxSize
GetScrollbarArrowSize() const = 0;
275 // gets the bounding box for a scrollbar element for the given (by default
276 // - current) thumb position
277 virtual wxRect
GetScrollbarRect(const wxScrollBar
*scrollbar
,
278 wxScrollBar::Element elem
,
279 int thumbPos
= -1) const = 0;
281 // returns the size of the scrollbar shaft excluding the arrows
282 virtual wxCoord
GetScrollbarSize(const wxScrollBar
*scrollbar
) = 0;
284 // returns one of wxHT_SCROLLBAR_XXX constants
285 virtual wxHitTest
HitTestScrollbar(const wxScrollBar
*scrollbar
,
286 const wxPoint
& pt
) const = 0;
288 // translate the scrollbar position (in logical units) into physical
289 // coordinate (in pixels) and the other way round
290 virtual wxCoord
ScrollbarToPixel(const wxScrollBar
*scrollbar
,
291 int thumbPos
= -1) = 0;
292 virtual int PixelToScrollbar(const wxScrollBar
*scrollbar
,
295 // get the height of a listbox item from the base font height
296 virtual wxCoord
GetListboxItemHeight(wxCoord fontHeight
) = 0;
298 // get the size of a checkbox/radio button bitmap
299 virtual wxSize
GetCheckBitmapSize() const = 0;
300 virtual wxSize
GetRadioBitmapSize() const = 0;
301 virtual wxCoord
GetCheckItemMargin() const = 0;
303 // convert between text rectangle and client rectangle for text controls:
304 // the former is typicall smaller to leave margins around text
305 virtual wxRect
GetTextTotalArea(const wxTextCtrl
*text
,
306 const wxRect
& rectText
) = 0;
308 // extra space is for line indicators
309 virtual wxRect
GetTextClientArea(const wxTextCtrl
*text
,
310 const wxRect
& rectTotal
,
311 wxCoord
*extraSpaceBeyond
) = 0;
313 // get the overhang of a selected tab
314 virtual wxSize
GetTabIndent() const = 0;
316 // get the padding around the text in a tab
317 virtual wxSize
GetTabPadding() const = 0;
319 // get the default size of the slider in lesser dimension (i.e. height of a
320 // horizontal slider or width of a vertical one)
321 virtual wxCoord
GetSliderDim() const = 0;
323 // get the length of the slider ticks displayed along side slider
324 virtual wxCoord
GetSliderTickLen() const = 0;
326 // get the slider shaft rect from the total slider rect
327 virtual wxRect
GetSliderShaftRect(const wxRect
& rect
,
328 wxOrientation orient
) const = 0;
330 // get the size of the slider thumb for the given total slider rect
331 virtual wxSize
GetSliderThumbSize(const wxRect
& rect
,
332 wxOrientation orient
) const = 0;
334 // get the size of one progress bar step (in horz and vertical directions)
335 virtual wxSize
GetProgressBarStep() const = 0;
337 // get the size of rectangle to use in the menubar for the given text rect
338 virtual wxSize
GetMenuBarItemSize(const wxSize
& sizeText
) const = 0;
340 // get the struct storing all layout info needed to draw all menu items
341 // (this can't be calculated for each item separately as they should be
344 // the returned pointer must be deleted by the caller
345 virtual wxMenuGeometryInfo
*GetMenuGeometry(wxWindow
*win
,
346 const wxMenu
& menu
) const = 0;
348 // virtual dtor for any base class
349 virtual ~wxRenderer();
352 // draw a frame around rectFrame rectangle but not touching the rectLabel
353 // one: this is used by DrawFrame()
354 void StandardDrawFrame(wxDC
& dc
,
355 const wxRect
& rectFrame
,
356 const wxRect
& rectLabel
);
358 // standard text line drawing: just use DrawText() and highlight the
360 static void StandardDrawTextLine(wxDC
& dc
,
361 const wxString
& text
,
363 int selStart
, int selEnd
,
366 // standard scrollbar hit testing: this assumes that it only has 2 arrows
367 // and a thumb, so the themes which have more complicated scrollbars (e.g.
368 // BeOS) can't use this method
369 static wxRect
StandardGetScrollbarRect(const wxScrollBar
*scrollbar
,
370 wxScrollBar::Element elem
,
372 const wxSize
& sizeArrow
);
373 static wxHitTest
StandardHitTestScrollbar(const wxScrollBar
*scrollbar
,
375 const wxSize
& sizeArrow
);
376 static wxCoord
StandardScrollbarToPixel(const wxScrollBar
*scrollbar
,
378 const wxSize
& sizeArrow
);
379 static int StandardPixelToScrollbar(const wxScrollBar
*scrollbar
,
381 const wxSize
& sizeArrow
);
382 static wxCoord
StandardScrollBarSize(const wxScrollBar
*scrollbar
,
383 const wxSize
& sizeArrow
);
384 static void StandardScrollBarThumbSize(wxCoord lenBar
,
392 // ----------------------------------------------------------------------------
393 // wxDelegateRenderer: it is impossible to inherit from any of standard
394 // renderers as their declarations are in private code, but you can use this
395 // class to override only some of the Draw() functions - all the other ones
396 // will be left to the original renderer
397 // ----------------------------------------------------------------------------
399 class WXDLLEXPORT wxDelegateRenderer
: public wxRenderer
402 wxDelegateRenderer(wxRenderer
*renderer
) : m_renderer(renderer
) { }
404 virtual void DrawBackground(wxDC
& dc
,
408 { m_renderer
->DrawBackground(dc
, col
, rect
, flags
); }
409 virtual void DrawLabel(wxDC
& dc
,
410 const wxString
& label
,
413 int align
= wxALIGN_LEFT
| wxALIGN_TOP
,
415 wxRect
*rectBounds
= NULL
)
416 { m_renderer
->DrawLabel(dc
, label
, rect
,
417 flags
, align
, indexAccel
, rectBounds
); }
418 virtual void DrawButtonLabel(wxDC
& dc
,
419 const wxString
& label
,
420 const wxBitmap
& image
,
423 int align
= wxALIGN_LEFT
| wxALIGN_TOP
,
425 wxRect
*rectBounds
= NULL
)
426 { m_renderer
->DrawButtonLabel(dc
, label
, image
, rect
,
427 flags
, align
, indexAccel
, rectBounds
); }
428 virtual void DrawBorder(wxDC
& dc
,
432 wxRect
*rectIn
= (wxRect
*)NULL
)
433 { m_renderer
->DrawBorder(dc
, border
, rect
, flags
, rectIn
); }
434 virtual void DrawTextBorder(wxDC
& dc
,
438 wxRect
*rectIn
= (wxRect
*)NULL
)
439 { m_renderer
->DrawTextBorder(dc
, border
, rect
, flags
, rectIn
); }
440 virtual void DrawButtonBorder(wxDC
& dc
,
443 wxRect
*rectIn
= (wxRect
*)NULL
)
444 { m_renderer
->DrawButtonBorder(dc
, rect
, flags
, rectIn
); }
445 virtual void DrawFrame(wxDC
& dc
,
446 const wxString
& label
,
449 int align
= wxALIGN_LEFT
,
451 { m_renderer
->DrawFrame(dc
, label
, rect
, flags
, align
, indexAccel
); }
452 virtual void DrawHorizontalLine(wxDC
& dc
,
453 wxCoord y
, wxCoord x1
, wxCoord x2
)
454 { m_renderer
->DrawHorizontalLine(dc
, y
, x1
, x2
); }
455 virtual void DrawVerticalLine(wxDC
& dc
,
456 wxCoord x
, wxCoord y1
, wxCoord y2
)
457 { m_renderer
->DrawVerticalLine(dc
, x
, y1
, y2
); }
458 virtual void DrawArrow(wxDC
& dc
,
462 { m_renderer
->DrawArrow(dc
, dir
, rect
, flags
); }
463 virtual void DrawScrollbarArrow(wxDC
& dc
,
467 { m_renderer
->DrawScrollbarArrow(dc
, dir
, rect
, flags
); }
468 virtual void DrawScrollbarThumb(wxDC
& dc
,
469 wxOrientation orient
,
472 { m_renderer
->DrawScrollbarThumb(dc
, orient
, rect
, flags
); }
473 virtual void DrawScrollbarShaft(wxDC
& dc
,
474 wxOrientation orient
,
477 { m_renderer
->DrawScrollbarShaft(dc
, orient
, rect
, flags
); }
478 virtual void DrawScrollCorner(wxDC
& dc
,
480 { m_renderer
->DrawScrollCorner(dc
, rect
); }
481 virtual void DrawItem(wxDC
& dc
,
482 const wxString
& label
,
485 { m_renderer
->DrawItem(dc
, label
, rect
, flags
); }
486 virtual void DrawCheckItem(wxDC
& dc
,
487 const wxString
& label
,
488 const wxBitmap
& bitmap
,
491 { m_renderer
->DrawCheckItem(dc
, label
, bitmap
, rect
, flags
); }
492 virtual void DrawCheckButton(wxDC
& dc
,
493 const wxString
& label
,
494 const wxBitmap
& bitmap
,
497 wxAlignment align
= wxALIGN_LEFT
,
499 { m_renderer
->DrawCheckButton(dc
, label
, bitmap
, rect
,
500 flags
, align
, indexAccel
); }
501 virtual void DrawRadioButton(wxDC
& dc
,
502 const wxString
& label
,
503 const wxBitmap
& bitmap
,
506 wxAlignment align
= wxALIGN_LEFT
,
508 { m_renderer
->DrawRadioButton(dc
, label
, bitmap
, rect
,
509 flags
, align
, indexAccel
); }
510 virtual void DrawTextLine(wxDC
& dc
,
511 const wxString
& text
,
515 { m_renderer
->DrawTextLine(dc
, text
, rect
, selStart
, selEnd
); }
516 virtual void DrawLineWrapMark(wxDC
& dc
, const wxRect
& rect
)
517 { m_renderer
->DrawLineWrapMark(dc
, rect
); }
519 virtual void DrawTab(wxDC
& dc
,
522 const wxString
& label
,
523 const wxBitmap
& bitmap
= wxNullBitmap
,
526 { m_renderer
->DrawTab(dc
, rect
, dir
, label
, bitmap
, flags
, accel
); }
528 virtual void DrawSliderShaft(wxDC
& dc
,
530 wxOrientation orient
,
532 wxRect
*rectShaft
= NULL
)
533 { m_renderer
->DrawSliderShaft(dc
, rect
, orient
, flags
, rectShaft
); }
534 virtual void DrawSliderThumb(wxDC
& dc
,
536 wxOrientation orient
,
538 { m_renderer
->DrawSliderThumb(dc
, rect
, orient
, flags
); }
539 virtual void DrawSliderTicks(wxDC
& dc
,
541 const wxSize
& sizeThumb
,
542 wxOrientation orient
,
547 { m_renderer
->DrawSliderTicks(dc
, rect
, sizeThumb
, orient
,
548 start
, end
, start
, flags
); }
550 virtual void DrawMenuBarItem(wxDC
& dc
,
552 const wxString
& label
,
555 { m_renderer
->DrawMenuBarItem(dc
, rect
, label
, flags
, indexAccel
); }
556 virtual void DrawMenuItem(wxDC
& dc
,
558 const wxMenuGeometryInfo
& gi
,
559 const wxString
& label
,
560 const wxString
& accel
,
561 const wxBitmap
& bitmap
= wxNullBitmap
,
564 { m_renderer
->DrawMenuItem(dc
, y
, gi
, label
, accel
,
565 bitmap
, flags
, indexAccel
); }
566 virtual void DrawMenuSeparator(wxDC
& dc
,
568 const wxMenuGeometryInfo
& geomInfo
)
569 { m_renderer
->DrawMenuSeparator(dc
, y
, geomInfo
); }
571 virtual void GetComboBitmaps(wxBitmap
*bmpNormal
,
572 wxBitmap
*bmpPressed
,
573 wxBitmap
*bmpDisabled
)
574 { m_renderer
->GetComboBitmaps(bmpNormal
, bmpPressed
, bmpDisabled
); }
576 virtual void AdjustSize(wxSize
*size
, const wxWindow
*window
)
577 { m_renderer
->AdjustSize(size
, window
); }
578 virtual wxRect
GetBorderDimensions(wxBorder border
) const
579 { return m_renderer
->GetBorderDimensions(border
); }
580 virtual bool AreScrollbarsInsideBorder() const
581 { return m_renderer
->AreScrollbarsInsideBorder(); }
583 virtual wxSize
GetScrollbarArrowSize() const
584 { return m_renderer
->GetScrollbarArrowSize(); }
585 virtual wxRect
GetScrollbarRect(const wxScrollBar
*scrollbar
,
586 wxScrollBar::Element elem
,
587 int thumbPos
= -1) const
588 { return m_renderer
->GetScrollbarRect(scrollbar
, elem
, thumbPos
); }
589 virtual wxCoord
GetScrollbarSize(const wxScrollBar
*scrollbar
)
590 { return m_renderer
->GetScrollbarSize(scrollbar
); }
591 virtual wxHitTest
HitTestScrollbar(const wxScrollBar
*scrollbar
,
592 const wxPoint
& pt
) const
593 { return m_renderer
->HitTestScrollbar(scrollbar
, pt
); }
594 virtual wxCoord
ScrollbarToPixel(const wxScrollBar
*scrollbar
,
596 { return m_renderer
->ScrollbarToPixel(scrollbar
, thumbPos
); }
597 virtual int PixelToScrollbar(const wxScrollBar
*scrollbar
,
599 { return m_renderer
->PixelToScrollbar(scrollbar
, coord
); }
600 virtual wxCoord
GetListboxItemHeight(wxCoord fontHeight
)
601 { return m_renderer
->GetListboxItemHeight(fontHeight
); }
602 virtual wxSize
GetCheckBitmapSize() const
603 { return m_renderer
->GetCheckBitmapSize(); }
604 virtual wxSize
GetRadioBitmapSize() const
605 { return m_renderer
->GetRadioBitmapSize(); }
606 virtual wxCoord
GetCheckItemMargin() const
607 { return m_renderer
->GetCheckItemMargin(); }
609 virtual wxRect
GetTextTotalArea(const wxTextCtrl
*text
, const wxRect
& rect
)
610 { return m_renderer
->GetTextTotalArea(text
, rect
); }
611 virtual wxRect
GetTextClientArea(const wxTextCtrl
*text
,
613 wxCoord
*extraSpaceBeyond
)
614 { return m_renderer
->GetTextClientArea(text
, rect
, extraSpaceBeyond
); }
616 virtual wxSize
GetTabIndent() const { return m_renderer
->GetTabIndent(); }
617 virtual wxSize
GetTabPadding() const { return m_renderer
->GetTabPadding(); }
619 virtual wxCoord
GetSliderDim() const
620 { return m_renderer
->GetSliderDim(); }
621 virtual wxCoord
GetSliderTickLen() const
622 { return m_renderer
->GetSliderTickLen(); }
623 virtual wxRect
GetSliderShaftRect(const wxRect
& rect
,
624 wxOrientation orient
) const
625 { return GetSliderShaftRect(rect
, orient
); }
626 virtual wxSize
GetSliderThumbSize(const wxRect
& rect
,
627 wxOrientation orient
) const
628 { return m_renderer
->GetSliderThumbSize(rect
, orient
); }
629 virtual wxSize
GetProgressBarStep() const
630 { return m_renderer
->GetProgressBarStep(); }
631 virtual wxSize
GetMenuBarItemSize(const wxSize
& sizeText
) const
632 { return m_renderer
->GetMenuBarItemSize(sizeText
); }
633 virtual wxMenuGeometryInfo
*GetMenuGeometry(wxWindow
*win
,
634 const wxMenu
& menu
) const
635 { return m_renderer
->GetMenuGeometry(win
, menu
); }
638 wxRenderer
*m_renderer
;
641 // ----------------------------------------------------------------------------
642 // wxControlRenderer: wraps the wxRenderer functions in a form easy to use from
644 // ----------------------------------------------------------------------------
646 class WXDLLEXPORT wxControlRenderer
649 // create a renderer for this dc with this "fundamental" renderer
650 wxControlRenderer(wxWindow
*control
, wxDC
& dc
, wxRenderer
*renderer
);
653 void DrawLabel(const wxBitmap
& bitmap
= wxNullBitmap
,
654 wxCoord marginX
= 0, wxCoord marginY
= 0);
656 void DrawItems(const wxListBox
*listbox
,
657 size_t itemFirst
, size_t itemLast
);
658 #endif // wxUSE_LISTBOX
659 #if wxUSE_CHECKLISTBOX
660 void DrawCheckItems(const wxCheckListBox
*listbox
,
661 size_t itemFirst
, size_t itemLast
);
662 #endif // wxUSE_CHECKLISTBOX
663 void DrawButtonBorder();
664 // the line must be either horizontal or vertical
665 void DrawLine(wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
);
667 void DrawBitmap(const wxBitmap
& bitmap
);
668 void DrawBackgroundBitmap();
669 void DrawScrollbar(const wxScrollBar
*scrollbar
, int thumbPosOld
);
671 void DrawProgressBar(const wxGauge
*gauge
);
672 #endif // wxUSE_GAUGE
675 wxWindow
*GetWindow() const { return m_window
; }
676 wxRenderer
*GetRenderer() const { return m_renderer
; }
678 wxDC
& GetDC() { return m_dc
; }
680 const wxRect
& GetRect() const { return m_rect
; }
681 wxRect
& GetRect() { return m_rect
; }
684 static void DrawBitmap(wxDC
&dc
,
685 const wxBitmap
& bitmap
,
687 int alignment
= wxALIGN_CENTRE
|
688 wxALIGN_CENTRE_VERTICAL
,
689 wxStretch stretch
= wxSTRETCH_NOT
);
692 // common part of DrawItems() and DrawCheckItems()
693 void DoDrawItems(const wxListBox
*listbox
,
694 size_t itemFirst
, size_t itemLast
,
695 bool isCheckLbox
= FALSE
);
698 wxRenderer
*m_renderer
;
703 #endif // _WX_UNIV_RENDERER_H_