major delays in processing button clicks)
Added wxFULL_REPAINT_ON_RESIZE as default for wxStatusBar
on wxGTK since otherwise there are display problems.
Similarly for wxGrid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26132
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_STATUSBAR
// create the main status bar by calling OnCreateStatusBar()
virtual wxStatusBar* CreateStatusBar(int number = 1,
#if wxUSE_STATUSBAR
// create the main status bar by calling OnCreateStatusBar()
virtual wxStatusBar* CreateStatusBar(int number = 1,
- long style = wxST_SIZEGRIP,
+ long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
wxWindowID winid = 0,
const wxString& name =
wxStatusLineNameStr);
wxWindowID winid = 0,
const wxString& name =
wxStatusLineNameStr);
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
wxWindowID winid,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
+ long style = wxFULL_REPAINT_ON_RESIZE,
const wxString& name = wxPanelNameStr)
{
Init();
const wxString& name = wxPanelNameStr)
{
Init();
bool Create(wxWindow *parent, wxWindowID winid,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
const wxSize& WXUNUSED(size) = wxDefaultSize,
bool Create(wxWindow *parent, wxWindowID winid,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
const wxSize& WXUNUSED(size) = wxDefaultSize,
+ long style = wxFULL_REPAINT_ON_RESIZE,
const wxString& name = wxPanelNameStr)
{
return Create(parent, winid, style, name);
const wxString& name = wxPanelNameStr)
{
return Create(parent, winid, style, name);
void OnKillFocus( wxFocusEvent &event );
void OnChar( wxKeyEvent &event );
void OnMouse( wxMouseEvent &event );
void OnKillFocus( wxFocusEvent &event );
void OnChar( wxKeyEvent &event );
void OnMouse( wxMouseEvent &event );
+ void OnGetToolTip( wxTreeEvent &event );
void OnInternalIdle( );
// implementation helpers
void OnInternalIdle( );
// implementation helpers
virtual void PositionStatusBar();
virtual wxStatusBar* CreateStatusBar(int number = 1,
virtual void PositionStatusBar();
virtual wxStatusBar* CreateStatusBar(int number = 1,
- long style = wxST_SIZEGRIP,
+ long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
#endif // wxUSE_STATUSBAR
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
#endif // wxUSE_STATUSBAR
virtual void PositionStatusBar();
virtual wxStatusBar* CreateStatusBar(int number = 1,
virtual void PositionStatusBar();
virtual wxStatusBar* CreateStatusBar(int number = 1,
- long style = wxST_SIZEGRIP,
+ long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
#endif // wxUSE_STATUSBAR
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
#endif // wxUSE_STATUSBAR
wxGridRowLabelWindow::wxGridRowLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
wxGridRowLabelWindow::wxGridRowLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
wxGridColLabelWindow::wxGridColLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
wxGridColLabelWindow::wxGridColLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
wxWindowID id,
const wxPoint &pos,
const wxSize &size )
wxWindowID id,
const wxPoint &pos,
const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxCLIP_CHILDREN,
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE,
EVT_CHAR (wxGenericTreeCtrl::OnChar)
EVT_SET_FOCUS (wxGenericTreeCtrl::OnSetFocus)
EVT_KILL_FOCUS (wxGenericTreeCtrl::OnKillFocus)
EVT_CHAR (wxGenericTreeCtrl::OnChar)
EVT_SET_FOCUS (wxGenericTreeCtrl::OnSetFocus)
EVT_KILL_FOCUS (wxGenericTreeCtrl::OnKillFocus)
+ EVT_TREE_ITEM_GETTOOLTIP(-1, wxGenericTreeCtrl::OnGetToolTip)
END_EVENT_TABLE()
#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
END_EVENT_TABLE()
#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
// Is the mouse over a tree item button?
int flags = 0;
// Is the mouse over a tree item button?
int flags = 0;
- wxGenericTreeItem *underMouse = m_anchor->HitTest(pt, this, flags, 0);
+ wxGenericTreeItem *thisItem = m_anchor->HitTest(pt, this, flags, 0);
+ wxGenericTreeItem *underMouse = thisItem;
+ bool underMouseChanged = (underMouse != m_underMouse) ;
+
if ((underMouse) &&
(flags & wxTREE_HITTEST_ONITEMBUTTON) &&
(!event.LeftIsDown()) &&
if ((underMouse) &&
(flags & wxTREE_HITTEST_ONITEMBUTTON) &&
(!event.LeftIsDown()) &&
#if wxUSE_TOOLTIPS
// Determines what item we are hovering over and need a tooltip for
#if wxUSE_TOOLTIPS
// Determines what item we are hovering over and need a tooltip for
- wxTreeItemId hoverItem = HitTest(ScreenToClient(wxGetMousePosition()));
+ wxTreeItemId hoverItem = thisItem;
// We do not want a tooltip if we are dragging, or if the rename timer is running
// We do not want a tooltip if we are dragging, or if the rename timer is running
- if (hoverItem.IsOk() && !m_isDragging && (!m_renameTimer || !m_renameTimer->IsRunning()))
+ if (underMouseChanged && hoverItem.IsOk() && !m_isDragging && (!m_renameTimer || !m_renameTimer->IsRunning()))
{
// Ask the tree control what tooltip (if any) should be shown
wxTreeEvent hevent(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, GetId());
{
// Ask the tree control what tooltip (if any) should be shown
wxTreeEvent hevent(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, GetId());
+// Process the tooltip event, to speed up event processing.
+// Doesn't actually get a tooltip.
+void wxGenericTreeCtrl::OnGetToolTip( wxTreeEvent &event )
+{
+ event.Veto();
+}
+