]>
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 ///////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "caret.h"
23 class WXDLLEXPORT wxCaretTimer
: public wxTimer
26 wxCaretTimer(wxCaret
*caret
);
27 virtual void Notify();
33 class wxCaret
: public wxCaretBase
38 // default - use Create()
39 wxCaret() : m_timer(this) { InitGeneric(); }
40 // creates a block caret associated with the given window
41 wxCaret(wxWindowBase
*window
, int width
, int height
)
42 : wxCaretBase(window
, width
, height
), m_timer(this) { InitGeneric(); }
43 wxCaret(wxWindowBase
*window
, const wxSize
& size
)
44 : wxCaretBase(window
, size
), m_timer(this) { InitGeneric(); }
51 // called by wxWindow (not using the event tables)
52 virtual void OnSetFocus();
53 virtual void OnKillFocus();
55 // called by wxCaretTimer
59 virtual void DoShow();
60 virtual void DoHide();
61 virtual void DoMove();
62 virtual void DoSize();
64 // blink the caret once
70 // draw the caret on the given DC
71 void DoDraw(wxDC
*dc
);
74 // GTK specific initialization
77 // the bitmap holding the part of window hidden by the caret when it was
78 // at (m_xOld, m_yOld)
79 wxBitmap m_bmpUnderCaret
;
84 bool m_blinkedOut
, // true => caret hidden right now
85 m_hasFocus
; // true => our window has focus
88 #endif // _WX_CARET_H_