#ifndef _WX_TEXTCTRL_H_
#define _WX_TEXTCTRL_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "textctrl.h"
#endif
// controls)
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
virtual bool SetDefaultStyle(const wxTextAttr& style);
+ virtual bool GetStyle(long position, wxTextAttr& style);
#endif // wxUSE_RICHEDIT
// translate between the position (which is just an index in the text ctrl
virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable);
+ // Caret handling (Windows only)
+
+ bool ShowNativeCaret(bool show = true);
+ bool HideNativeCaret() { return ShowNativeCaret(false); }
+
// Implementation from now on
// --------------------------
// EDIT control has one already)
void OnRightClick(wxMouseEvent& event);
+ // be sure the caret remains invisible if the user
+ // called HideNativeCaret() before
+ void OnSetFocus(wxFocusEvent& event);
+
protected:
// common part of all ctors
void Init();
private:
DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS(wxTextCtrl)
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl)
wxMenu* m_privateContextMenu;
+
+ bool m_isNativeCaretShown;
};
#endif