.. _program_listing_file__tmp_ws_src_log_view_include_log_view_panels_node_panel.h: Program Listing for File node_panel.h ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/log_view/include/log_view/panels/node_panel.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef LOG_VIEW_NODE_PANEL_H_ #define LOG_VIEW_NODE_PANEL_H_ #include #include namespace log_view { class NodePanel : public PanelInterface { public: NodePanel(int height, int width, int y, int x, LogFilter& filter) : PanelInterface(height, width, y, x), filter_(filter) {} virtual ~NodePanel() {} virtual void refresh(); virtual bool handleMouse(const MEVENT& event); virtual bool handleKey(int key); protected: virtual bool canFocus() const { return true; } virtual bool canNavigate() const { return true; } virtual bool canSelect() const { return true; } virtual size_t getContentSize() const { return filter_.nodes().size(); } virtual int getContentHeight() const { return height_ - 2; } virtual int getContentWidth() const; virtual void follow(bool enable); virtual void moveTo(size_t index); virtual void setCursor(int64_t cursor) { cursor_ = cursor; } virtual int64_t getCursor() const { return cursor_; } virtual void select(); size_t cursor_ = 0; std::string selected_; LogFilter& filter_; }; typedef std::shared_ptr NodePanelPtr; } // namespace log_view #endif // LOG_VIEW_NODE_PANEL_H_