about summary refs log tree commit diff stats
path: root/src/items_pane.h
blob: aa09c491ab28e8ad9e20039e56ae7c0d5172cd9b (plain) (blame)
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
#ifndef ITEMS_PANE_H_EB637EE3
#define ITEMS_PANE_H_EB637EE3

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include <wx/listctrl.h>

#include <memory>
#include <vector>

#include "ap_state.h"

class ItemsPane : public wxListView {
 public:
  explicit ItemsPane(wxWindow* parent);

  void ResetIndicators();
  void UpdateIndicators(const std::vector<ItemState>& items);

 private:
  void OnColClick(wxListEvent& event);
  void OnDPIChanged(wxDPIChangedEvent& event);

  void DoSort(int col, bool ascending);

  std::vector<std::unique_ptr<ItemState>> items_;
};

#endif /* end of include guard: ITEMS_PANE_H_EB637EE3 */