~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/interface/listctrlex.h

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define __LISTCTRLEX_H__
3
3
 
4
4
#include "systemimagelist.h"
 
5
#include <wx/dnd.h>
5
6
 
6
7
class wxListCtrlEx : public wxListCtrl, public CSystemImageList
7
8
{
21
22
        void EnablePrefixSearch(bool enable) { m_prefixSearch_enabled = enable; }
22
23
 
23
24
        // Reducing item count does not reset the focused item
24
 
        // if using the generic list control. Work around it.
 
25
        // if using the generic list control. Work around it.
25
26
        void SaveSetItemCount(long count);
26
27
 
27
28
        void ShowColumnEditor();
31
32
        // Moves column. Target position includes both hidden
32
33
        // as well as shown columns
33
34
        void MoveColumn(unsigned int col, unsigned int before);
34
 
        
 
35
 
35
36
        // Do not call after calling LoadColumnSettings
36
37
        void AddColumn(const wxString& name, int align, int initialWidth, bool fixed = false);
37
 
        
 
38
 
38
39
        // LoadColumnSettings needs to be called exactly once after adding
39
40
        // all columns
40
41
        void LoadColumnSettings(int widthsOptionId, int visibilityOptionId, int sortOptionId);
138
139
        wxListCtrlEx& m_listCtrl;
139
140
};
140
141
 
 
142
class CListCtrlDropTarget : public wxEvtHandler, public wxDropTarget
 
143
{
 
144
public:
 
145
        CListCtrlDropTarget(wxListCtrlEx* pListCtrl);
 
146
 
 
147
        virtual bool OnDrop(wxCoord x, wxCoord y);
 
148
 
 
149
        virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
 
150
 
 
151
        virtual void OnLeave();
 
152
 
 
153
        virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
 
154
 
 
155
        virtual void DisplayDropHighlight(wxPoint) = 0;
 
156
 
 
157
protected:
 
158
        bool IsScroll(wxPoint p) const;
 
159
        bool IsTopScroll(wxPoint p) const;
 
160
        bool IsBottomScroll(wxPoint p) const;
 
161
 
 
162
        void OnTimer(wxTimerEvent& /*event*/);
 
163
 
 
164
protected:
 
165
        wxListCtrlEx *m_pListCtrl;
 
166
 
 
167
        wxTimer m_timer;
 
168
        int m_count;
 
169
 
 
170
        DECLARE_EVENT_TABLE();
 
171
};
 
172
 
141
173
#endif //__LISTCTRLEX_H__