#ifndef NEWSBOAT_ITEMVIEW_FORMACTION_H_ #define NEWSBOAT_ITEMVIEW_FORMACTION_H_ #include #include #include #include #include namespace newsboat { class itemlist_formaction; class itemview_formaction : public formaction { public: itemview_formaction(view *, std::shared_ptr il, std::string formstr); ~itemview_formaction() override; void prepare() override; void init() override; void set_guid(const std::string& guid_) { guid = guid_; } void set_feed(std::shared_ptr fd) { feed = fd; } void set_highlightphrase(const std::string& text); keymap_hint_entry * get_keymap_hint() override; void handle_cmdline(const std::string& cmd) override; std::string id() const override { return "article"; } std::string title() override; void finished_qna(operation op) override; std::vector> render_html( const std::string& source, std::vector& thelinks, const std::string& url); void set_regexmanager(regexmanager * r); void update_percent(); private: void process_operation(operation op, bool automatic = false, std::vector * args = nullptr) override; void set_head(const std::string& s, const std::string& feedtitle, unsigned int unread, unsigned int total); void highlight_text(const std::string& searchphrase); void render_source( std::vector>& lines, std::string source); void do_search(); std::string guid; std::shared_ptr feed; bool show_source; std::vector links; bool quit; regexmanager * rxman; unsigned int num_lines; std::shared_ptr itemlist; bool in_search; }; } #endif /* NEWSBOAT_ITEMVIEW_FORMACTION_H_ */