IndicatorStatus_Max
};
-// ----------------------------------------------------------------------------
// wxWin32Renderer: draw the GUI elements in Win32 style
// ----------------------------------------------------------------------------
const wxMenuGeometryInfo& geomInfo);
#endif
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
+ wxBitmap *bmpFocus,
wxBitmap *bmpPressed,
wxBitmap *bmpDisabled);
{
switch ( col )
{
+ // use the system colours under Windows
+#if defined(__WXMSW__)
+ case WINDOW: return wxColour(GetSysColor(COLOR_WINDOW));
+
+ case CONTROL_PRESSED:
+ case CONTROL_CURRENT:
+ case CONTROL: return wxColour(GetSysColor(COLOR_BTNFACE));
+
+ case CONTROL_TEXT: return wxColour(GetSysColor(COLOR_BTNTEXT));
+
+ case SCROLLBAR: return wxColour(GetSysColor(COLOR_SCROLLBAR));
+ case SCROLLBAR_PRESSED: return wxColour(GetSysColor(COLOR_HIGHLIGHT));
+
+ case HIGHLIGHT: return wxColour(GetSysColor(COLOR_HIGHLIGHT));
+ case HIGHLIGHT_TEXT: return wxColour(GetSysColor(COLOR_HIGHLIGHTTEXT));
+
+#if defined(COLOR_3DDKSHADOW)
+ case SHADOW_DARK: return wxColour(GetSysColor(COLOR_3DDKSHADOW));
+#else
+ case SHADOW_DARK: return *wxBLACK;
+#endif
+
+ case CONTROL_TEXT_DISABLED:
+ case SHADOW_HIGHLIGHT: return wxColour(GetSysColor(COLOR_BTNHIGHLIGHT));
+
+ case SHADOW_IN: return wxColour(GetSysColor(COLOR_BTNFACE));
+
+ case CONTROL_TEXT_DISABLED_SHADOW:
+ case SHADOW_OUT: return wxColour(GetSysColor(COLOR_BTNSHADOW));
+#else // !__WXMSW__
+ // use the standard Windows colours elsewhere
case WINDOW: return *wxWHITE;
case CONTROL_PRESSED:
case CONTROL_TEXT_DISABLED_SHADOW:
case SHADOW_OUT: return wxColour(0x7f7f7f);
+#endif // __WXMSW__
case MAX:
default:
DrawLine(dc, x2, y1, x2, y2, orient == wxVERTICAL);
}
-#if wxUSE_MENUS
// ----------------------------------------------------------------------------
// menu and menubar
// ----------------------------------------------------------------------------
GetMenuGeometry(wxWindow *, const wxMenu&) const;
};
-#endif // wxUSE_WAVE
+#endif // wxUSE_MENUS
// FIXME: all constants are hardcoded but shouldn't be
static const wxCoord MENU_LEFT_MARGIN = 9;
return gi;
}
-<<<<<<< win32.cpp
-#endif
-=======
#else // !wxUSE_MENUS
+/*
void wxWin32Renderer::DrawMenuBarItem(wxDC& WXUNUSED(dc),
const wxRect& WXUNUSED(rectOrig),
const wxString& WXUNUSED(label),
{
return NULL;
}
+*/
#endif // wxUSE_MENUS/!wxUSE_MENUS
->>>>>>> 1.5
// ----------------------------------------------------------------------------
// combobox
// ----------------------------------------------------------------------------
void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal,
+ wxBitmap *bmpFocus,
wxBitmap *bmpPressed,
wxBitmap *bmpDisabled)
{
#if wxUSE_BUTTON
if ( wxDynamicCast(window, wxButton) )
{
- // TODO
- size->x += 3*window->GetCharWidth();
-#if 0 // do allow creating small buttons if wanted
- wxSize sizeDef = wxButton::GetDefaultSize();
- if ( size->x < sizeDef.x )
- size->x = sizeDef.x;
-#endif // 0
-
- wxCoord heightBtn = (11*(window->GetCharHeight() + 8))/10;
- if ( size->y < heightBtn - 8 )
- size->y = heightBtn;
- else
- size->y += 9;
+ if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
+ {
+ // TODO: don't harcode all this
+ size->x += 3*window->GetCharWidth();
+
+ wxCoord heightBtn = (11*(window->GetCharHeight() + 8))/10;
+ if ( size->y < heightBtn - 8 )
+ size->y = heightBtn;
+ else
+ size->y += 9;
+ }
// no border width adjustments for buttons
return;