]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/caret.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: generic/caret.h
3 // Purpose: generic wxCaret class
4 // Author: Vadim Zeitlin (original code by Robert Roebling)
8 // Copyright: (c) wxWidgets team
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
17 class WXDLLIMPEXP_CORE wxCaret
;
19 class WXDLLEXPORT wxCaretTimer
: public wxTimer
22 wxCaretTimer(wxCaret
*caret
);
23 virtual void Notify();
29 class WXDLLIMPEXP_CORE wxCaret
: public wxCaretBase
34 // default - use Create()
35 wxCaret() : m_timer(this) { InitGeneric(); }
36 // creates a block caret associated with the given window
37 wxCaret(wxWindowBase
*window
, int width
, int height
)
38 : wxCaretBase(window
, width
, height
), m_timer(this) { InitGeneric(); }
39 wxCaret(wxWindowBase
*window
, const wxSize
& size
)
40 : wxCaretBase(window
, size
), m_timer(this) { InitGeneric(); }
47 // called by wxWindow (not using the event tables)
48 virtual void OnSetFocus();
49 virtual void OnKillFocus();
51 // called by wxCaretTimer
55 virtual void DoShow();
56 virtual void DoHide();
57 virtual void DoMove();
58 virtual void DoSize();
60 // blink the caret once
66 // draw the caret on the given DC
67 void DoDraw(wxDC
*dc
);
70 // GTK specific initialization
73 // the bitmap holding the part of window hidden by the caret when it was
74 // at (m_xOld, m_yOld)
75 wxBitmap m_bmpUnderCaret
;
80 bool m_blinkedOut
, // true => caret hidden right now
81 m_hasFocus
; // true => our window has focus
84 #endif // _WX_CARET_H_