(
const string& sContents =
"",
const string& sBulletSrc =
"") = 0;
103 virtual void AddValueCol(
const string& sContents =
"",
unsignedwidth = 200,
boolisNoWrap =
false) = 0;
118 virtual void AddRow(
const string& sContents =
"",
unsignedcolspan = 2) = 0;
130 virtual void AddRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200,
boolnoSpaceInsert =
false) = 0;
140 virtual void AddLinkRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200) = 0;
152 virtual void AddLinkRow(
const string& sTag,
const string& sText,
const string& sUrl,
unsignedvalueColWidth = 200) = 0;
179 virtual string CreateLink(
const string& sLabel,
const string& sUrl)
const= 0;
189 virtual string CreateNcbiLink(
const string& sText,
const string& sUrl)
const= 0;
191 virtual string CreateGenomicLink(
const string& sText,
const string& sUrl)
const{
returnCreateNcbiLink(sText, sUrl); }
206 virtual void AddPubmedLinksRow(
const string& pmids,
bool& isGoToPresent,
boolisBulletColPresent) = 0;
227 virtual void SetTrustedData(
booltrusted_data) { m_TrustedData = trusted_data; };
235 boolm_TrustedData =
true;
245 virtual voidStartRow();
246 virtual voidAddBulletCol(
const string& sBulletSrc =
"");
247 virtual voidAddTagCol(
const string& sContents =
"",
const string& sBulletSrc =
"");
248 virtual voidAddValueCol(
const string& sContents =
"",
unsignedwidth = 200,
boolisNoWrap =
false);
249 virtual voidFinishRow();
250 virtual voidAddDividerRow(
unsignedcolspan = 2);
251 virtual voidAddRow(
const string& sContents =
"",
unsignedcolspan = 2);
252 virtual voidAddRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200,
bool=
false);
253 virtual voidAddLinkRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200);
254 virtual voidAddLinkRow(
const string& sTag,
const string& sText,
const string& sUrl,
unsignedvalueColWidth = 200);
255 virtual voidAddLinksTitle(
const string& sTitle);
256 virtual voidAddSectionRow(
const string& sContents);
258 virtual stringRender();
260 virtual boolIsEmpty()
const;
262 virtual stringCreateLink(
const string& sText,
const string& sUrl)
const;
263 virtual stringCreateNcbiLink(
const string& sText,
const string& sUrl)
const;
264 virtual voidAddPubmedLinksRow(
const string& pmids,
bool& isGoToPresent,
boolisBulletColPresent);
265 virtual voidMaybeAddGoToRow(
bool& isGoToPresent,
boolisBulletColPresent);
287 virtual voidStartRow();
288 virtual voidAddBulletCol(
const string& sBulletSrc =
"");
289 virtual voidAddTagCol(
const string& sContents =
"",
const string& sBulletSrc =
"");
290 virtual voidAddValueCol(
const string& sContents =
"",
unsignedwidth = 200,
boolisNoWrap =
false);
291 virtual voidFinishRow();
292 virtual voidAddDividerRow(
unsignedcolspan = 2);
293 virtual voidAddRow(
const string& sContents =
"",
unsignedcolspan = 2);
294 virtual voidAddRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200,
boolnoSpaceInsert =
false);
295 virtual voidAddLinkRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200);
296 virtual voidAddLinkRow(
const string& sTag,
const string& sText,
const string& sUrl,
unsignedvalueColWidth = 200);
297 virtual voidAddLinksTitle(
const string& sTitle);
298 virtual voidAddSectionRow(
const string& sContents);
301 virtual stringRender();
303 virtual boolIsEmpty()
const;
305 virtual stringCreateLink(
const string& sText,
const string& sUrl)
const;
306 virtual stringCreateNcbiLink(
const string& sText,
const string& sUrl)
const;
307 virtual stringCreateGenomicLink(
const string& sText,
const string& sUrl)
const;
308 virtual voidAddPubmedLinksRow(
const string& pmids,
bool& isGoToPresent,
boolisBulletColPresent);
309 virtual voidMaybeAddGoToRow(
bool& isGoToPresent,
boolisBulletColPresent);
316 voidx_FindAllOccurences(
const string&
input,
charsearch, vector<size_t> &occurences)
const;
317 unsignedx_InsertSpaces(
string&
input,
size_tstart,
size_tend,
size_tfragment_length = 65)
const;
318 voidx_InsertSpaces(
string&
input,
size_tfragment_length = 65)
const;
332 virtual voidStartRow();
333 virtual voidAddBulletCol(
const string& sBulletSrc =
"");
334 virtual voidAddTagCol(
const string& sContents =
"",
const string& sBulletSrc =
"");
335 virtual voidAddValueCol(
const string& sContents =
"",
unsignedwidth = 200,
boolisNoWrap =
false);
336 virtual voidFinishRow();
337 virtual voidAddDividerRow(
unsignedcolspan = 2);
338 virtual voidAddRow(
const string& sContents =
"",
unsignedcolspan = 2);
339 virtual voidAddRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200,
bool=
false);
340 virtual voidAddLinkRow(
const string& sTag,
const string& sValue,
unsignedvalueColWidth = 200);
341 virtual voidAddLinkRow(
const string& sTag,
const string& sText,
const string& sUrl,
unsignedvalueColWidth = 200);
342 virtual voidAddLinksTitle(
const string& sTitle);
343 virtual voidAddSectionRow(
const string& sContents);
347 virtual stringRender();
349 virtual boolIsEmpty()
const;
351 virtual stringCreateLink(
const string& sText,
const string& sUrl)
const;
352 virtual stringCreateNcbiLink(
const string& sText,
const string& sUrl)
const;
353 virtual voidAddPubmedLinksRow(
const string& pmids,
bool& isGoToPresent,
boolisBulletColPresent);
354 virtual voidMaybeAddGoToRow(
bool& isGoToPresent,
boolisBulletColPresent);
tooltips using plain text formatting
CCSSTableTooltipFormatter()
virtual void FinishRow()=0
finish the row (i.e. no other contents will be added to it)
virtual string CreateGenomicLink(const string &sText, const string &sUrl) const
CCSSTableTooltipFormatter & operator=(const CCSSTableTooltipFormatter &)
virtual string CreateLink(const string &sLabel, const string &sUrl) const =0
construct the HTML code for a link from the displayed text label and supplied URL
CTextTooltipFormatter & operator=(const CTextTooltipFormatter &)
virtual ~ITooltipFormatter()
ETooltipFormatters
supported types of formatters
virtual void AddRow(const string &sContents="", unsigned colspan=2)=0
add a row with a cell, spanning across all columns
virtual CIRef< ITooltipFormatter > CreateInstance()=0
creates another instance of the same tooltip formatter
virtual bool IsTrustedData()
indicates whether the data is coming from a trusted source
virtual void AddValueCol(const string &sContents="", unsigned width=200, bool isNoWrap=false)=0
adds a value column to the row
virtual void AddLinksTitle(const string &sTitle)=0
add a row with the links title
virtual void SetTrustedData(bool trusted_data)
indicates whether the data is coming from a trusted source
virtual void AddTagCol(const string &sContents="", const string &sBulletSrc="")=0
adds a tag column to the row
CTextTooltipFormatter(const CTextTooltipFormatter &)
virtual void AddRow(const string &sTag, const string &sValue, unsigned valueColWidth=200, bool noSpaceInsert=false)=0
add a row with two columns
virtual void AddBulletCol(const string &sBulletSrc="")=0
add a cell with an image
virtual void AddLinkRow(const string &sTag, const string &sValue, unsigned valueColWidth=200)=0
add a row with two columns
virtual void AddLinkRow(const string &sTag, const string &sText, const string &sUrl, unsigned valueColWidth=200)=0
add a row with two columns, the second containing a link
virtual void AddSectionRow(const string &sContents)=0
add a section row
CHtmlTooltipFormatter & operator=(const CHtmlTooltipFormatter &)
virtual void MaybeAddGoToRow(bool &isGoToPresent, bool isBulletColPresent)=0
conditionally add a Go To row
virtual void AddPubmedLinksRow(const string &pmids, bool &isGoToPresent, bool isBulletColPresent)=0
add a row containing all links to specified Pubmed IDs
virtual void Append(const ITooltipFormatter &tooltip)=0
appends another formatter to this one
virtual bool IsEmpty() const =0
Indicates if the tooltip is empty.
CCSSTableTooltipFormatter(const CCSSTableTooltipFormatter &)
virtual void AddDividerRow(unsigned colspan=2)=0
add a horizontal divider between sections of the table
virtual void StartRow()=0
start a new table row
CHtmlTooltipFormatter(const CHtmlTooltipFormatter &)
virtual string Render()=0
returns the formatted tooltip text and resets the formatter for reuse
virtual string CreateNcbiLink(const string &sText, const string &sUrl) const =0
construct the HTML code for a link from the displayed text label and supplied NCBI URL path
@ eTooltipFormatter_CSSTable
generated table is CSS based, generated NCBI URLs are paths (recommended for SViewer)
@ eTooltipFormatter_Html
generated table is HTML attributes (no CSS) based, generate NCBI URLs are absolute (recommended for G...
@ eTooltipFormatter_Text
plain text formatted
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIOBJUTILS_EXPORT
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4