A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/desktop__item_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/seq_desktop/desktop_item.cpp Source File

37 #include <wx/dcmemory.h> 42  const

wxFont s_DesktopFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,

false

,

wxT

(

"Consolas"

));

46

: m_Pos(wxPoint(0, 0)), m_TextHeight(0), m_Origin(wxPoint(20, 20)),

47

m_Item(item), m_Show(

false

), m_ExpandLevel(0), m_Indent(33), m_Selected(

false

)

67

wxRect rect(

m_Pos

, wxSize(

m_Size

.GetWidth(), height));

69

dc.DrawRectangle(rect);

71

dc.DrawLabel(

m_CurrentText

, rect, wxALIGN_TOP | wxALIGN_LEFT);

74

dc.SetPen(*wxWHITE_PEN);

75

dc.SetBrush(*wxTRANSPARENT_BRUSH);

79

dc.SetPen(wxPen(*wxBLACK, 2));

80

dc.SetBrush(*wxTRANSPARENT_BRUSH);

87

wxRect(rect.GetPosition(),

88

wxSize(rect.GetSize().GetWidth(), rect.GetSize().GetHeight() + 1)));

106  for

(

auto

& it :

m_Text

) {

120  m_Size

= textSize + wxSize(20, 5);

125

wxCoord width, height;

126

dc.GetMultiLineTextExtent(

text

, &width, &height,

NULL

, &s_DesktopFont);

127  return

wxSize(width, height);

170  for

(

const auto

& it :

m_Text

) {

172  text

.append(

"\n"

);

178  text

.append(

"\n"

);

215  if

(it->GetType() == objects::CBioseq::GetTypeInfo()->GetName()

216

|| it->GetType() == objects::CBioseq_set::GetTypeInfo()->GetName()) {

236  if

(it->GetType() == objects::CBioseq::GetTypeInfo()->GetName()

237

|| it->GetType() == objects::CBioseq_set::GetTypeInfo()->GetName()) {

263  m_Size

.y += it->GetSize().GetHeight();

264  int

new_width = it->GetSize().GetWidth() + (it->GetPosition().x -

m_Pos

.x);

265  if

(new_width >=

m_Size

.x) {

266

new_width = new_width + 2;

281  if

(!it->Traverse(traverser))

307  if

(it->GetType() == objects::CBioseq::GetTypeInfo()->GetName()

308

|| it->GetType() == objects::CBioseq_set::GetTypeInfo()->GetName()) {

310

it->ShowTillBioseq(

value

);

325  for

(

const auto

& it :

m_Text

) {

327  text

.append(

"\n"

);

333  text

.append(

"\n"

);

351

it->UpdatePositions(cumY,

depth

+ 1);

382  if

(it->GetType() == objects::CBioseq::GetTypeInfo()->GetName()

383

|| it->GetType() == objects::CBioseq_set::GetTypeInfo()->GetName()) {

385

it->ShowTillBioseq(

true

);

392  if

(it->GetType() == objects::CBioseq::GetTypeInfo()->GetName()

393

|| it->GetType() == objects::CBioseq_set::GetTypeInfo()->GetName()) {

415

it->ShowTillBioseq(

false

);

420  if

(it->GetType() == objects::CBioseq::GetTypeInfo()->GetName()

421

|| it->GetType() == objects::CBioseq_set::GetTypeInfo()->GetName()) {

445  m_Size

.y += it->GetSize().GetHeight();

459  if

(it->GetType() == objects::CContact_info::GetTypeInfo()->GetName()

460

|| it->GetType() == objects::CCit_sub::GetTypeInfo()->GetName()) {

466

it->UpdatePositions(cumY,

depth

);

479  for

(

const auto

& it :

m_Text

) {

481  text

.append(

"\n"

);

A desktop item with children.

virtual wxSize x_GetVisibleTextSize(wxDC &dc)

Determines the size of the text to be displayed corresponding to the current expansion level.

TDeskItemList m_ItemList

List of child items.

virtual void ShowTillBioseq(bool value)

CCompositeDesktopItem(CConstRef< IDesktopDataItem > item)

virtual void Add(IDesktopItem &)

virtual bool Traverse(IDesktopCompositeTraverser &traverser)

virtual int GetRelevantHeight() const

virtual void UpdatePositions(int *cumY, int depth=0)

virtual void UpdateSize()

virtual IDesktopItem * FindItem(const wxPoint &pt) const

void x_SetTextToDrawAndSize()

Sets the size of the rectangle based on the height and width of the displayed text.

virtual wxSize x_GetVisibleTextSize(wxDC &dc)=0

Determines the size of the text to be displayed corresponding to the current expansion level.

vector< string > m_Text

Text that appears in the rectangle.

int m_TextHeight

Height of the text within the rectangle.

wxColour m_FrameCol

Colour of rectangle's outline.

wxPoint m_Origin

Point where the drawing starts.

CConstRef< IDesktopDataItem > m_Item

Storing actual data.

virtual bool Traverse(IDesktopCompositeTraverser &traverser)

wxPoint m_Pos

Position of the item on the canvas.

virtual const string & GetType() const

virtual void Draw(wxDC &dc, bool highlight=false) const

virtual const CConstRef< CObject > GetAssociatedObject() const

wxColour m_TextCol

Foreground colour of the text.

bool m_Selected

Flag to indicate selection of this item.

CDesktopItem(CConstRef< IDesktopDataItem > item)

int m_Indent

Text indentation.

wxString m_CurrentText

Text that appears on the screen corresponding to the current level of expansion.

wxBrush m_BkgdBrush

Background colour of the rectangle.

int m_ExpandLevel

State(level) of expansion.

virtual bool FindSearchItem(const string &search, bool case_sensitive) const

wxSize m_Size

Size of the rectangle.

virtual bool Traverse(IDesktopCompositeTraverser &traverser)

wxSize m_OrigSize

Original size corresponding to 0 expansion level.

CRootDesktopItem(CConstRef< IDesktopDataItem > item)

virtual void UpdateSize()

virtual wxSize x_GetVisibleTextSize(wxDC &dc)

Determines the size of the text to be displayed corresponding to the current expansion level.

virtual void UpdatePositions(int *cumY, int depth=0)

virtual wxSize x_GetVisibleTextSize(wxDC &dc)

Determines the size of the text to be displayed corresponding to the current expansion level.

virtual IDesktopItem * FindItem(const wxPoint &pt) const

virtual void UpdateSize()

virtual int GetRelevantHeight() const

virtual void UpdatePositions(int *cumY, int depth=0)

CSimpleDesktopItem(CConstRef< IDesktopDataItem > item)

virtual const CObject * GetObject(void) const =0

virtual wxColour GetTextColor() const =0

virtual const wxBrush & GetBackgroundBrush() const =0

virtual const string & GetType() const

virtual TLines GetDescription(bool root=false) const =0

virtual wxColour GetFrameColor() const =0

virtual bool ShouldBeReduced() const

virtual IDesktopItem * FindItem(const wxPoint &pt) const =0

virtual wxRect GetRect() const

static unsigned char depth[2 *(256+1+29)+1]

static wxSize s_GetMultiLineSize(wxDC &dc, const wxString &text)

CConstRef< C > ConstRef(const C *object)

Template function for conversion of const object pointer to CConstRef.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

NCBI_NS_STD::string::size_type SIZE_TYPE

static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)

Find the pattern in the string.

@ eNocase

Case insensitive compare.

@ eCase

Case sensitive compare.

static void text(MDB_val *v)

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

static bool Contains(const CSeq_loc &a, const CSeq_loc &b, CScope *scope)

wxString ToWxString(const string &s)


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