~efargaspro/+junk/codeblocks-16.01-release

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
 * http://www.gnu.org/licenses/gpl-3.0.html
 */

#ifndef REOPENEDITORLISTVIEW_H
#define REOPENEDITORLISTVIEW_H

#include "loggers.h"


class wxListEvent;
class cbProject;
class wxPanel;

class ReopenEditorListView : public wxPanel
{
    public:
        ReopenEditorListView(const wxArrayString& titles, const wxArrayInt& widths);
        ~ReopenEditorListView();

        virtual size_t GetItemsCount() const;
        virtual void Prepend(const wxString& msg, Logger::level lv = Logger::info);
        virtual void Prepend(const wxArrayString& colValues, Logger::level lv = Logger::info);
        virtual void RemoveAt(size_t i);
        virtual wxArrayString GetItemAsArray(long item) const;
        virtual wxString GetFilename(long item) const;
        virtual cbProject* GetProject(long item) const;
        virtual void SetProject(long item, cbProject* prj) const;
    private:
        wxListCtrl* m_pListControl;
        wxArrayString mTitles;
        struct ListStyles
        {
            wxFont font;
            wxColour colour;
        };
        ListStyles style[Logger::num_levels];
        void OnDoubleClick(wxListEvent& event);
        void OnContextMenu(wxContextMenuEvent& /*event*/);
        void OnReopenItems(wxCommandEvent& event);
        void OnRemoveItems(wxCommandEvent& event);
        void OnReopenAll(wxCommandEvent& /*event*/);
        void OnRemoveAll(wxCommandEvent& /*event*/);
        void DoShowContextMenu();
        void DoOpen(wxString fname);
        void DoOpen(wxArrayString fnames);

        DECLARE_EVENT_TABLE()
};

#endif // REOPENEDITORLISTVIEW_H