X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9a0cc4b727ed06da1a776a1b6c4ba66ed4bde3c..4e8d95587c7fbd84af1238a818062704a53b4151:/include/wx/mac/carbon/listctrl.h?ds=sidebyside diff --git a/include/wx/mac/carbon/listctrl.h b/include/wx/mac/carbon/listctrl.h index 0b62528075..9dbab22223 100644 --- a/include/wx/mac/carbon/listctrl.h +++ b/include/wx/mac/carbon/listctrl.h @@ -16,6 +16,8 @@ class wxMacDataBrowserListCtrlControl; class wxMacListControl; +class wxListCtrlTextCtrlWrapper; +class wxListCtrlRenameTimer; WX_DECLARE_EXPORTED_LIST(wxListItem, wxColumnList); @@ -318,6 +320,25 @@ class WXDLLEXPORT wxListCtrl: public wxControl virtual bool SetBackgroundColour(const wxColour& colour); virtual wxColour GetBackgroundColour(); + // functions for editing/timer + void OnRenameTimer(); + bool OnRenameAccept(long itemEdit, const wxString& value); + void OnRenameCancelled(long itemEdit); + + void ChangeCurrent(long current); + void ResetCurrent() { ChangeCurrent((long)-1); } + bool HasCurrent() const { return m_current != (long)-1; } + + void OnLeftDown(wxMouseEvent& event); + void OnDblClick(wxMouseEvent& event); + + void FinishEditing(wxTextCtrl *text) + { + delete text; + m_textctrlWrapper = NULL; + SetFocus(); + } + // with CG, we need to get the context from an kEventControlDraw event // unfortunately, the DataBrowser callbacks don't provide the context // and we need it, so we need to set/remove it before and after draw @@ -331,6 +352,11 @@ protected: int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual wxSize DoGetBestSize() const; + + long m_current; + wxListCtrlTextCtrlWrapper *m_textctrlWrapper; + wxListCtrlRenameTimer *m_renameTimer; // common part of all ctors void Init(); @@ -362,6 +388,9 @@ protected: // keep track of inserted/deleted columns int m_count; // for virtual lists, store item count + +private: + DECLARE_EVENT_TABLE() }; #endif