search_panel.h
Go to the documentation of this file.
1 
28 #ifndef LOG_VIEW_SEARCH_PANEL_H_
29 #define LOG_VIEW_SEARCH_PANEL_H_
30 
32 #include <log_view/log_filter.h>
33 
34 namespace log_view {
35 
36 class SearchPanel : public PanelInterface {
37  public:
38  SearchPanel(int height, int width, int y, int x, LogFilter& filter) : PanelInterface(height, width, y, x), filter_(filter) {}
39  virtual ~SearchPanel() {}
40  virtual void refresh();
41 
42  virtual void clearSearch();
43  virtual void toggle();
44  virtual bool handleInput(int val);
45 
46  protected:
47  virtual bool canFocus() const { return !show_results_; }
48  virtual bool canInput() const { return true; }
49  virtual int inputOffset() const { return 8; }
50 
52 
53  bool show_results_ = false;
54 };
55 typedef std::shared_ptr<SearchPanel> SearchPanelPtr;
56 
57 } // namespace log_view
58 
59 #endif // LOG_VIEW_SEARCH_PANEL_H_
virtual int inputOffset() const
Definition: search_panel.h:49
virtual bool handleInput(int val)
virtual void clearSearch()
virtual int width() const
SearchPanel(int height, int width, int y, int x, LogFilter &filter)
Definition: search_panel.h:38
virtual bool canInput() const
Definition: search_panel.h:48
virtual int y() const
virtual void toggle()
virtual bool canFocus() const
Definition: search_panel.h:47
virtual int x() const
std::shared_ptr< SearchPanel > SearchPanelPtr
Definition: search_panel.h:55
virtual void refresh()
virtual int height() const


log_view
Author(s): Marc Alban
autogenerated on Thu Mar 4 2021 03:21:52