]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/caret.h
c179032d08e4a77175bf7c324d9fdd26475c729c
[wxWidgets.git] / include / wx / msw / caret.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/caret.h
3 // Purpose: wxCaret class - the MSW implementation of wxCaret
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 23.05.99
7 // Copyright: (c) wxWidgets team
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_CARET_H_
12 #define _WX_CARET_H_
13
14 class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
15 {
16 public:
17 wxCaret() { Init(); }
18 // create the caret of given (in pixels) width and height and associate
19 // with the given window
20 wxCaret(wxWindow *window, int width, int height)
21 {
22 Init();
23
24 (void)Create(window, width, height);
25 }
26 // same as above
27 wxCaret(wxWindowBase *window, const wxSize& size)
28 {
29 Init();
30
31 (void)Create(window, size);
32 }
33
34 // process wxWindow notifications
35 virtual void OnSetFocus();
36 virtual void OnKillFocus();
37
38 protected:
39 void Init()
40 {
41 wxCaretBase::Init();
42
43 m_hasCaret = false;
44 }
45
46 // override base class virtuals
47 virtual void DoMove();
48 virtual void DoShow();
49 virtual void DoHide();
50 virtual void DoSize();
51
52 // helper function which creates the system caret
53 bool MSWCreateCaret();
54
55 private:
56 bool m_hasCaret;
57
58 wxDECLARE_NO_COPY_CLASS(wxCaret);
59 };
60
61 #endif // _WX_CARET_H_
62
63