19#include <zypp-tui/Application>
44 unsigned llen =
l.size();
45 unsigned rlen =
r.size();
119 return e.asUserHistory();
130 static const std::string
done {
_(
"done") };
146 if ( ! (
_msg.empty() &&
_hint.empty() ) )
150 return app_r.exitCode();
164 return std::move(
msg_r);
static Application & instance()
Verbosity verbosity() const
Get current verbosity.
static constexpr Type TYPE_ALL
@ NORMAL
Default output verbosity level.
static constexpr Type TYPE_NONE
virtual bool progressFilter()
Determine whether to show progress.
virtual void searchResult(const Table &table_r)
Print out a search result.
virtual std::string zyppExceptionReport(const zypp::Exception &e)
Return a Exception as a string suitable for output.
virtual void progressEnd(const std::string &id, const std::string &label, const std::string &donetag, bool error=false)=0
End of an operation with reported progress.
Class representing an application (appdata.xml)
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Base class for Exception.
static constexpr unsigned termwidthUnlimited
unsigned defaultTermwidth()
CCString< ColorContext::MSG_ERROR > MSG_ERRORString
CCString< ColorContext::MSG_WARNING > MSG_WARNINGString
static constexpr int ZTUI_EXIT_OK
void mbs_write_wrapped(std::ostream &out, boost::string_ref text_r, size_t indent_r, size_t wrap_r, int indentFix_r=0)
Wrap and indent given text and write it to the output stream out.
ProgressEnd
ProgressBars default end tags.
static std::string combine(std::string &&msg_r, const zypp::Exception &ex_r)
int report(Application &app_r) const
Default way of processing a caught Error exception.
zypp::DefaultIntegral< int,-1 > percentHint
std::string get() const
Return plain line made of lhs + rhs.
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
const std::ostream & stream() const