NCBI C++ ToolKit
gui_object_info_distancematrix.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: gui_object_info_distancematrix.cpp 41372 2018-07-18 20:45:38Z rudnev $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Roman Katargin
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
36 #include <gui/objutils/label.hpp>
37 #include <gui/objutils/tooltip.hpp>
38 
40 
43 
45 {
46 public:
48 
49  virtual string GetType() const { return "Distance Matrix"; }
50  virtual string GetSubtype() const { return ""; }
51  virtual string GetLabel() const;
52  virtual void GetToolTip(ITooltipFormatter& tooltip, string& t_title, TSeqPos at_p = (TSeqPos)-1, bool* isGeneratedBySvc = NULL) const;
53  virtual void GetLinks(ITooltipFormatter& /*links*/, bool /*no_ncbi_base*/) const {};
54  virtual string GetIcon() const { return ""; }
55  virtual string GetViewCategory() const { return "Generic"; }
56 
57 private:
60 };
61 
63 {
65  typeid(IGuiObjectInfo).name(),
66  CDistanceMatrix::GetTypeInfo(),
68 }
69 
71  SConstScopedObject& object, ICreateParams* /*params*/)
72 {
74  gui_info->m_Object = object.object;
75  gui_info->m_Scope = object.scope;
76  return gui_info;
77 }
78 
80 {
81  string label;
83  return label;
84 }
85 
86 void CGuiObjectInfoDistanceMatrix::GetToolTip(ITooltipFormatter& tooltip, string& /*t_title*/, TSeqPos /*at_p*/, bool* isGeneratedBySvc) const
87 {
88  string t_text;
90  tooltip.AddRow(t_text);
91  if(isGeneratedBySvc) {
92  *isGeneratedBySvc = false;
93  }
94 }
95 
User-defined methods of the data storage class.
virtual void GetToolTip(ITooltipFormatter &tooltip, string &t_title, TSeqPos at_p=(TSeqPos) -1, bool *isGeneratedBySvc=NULL) const
Get tooltip.
virtual void GetLinks(ITooltipFormatter &, bool) const
Get a set of links.
static CGuiObjectInfoDistanceMatrix * CreateObject(SConstScopedObject &object, ICreateParams *params)
virtual string GetViewCategory() const
To share default view between different types.
static void RegisterFactory(const string &interface_name, IInterfaceFactory *factory)
CObject –.
Definition: ncbiobj.hpp:180
primitive interface to arrange tabular data in the tooltips
Definition: tooltip.hpp:55
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define NULL
Definition: ncbistd.hpp:225
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
Definition: label.cpp:140
virtual void AddRow(const string &sContents="", unsigned colspan=2)=0
add a row with a cell, spanning across all columns
@ eDescriptionBrief
Definition: label.hpp:67
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static const char label[]
USING_SCOPE(objects)
void initCGuiObjectInfoDistanceMatrix()
Modified on Wed Feb 21 09:56:25 2024 by modify_doxy.py rev. 669887