wxCaret now uses backing store instead of forcing window refresh each time the
caret is hidden; the non blinking carets work too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -196,5 +196,31 @@ private:
|
||||
#include "wx/generic/caret.h"
|
||||
#endif // platform
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCaretSuspend: a simple class which hides the caret in its ctor and
|
||||
// restores it in the dtor, this should be used when drawing on the screen to
|
||||
// avoid overdrawing the caret
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCaretSuspend
|
||||
{
|
||||
public:
|
||||
wxCaretSuspend(wxWindow *win)
|
||||
{
|
||||
m_caret = win->GetCaret();
|
||||
if ( m_caret )
|
||||
m_caret->Hide();
|
||||
}
|
||||
|
||||
~wxCaretSuspend()
|
||||
{
|
||||
if ( m_caret )
|
||||
m_caret->Show();
|
||||
}
|
||||
|
||||
private:
|
||||
wxCaret *m_caret;
|
||||
};
|
||||
|
||||
#endif // _WX_CARET_H_BASE_
|
||||
|
||||
|
Reference in New Issue
Block a user