]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/caret.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / msw / caret.h
CommitLineData
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
77ffb593 7// Copyright: (c) wxWidgets team
65571936 8// Licence: wxWindows licence
789295bf
VZ
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_CARET_H_
12#define _WX_CARET_H_
13
53a2db12 14class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
789295bf
VZ
15{
16public:
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 {
7140577b 29 Init();
789295bf
VZ
30
31 (void)Create(window, size);
32 }
33
34 // process wxWindow notifications
35 virtual void OnSetFocus();
36 virtual void OnKillFocus();
37
38protected:
39 void Init()
40 {
41 wxCaretBase::Init();
42
02b7b6b0 43 m_hasCaret = false;
789295bf
VZ
44 }
45
46 // override base class virtuals
47 virtual void DoMove();
48 virtual void DoShow();
49 virtual void DoHide();
cfb76a19 50 virtual void DoSize();
789295bf
VZ
51
52 // helper function which creates the system caret
53 bool MSWCreateCaret();
54
55private:
56 bool m_hasCaret;
fc7a2a60 57
c0c133e1 58 wxDECLARE_NO_COPY_CLASS(wxCaret);
789295bf
VZ
59};
60
61#endif // _WX_CARET_H_
62
63