]>
Commit | Line | Data |
---|---|---|
789295bf VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: 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 | // RCS-ID: $Id$ | |
77ffb593 JS |
8 | // Copyright: (c) wxWidgets team |
9 | // Licence: wxWidgets licence | |
789295bf VZ |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_CARET_H_ | |
13 | #define _WX_CARET_H_ | |
14 | ||
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
789295bf VZ |
16 | #pragma interface "caret.h" |
17 | #endif | |
18 | ||
19 | class WXDLLEXPORT wxCaret : public wxCaretBase | |
20 | { | |
21 | public: | |
22 | wxCaret() { Init(); } | |
23 | // create the caret of given (in pixels) width and height and associate | |
24 | // with the given window | |
25 | wxCaret(wxWindow *window, int width, int height) | |
26 | { | |
27 | Init(); | |
28 | ||
29 | (void)Create(window, width, height); | |
30 | } | |
31 | // same as above | |
32 | wxCaret(wxWindowBase *window, const wxSize& size) | |
33 | { | |
7140577b | 34 | Init(); |
789295bf VZ |
35 | |
36 | (void)Create(window, size); | |
37 | } | |
38 | ||
39 | // process wxWindow notifications | |
40 | virtual void OnSetFocus(); | |
41 | virtual void OnKillFocus(); | |
42 | ||
43 | protected: | |
44 | void Init() | |
45 | { | |
46 | wxCaretBase::Init(); | |
47 | ||
48 | m_hasCaret = FALSE; | |
49 | } | |
50 | ||
51 | // override base class virtuals | |
52 | virtual void DoMove(); | |
53 | virtual void DoShow(); | |
54 | virtual void DoHide(); | |
cfb76a19 | 55 | virtual void DoSize(); |
789295bf VZ |
56 | |
57 | // helper function which creates the system caret | |
58 | bool MSWCreateCaret(); | |
59 | ||
60 | private: | |
61 | bool m_hasCaret; | |
fc7a2a60 VZ |
62 | |
63 | DECLARE_NO_COPY_CLASS(wxCaret) | |
789295bf VZ |
64 | }; |
65 | ||
66 | #endif // _WX_CARET_H_ | |
67 | ||
68 |