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