]>
Commit | Line | Data |
---|---|---|
ffecfa5a JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/palmos/listctrl.cpp | |
3 | // Purpose: wxListCtrl | |
e2731512 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
ffecfa5a JS |
5 | // Modified by: |
6 | // Created: 10/13/04 | |
52f2ad08 | 7 | // RCS-ID: $Id$ |
ffecfa5a JS |
8 | // Copyright: (c) William Osborne |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
ffecfa5a JS |
20 | // For compilers that support precompilation, includes "wx.h". |
21 | #include "wx/wxprec.h" | |
22 | ||
23 | #ifdef __BORLANDC__ | |
24 | #pragma hdrstop | |
25 | #endif | |
26 | ||
52f2ad08 | 27 | #if wxUSE_LISTCTRL |
ffecfa5a JS |
28 | |
29 | #ifndef WX_PRECOMP | |
30 | #include "wx/app.h" | |
31 | #include "wx/intl.h" | |
32 | #include "wx/log.h" | |
33 | #include "wx/settings.h" | |
ed4b0fdc | 34 | #include "wx/dcclient.h" |
ffecfa5a JS |
35 | #endif |
36 | ||
37 | #include "wx/textctrl.h" | |
38 | #include "wx/imaglist.h" | |
39 | #include "wx/listctrl.h" | |
ffecfa5a | 40 | |
ffecfa5a JS |
41 | // ---------------------------------------------------------------------------- |
42 | // events | |
43 | // ---------------------------------------------------------------------------- | |
44 | ||
45 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG) | |
46 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG) | |
47 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT) | |
48 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT) | |
49 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM) | |
50 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS) | |
51 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO) | |
52 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO) | |
53 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED) | |
54 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED) | |
55 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN) | |
56 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM) | |
57 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK) | |
58 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK) | |
59 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG) | |
60 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_DRAGGING) | |
61 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_END_DRAG) | |
62 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK) | |
63 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK) | |
64 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED) | |
65 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_FOCUSED) | |
66 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_CACHE_HINT) | |
67 | ||
68 | #if wxUSE_EXTENDED_RTTI | |
69 | WX_DEFINE_FLAGS( wxListCtrlStyle ) | |
70 | ||
71 | wxBEGIN_FLAGS( wxListCtrlStyle ) | |
72 | // new style border flags, we put them first to | |
73 | // use them for streaming out | |
74 | wxFLAGS_MEMBER(wxBORDER_SIMPLE) | |
75 | wxFLAGS_MEMBER(wxBORDER_SUNKEN) | |
76 | wxFLAGS_MEMBER(wxBORDER_DOUBLE) | |
77 | wxFLAGS_MEMBER(wxBORDER_RAISED) | |
78 | wxFLAGS_MEMBER(wxBORDER_STATIC) | |
79 | wxFLAGS_MEMBER(wxBORDER_NONE) | |
5445a26c | 80 | |
ffecfa5a JS |
81 | // old style border flags |
82 | wxFLAGS_MEMBER(wxSIMPLE_BORDER) | |
83 | wxFLAGS_MEMBER(wxSUNKEN_BORDER) | |
84 | wxFLAGS_MEMBER(wxDOUBLE_BORDER) | |
85 | wxFLAGS_MEMBER(wxRAISED_BORDER) | |
86 | wxFLAGS_MEMBER(wxSTATIC_BORDER) | |
87 | wxFLAGS_MEMBER(wxBORDER) | |
88 | ||
89 | // standard window styles | |
90 | wxFLAGS_MEMBER(wxTAB_TRAVERSAL) | |
91 | wxFLAGS_MEMBER(wxCLIP_CHILDREN) | |
92 | wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) | |
93 | wxFLAGS_MEMBER(wxWANTS_CHARS) | |
94 | wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) | |
95 | wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) | |
96 | wxFLAGS_MEMBER(wxVSCROLL) | |
97 | wxFLAGS_MEMBER(wxHSCROLL) | |
98 | ||
99 | wxFLAGS_MEMBER(wxLC_LIST) | |
100 | wxFLAGS_MEMBER(wxLC_REPORT) | |
101 | wxFLAGS_MEMBER(wxLC_ICON) | |
102 | wxFLAGS_MEMBER(wxLC_SMALL_ICON) | |
103 | wxFLAGS_MEMBER(wxLC_ALIGN_TOP) | |
104 | wxFLAGS_MEMBER(wxLC_ALIGN_LEFT) | |
105 | wxFLAGS_MEMBER(wxLC_AUTOARRANGE) | |
106 | wxFLAGS_MEMBER(wxLC_USER_TEXT) | |
107 | wxFLAGS_MEMBER(wxLC_EDIT_LABELS) | |
108 | wxFLAGS_MEMBER(wxLC_NO_HEADER) | |
109 | wxFLAGS_MEMBER(wxLC_SINGLE_SEL) | |
110 | wxFLAGS_MEMBER(wxLC_SORT_ASCENDING) | |
111 | wxFLAGS_MEMBER(wxLC_SORT_DESCENDING) | |
112 | wxFLAGS_MEMBER(wxLC_VIRTUAL) | |
113 | ||
114 | wxEND_FLAGS( wxListCtrlStyle ) | |
115 | ||
116 | IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h") | |
117 | ||
118 | wxBEGIN_PROPERTIES_TABLE(wxListCtrl) | |
5445a26c | 119 | wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) |
ffecfa5a JS |
120 | |
121 | wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style | |
122 | wxEND_PROPERTIES_TABLE() | |
123 | ||
124 | wxBEGIN_HANDLERS_TABLE(wxListCtrl) | |
125 | wxEND_HANDLERS_TABLE() | |
126 | ||
5445a26c | 127 | wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) |
ffecfa5a JS |
128 | |
129 | /* | |
130 | Content-type: text/html ]>