bool m_isOnGrip;
};
+class wxWin32FrameInputHandler : public wxStdFrameInputHandler
+{
+public:
+ wxWin32FrameInputHandler(wxInputHandler *handler)
+ : wxStdFrameInputHandler(handler) { }
+
+ virtual bool HandleMouse(wxInputConsumer *control,
+ const wxMouseEvent& event);
+};
+
// ----------------------------------------------------------------------------
// wxWin32ColourScheme: uses (default) Win32 colours
// ----------------------------------------------------------------------------
handler = new wxWin32StatusBarInputHandler(GetDefaultInputHandler());
#endif // wxUSE_STATUSBAR
else if ( control == wxINP_HANDLER_TOPLEVEL )
- handler = new wxStdFrameInputHandler(GetDefaultInputHandler());
+ handler = new wxWin32FrameInputHandler(GetDefaultInputHandler());
else
handler = GetDefaultInputHandler();
// the colour set by the user should be used for the normal state
// and for the states for which we don't have any specific colours
- if ( !col.Ok() || (flags != 0) )
+ if ( !col.Ok() || (flags & wxCONTROL_PRESSED) != 0 )
{
if ( wxDynamicCast(win, wxScrollBar) )
col = Get(flags & wxCONTROL_PRESSED ? SCROLLBAR_PRESSED
#if defined(COLOR_3DDKSHADOW)
case SHADOW_DARK: return wxColour(GetSysColor(COLOR_3DDKSHADOW));
#else
- case SHADOW_DARK: return *wxBLACK;
+ case SHADOW_DARK: return wxColour(GetSysColor(COLOR_3DHADOW));
#endif
case CONTROL_TEXT_DISABLED:
case DESKTOP: return wxColour(0x808000);
#endif // __WXMSW__
+ case GAUGE: return Get(HIGHLIGHT);
+
case MAX:
default:
wxFAIL_MSG(_T("invalid standard colour"));
m_colHighlight = wxSCHEME_COLOUR(scheme, SHADOW_HIGHLIGHT);
m_penHighlight = wxPen(m_colHighlight, 0, wxSOLID);
- m_titlebarFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+ m_titlebarFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
m_titlebarFont.SetWeight(wxFONTWEIGHT_BOLD);
// init the arrow bitmaps
{
// prepare the dc: for now we draw all the items with the system font
wxClientDC dc(win);
- dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+ dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
// the height of a normal item
wxCoord heightText = dc.GetCharHeight();
return wxStdInputHandler::HandleMouseMove(consumer, event);
}
+// ----------------------------------------------------------------------------
+// wxWin32FrameInputHandler
+// ----------------------------------------------------------------------------
+
+bool wxWin32FrameInputHandler::HandleMouse(wxInputConsumer *consumer,
+ const wxMouseEvent& event)
+{
+ if ( event.LeftDClick() )
+ {
+ wxTopLevelWindow *tlw =
+ wxStaticCast(consumer->GetInputWindow(), wxTopLevelWindow);
+
+ long hit = tlw->HitTest(event.GetPosition());
+
+ if ( hit == wxHT_TOPLEVEL_TITLEBAR )
+ {
+ tlw->PerformAction(wxACTION_TOPLEVEL_BUTTON_CLICK,
+ tlw->IsMaximized() ?
+ wxTOPLEVEL_BUTTON_RESTORE :
+ wxTOPLEVEL_BUTTON_MAXIMIZE);
+ return TRUE;
+ }
+ }
+
+ return wxStdFrameInputHandler::HandleMouse(consumer, event);
+}
+