1999-05-23 23:48:12 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2011-03-20 00:14:35 +00:00
|
|
|
// Name: wx/msw/caret.h
|
1999-05-23 23:48:12 +00:00
|
|
|
// Purpose: wxCaret class - the MSW implementation of wxCaret
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 23.05.99
|
2004-05-23 14:56:36 +00:00
|
|
|
// Copyright: (c) wxWidgets team
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-05-23 23:48:12 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CARET_H_
|
|
|
|
#define _WX_CARET_H_
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
|
1999-05-23 23:48:12 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxCaret() { Init(); }
|
|
|
|
// create the caret of given (in pixels) width and height and associate
|
|
|
|
// with the given window
|
|
|
|
wxCaret(wxWindow *window, int width, int height)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
(void)Create(window, width, height);
|
|
|
|
}
|
|
|
|
// same as above
|
|
|
|
wxCaret(wxWindowBase *window, const wxSize& size)
|
|
|
|
{
|
2000-01-10 07:21:53 +00:00
|
|
|
Init();
|
1999-05-23 23:48:12 +00:00
|
|
|
|
|
|
|
(void)Create(window, size);
|
|
|
|
}
|
|
|
|
|
|
|
|
// process wxWindow notifications
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual void OnSetFocus() wxOVERRIDE;
|
|
|
|
virtual void OnKillFocus() wxOVERRIDE;
|
1999-05-23 23:48:12 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void Init()
|
|
|
|
{
|
|
|
|
wxCaretBase::Init();
|
|
|
|
|
2004-08-20 12:03:08 +00:00
|
|
|
m_hasCaret = false;
|
1999-05-23 23:48:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// override base class virtuals
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual void DoMove() wxOVERRIDE;
|
|
|
|
virtual void DoShow() wxOVERRIDE;
|
|
|
|
virtual void DoHide() wxOVERRIDE;
|
|
|
|
virtual void DoSize() wxOVERRIDE;
|
1999-05-23 23:48:12 +00:00
|
|
|
|
|
|
|
// helper function which creates the system caret
|
|
|
|
bool MSWCreateCaret();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_hasCaret;
|
2003-07-22 00:24:07 +00:00
|
|
|
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxCaret);
|
1999-05-23 23:48:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_CARET_H_
|
|
|
|
|
|
|
|
|