1. fixed (yet again) highlighting of buttons and checkboxes

2. wrote input handlers for the checkbox
3. fixed bug in wXMouseEvent generation in gtk/window.cpp
4. added focus rect drawing and check/radio geometry queries to wxRenderer


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-09-08 19:03:00 +00:00
parent f40a103306
commit 0399bce91f
19 changed files with 540 additions and 71 deletions

View File

@@ -104,6 +104,9 @@ public:
int flags = 0,
wxRect *rectIn = (wxRect *)NULL) = 0;
// draw a check/radio focus border
virtual void DrawCheckBoxFocusBorder(wxDC& dc, wxRect *rect) = 0;
// draw push button border and return the rectangle left for the label
virtual void DrawButtonBorder(wxDC& dc,
const wxRect& rect,
@@ -194,6 +197,16 @@ public:
// get the height of a listbox item from the base font height
virtual wxCoord GetListboxItemHeight(wxCoord fontHeight) = 0;
// get the standard size of the checkbox bitmap and the margins around it
virtual wxSize GetCheckBitmapSize(wxCoord *marginLeft,
wxCoord *marginRight,
wxCoord *marginTop) const = 0;
// get the standard size of the radio btn bitmap and the margins around it
virtual wxSize GetRadioBitmapSize(wxCoord *marginLeft,
wxCoord *marginRight,
wxCoord *marginTop) const = 0;
// virtual dtor for any base class
virtual ~wxRenderer();
@@ -279,6 +292,8 @@ public:
virtual void DrawVerticalLine(wxDC& dc,
wxCoord x, wxCoord y1, wxCoord y2)
{ m_renderer->DrawVerticalLine(dc, x, y1, y2); }
virtual void DrawCheckBoxFocusBorder(wxDC& dc, wxRect *rect)
{ m_renderer->DrawCheckBoxFocusBorder(dc, rect); }
virtual void DrawButtonBorder(wxDC& dc,
const wxRect& rect,
int flags = 0,
@@ -332,6 +347,18 @@ public:
{ return m_renderer->PixelToScrollbar(scrollbar, coord); }
virtual wxCoord GetListboxItemHeight(wxCoord fontHeight)
{ return m_renderer->GetListboxItemHeight(fontHeight); }
virtual wxSize GetCheckBitmapSize(wxCoord *marginLeft,
wxCoord *marginRight,
wxCoord *marginTop) const
{ return m_renderer->GetCheckBitmapSize(marginLeft,
marginRight,
marginTop); }
virtual wxSize GetRadioBitmapSize(wxCoord *marginLeft,
wxCoord *marginRight,
wxCoord *marginTop) const
{ return m_renderer->GetRadioBitmapSize(marginLeft,
marginRight,
marginTop); }
protected:
wxRenderer *m_renderer;
@@ -365,7 +392,10 @@ public:
wxStretch stretch = wxSTRETCH_NOT);
void DrawBackgroundBitmap();
void DrawScrollbar(const wxScrollBar *scrollbar, int thumbPosOld);
void DrawLabelBox(const wxBitmap& bitmap, wxCoord margin);
void DrawLabelBox(const wxBitmap& bitmap,
wxCoord marginLeft,
wxCoord marginRight,
wxCoord marginTop);
// accessors
wxWindow *GetWindow() const { return m_window; }