3 * Custom list control, which send "list marked" events when the user right-
4 * click on a item, or double-click on a mark.
6 * Nicolas Boichat, April 2004
11 Copyright (C) 2004 Kern Sibbald and John Walker
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License
15 as published by the Free Software Foundation; either version 2
16 of the License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #include "wx/wxprec.h"
37 #include <wx/listctrl.h>
39 BEGIN_DECLARE_EVENT_TYPES()
40 DECLARE_LOCAL_EVENT_TYPE(wxbLIST_MARKED_EVENT, 1)
41 END_DECLARE_EVENT_TYPES()
43 /* Customized list event, used for marking events */
44 class wxbListMarkedEvent: public wxEvent {
46 wxbListMarkedEvent(int id);
47 ~wxbListMarkedEvent();
48 wxbListMarkedEvent(const wxbListMarkedEvent& te);
49 virtual wxEvent *Clone() const;
53 typedef void (wxEvtHandler::*wxListMarkedEventFunction)(wxbListMarkedEvent&);
55 #define EVT_LIST_MARKED_EVENT(id, fn) \
56 DECLARE_EVENT_TABLE_ENTRY( \
57 wxbLIST_MARKED_EVENT, id, wxID_ANY, \
58 (wxObjectEventFunction)(wxEventFunction)(wxListMarkedEventFunction)&fn, \
62 /* Customized list, which transmit double clicks on images */
63 class wxbListCtrl: public wxListCtrl {
65 wxbListCtrl(wxWindow* parent, wxEvtHandler* handler, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
69 void OnDoubleClicked(wxMouseEvent& event);
70 void OnRightClicked(wxMouseEvent& event);
72 wxEvtHandler* handler;
74 DECLARE_EVENT_TABLE();
77 #endif // WXBTREECTRL_H