wxCoord y,
const wxMenuGeometryInfo& geomInfo);
#endif
+
+ virtual void DrawFrameTitleBar(wxDC& dc,
+ const wxRect& rect,
+ const wxString& title,
+ const wxIcon& icon,
+ int flags,
+ int pressedButtons = 0);
+ virtual void DrawFrameBorder(wxDC& dc,
+ const wxRect& rect,
+ int flags);
+ virtual void DrawFrameBackground(wxDC& dc,
+ const wxRect& rect,
+ int flags);
+ virtual void DrawFrameTitle(wxDC& dc,
+ const wxRect& rect,
+ const wxString& title,
+ int flags);
+ virtual void DrawFrameIcon(wxDC& dc,
+ const wxRect& rect,
+ const wxIcon& icon,
+ int flags);
+ virtual void DrawFrameButton(wxDC& dc,
+ wxCoord x, wxCoord y,
+ int button,
+ int flags = 0);
+
+ // titlebars
+ virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const;
+ virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const;
+ virtual wxSize GetFrameIconSize() const;
+
virtual void GetComboBitmaps(wxBitmap *bmpNormal,
wxBitmap *bmpFocus,
wxBitmap *bmpPressed,
public:
wxGTKInputHandler(wxGTKRenderer *renderer);
- virtual bool HandleKey(wxControl *control,
+ virtual bool HandleKey(wxInputConsumer *control,
const wxKeyEvent& event,
bool pressed);
- virtual bool HandleMouse(wxControl *control,
+ virtual bool HandleMouse(wxInputConsumer *control,
const wxMouseEvent& event);
- virtual bool HandleMouseMove(wxControl *control, const wxMouseEvent& event);
+ virtual bool HandleMouseMove(wxInputConsumer *control, const wxMouseEvent& event);
protected:
wxGTKRenderer *m_renderer;
wxGTKCheckboxInputHandler(wxInputHandler *handler)
: wxStdCheckboxInputHandler(handler) { }
- virtual bool HandleKey(wxControl *control,
+ virtual bool HandleKey(wxInputConsumer *control,
const wxKeyEvent& event,
bool pressed);
};
wxGTKTextCtrlInputHandler(wxInputHandler *handler)
: wxStdTextCtrlInputHandler(handler) { }
- virtual bool HandleKey(wxControl *control,
+ virtual bool HandleKey(wxInputConsumer *control,
const wxKeyEvent& event,
bool pressed);
};
}
}
+// ----------------------------------------------------------------------------
+// top level windows
+// ----------------------------------------------------------------------------
+
+void wxGTKRenderer::DrawFrameTitleBar(wxDC& dc,
+ const wxRect& rect,
+ const wxString& title,
+ const wxIcon& icon,
+ int flags,
+ int pressedButtons = 0)
+{
+}
+
+void wxGTKRenderer::DrawFrameBorder(wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameBackground(wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameTitle(wxDC& dc,
+ const wxRect& rect,
+ const wxString& title,
+ int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameIcon(wxDC& dc,
+ const wxRect& rect,
+ const wxIcon& icon,
+ int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameButton(wxDC& dc,
+ wxCoord x, wxCoord y,
+ int button,
+ int flags = 0)
+{
+}
+
+wxRect wxGTKRenderer::GetFrameClientArea(const wxRect& rect, int flags) const
+{
+ return rect;
+}
+
+wxSize wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, int flags) const
+{
+ return clientSize;
+}
+
+wxSize wxGTKRenderer::GetFrameIconSize() const
+{
+ return wxSize(-1, -1);
+}
+
+
+
// ============================================================================
// wxInputHandler
// ============================================================================
m_renderer = renderer;
}
-bool wxGTKInputHandler::HandleKey(wxControl *control,
+bool wxGTKInputHandler::HandleKey(wxInputConsumer *control,
const wxKeyEvent& event,
bool pressed)
{
return FALSE;
}
-bool wxGTKInputHandler::HandleMouse(wxControl *control,
+bool wxGTKInputHandler::HandleMouse(wxInputConsumer *control,
const wxMouseEvent& event)
{
// clicking on the control gives it focus
- if ( event.ButtonDown() )
+ if ( event.ButtonDown() && wxWindow::FindFocus() != control->GetInputWindow() )
{
- control->SetFocus();
+ control->GetInputWindow()->SetFocus();
return TRUE;
}
return FALSE;
}
-bool wxGTKInputHandler::HandleMouseMove(wxControl *control,
+bool wxGTKInputHandler::HandleMouseMove(wxInputConsumer *control,
const wxMouseEvent& event)
{
if ( event.Entering() )
{
- control->SetCurrent(TRUE);
+ control->GetInputWindow()->SetCurrent(TRUE);
}
else if ( event.Leaving() )
{
- control->SetCurrent(FALSE);
+ control->GetInputWindow()->SetCurrent(FALSE);
}
else
{
// wxGTKCheckboxInputHandler
// ----------------------------------------------------------------------------
-bool wxGTKCheckboxInputHandler::HandleKey(wxControl *control,
+bool wxGTKCheckboxInputHandler::HandleKey(wxInputConsumer *control,
const wxKeyEvent& event,
bool pressed)
{
// wxGTKTextCtrlInputHandler
// ----------------------------------------------------------------------------
-bool wxGTKTextCtrlInputHandler::HandleKey(wxControl *control,
+bool wxGTKTextCtrlInputHandler::HandleKey(wxInputConsumer *control,
const wxKeyEvent& event,
bool pressed)
{