NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CExpandItem Class Reference

Search Toolkit Book for CExpandItem

#include <gui/widgets/text_widget/expand_item.hpp>

+ Inheritance diagram for CExpandItem:
+ Collaboration diagram for CExpandItem:

Public Member Functions

 CExpandItem (CTextItem *collapsedItem, CTextItem *expandedItem, bool expand=false)
 
virtual ~CExpandItem ()
 
void SetSelectable (bool selectable=true)
 
void AddGlyph (CGlyph *glyph)
 
CTextItemGetCollapsedItem ()
 
CTextItemGetExpandedItem ()
 
virtual bool IsExpanded () const
 
virtual void Toggle (CTextPanelContext *context, bool update)
 
virtual string GetToolTipText (CTextPanelContext *context) const
 
virtual void SetContainer (IContainer *container, int index)
 
virtual void GetContainer (IContainer *&container, int &index)
 
virtual wxPoint GetPosition () const
 
virtual wxSize GetSize () const
 
virtual int GetStartLine () const
 
virtual void MouseEvent (wxMouseEvent &event, CTextPanelContext &context)
 
virtual size_t GetLineCount () const
 
virtual ITextItemGetItemByLine (int lineNum, bool expanded)
 
virtual int GetTextLeftMargin (CTextPanelContext *context) const
 
virtual void CalcSize (wxDC &dc, CTextPanelContext *context)
 
virtual void Draw (wxDC &dc, const wxRect &updateRect, CTextPanelContext *context)
 
virtual void GetText (wxTextOutputStream &os, const CTextBlock &block, CTextPanelContext *context)
 
virtual const CConstRef< CObjectGetAssosiatedObject () const
 
virtual bool IsSelectable () const
 
virtual bool Traverse (ICompositeTraverser &traverser)
 
virtual wxPoint GetItemPosition (int) const
 
virtual int GetItemStartLine (int) const
 
virtual void ItemSizeChanged (int index)
 
virtual void UpdatePositions ()
 
- Public Member Functions inherited from ITextItem
 ITextItem ()
 
virtual ~ITextItem ()
 
virtual wxRect GetRect () const
 
virtual void FillContextMenu (wxMenu &WXUNUSED(menu)) const
 
virtual objects::CScope * GetAssosiatedScope () const
 
CTextBlock GetItemBlock () const
 
virtual ITextItemClone ()
 
- Public Member Functions inherited from IExpandable
virtual ~IExpandable ()
 
- Public Member Functions inherited from IContainer
virtual ~IContainer ()
 

Protected Member Functions

void x_LimitCollapsedSelection (CTextPanelContext *context) const
 

Protected Attributes

int m_Expanded
 
CTextItemm_Items [2]
 
CGlyphm_Glyph
 
CGlyphm_Glyph2
 
bool m_Selectable
 
IContainerm_Container
 
int m_Index
 

Detailed Description

Definition at line 47 of file expand_item.hpp.

Constructor & Destructor Documentation

◆ CExpandItem()

CExpandItem::CExpandItem ( CTextItem collapsedItem,
CTextItem expandedItem,
bool  expand = false 
)

Definition at line 44 of file expand_item.cpp.

References _ASSERT, m_Expanded, m_Glyph, m_Items, and CTextItem::SetContainer().

◆ ~CExpandItem()

CExpandItem::~CExpandItem ( )
virtual

Definition at line 59 of file expand_item.cpp.

References m_Glyph, m_Glyph2, and m_Items.

Member Function Documentation

◆ AddGlyph()

void CExpandItem::AddGlyph ( CGlyph glyph)

Definition at line 69 of file expand_item.cpp.

References m_Glyph2.

◆ CalcSize()

void CExpandItem::CalcSize ( wxDC &  dc,
CTextPanelContext context 
)
virtual

◆ Draw()

void CExpandItem::Draw ( wxDC &  dc,
const wxRect &  updateRect,
CTextPanelContext context 
)
virtual

◆ GetAssosiatedObject()

const CConstRef< CObject > CExpandItem::GetAssosiatedObject ( ) const
virtual

Reimplemented from ITextItem.

Reimplemented in CXmlExpandItem.

Definition at line 75 of file expand_item.cpp.

References ITextItem::GetAssosiatedObject(), and m_Items.

◆ GetCollapsedItem()

CTextItem* CExpandItem::GetCollapsedItem ( )
inline

◆ GetContainer()

virtual void CExpandItem::GetContainer ( IContainer *&  container,
int index 
)
inlinevirtual

Implements ITextItem.

Definition at line 70 of file expand_item.hpp.

References m_Container, and m_Index.

Referenced by CFlatFileSeqBlockIterator::operator++().

◆ GetExpandedItem()

CTextItem* CExpandItem::GetExpandedItem ( )
inline

◆ GetItemByLine()

virtual ITextItem* CExpandItem::GetItemByLine ( int  lineNum,
bool  expanded 
)
inlinevirtual

Implements ITextItem.

Definition at line 82 of file expand_item.hpp.

References CTextItem::GetItemByLine(), m_Expanded, and m_Items.

◆ GetItemPosition()

virtual wxPoint CExpandItem::GetItemPosition ( int  ) const
inlinevirtual

Implements IContainer.

Definition at line 102 of file expand_item.hpp.

References GetPosition().

◆ GetItemStartLine()

virtual int CExpandItem::GetItemStartLine ( int  ) const
inlinevirtual

Implements IContainer.

Definition at line 103 of file expand_item.hpp.

References GetStartLine().

◆ GetLineCount()

virtual size_t CExpandItem::GetLineCount ( ) const
inlinevirtual

Implements ITextItem.

Definition at line 81 of file expand_item.hpp.

References CTextItem::GetLineCount(), and m_Items.

Referenced by CalcSize().

◆ GetPosition()

virtual wxPoint CExpandItem::GetPosition ( void  ) const
inlinevirtual

Implements ITextItem.

Definition at line 72 of file expand_item.hpp.

References IContainer::GetItemPosition(), m_Container, and m_Index.

Referenced by GetItemPosition().

◆ GetSize()

virtual wxSize CExpandItem::GetSize ( void  ) const
inlinevirtual

Implements ITextItem.

Definition at line 74 of file expand_item.hpp.

References CTextItem::GetSize(), m_Expanded, and m_Items.

◆ GetStartLine()

virtual int CExpandItem::GetStartLine ( ) const
inlinevirtual

◆ GetText()

void CExpandItem::GetText ( wxTextOutputStream &  os,
const CTextBlock block,
CTextPanelContext context 
)
virtual

Implements ITextItem.

Definition at line 147 of file expand_item.cpp.

References context, ITextItem::GetText(), and m_Items.

◆ GetTextLeftMargin()

virtual int CExpandItem::GetTextLeftMargin ( CTextPanelContext context) const
inlinevirtual

Implements ITextItem.

Definition at line 85 of file expand_item.hpp.

References context, CTextItem::GetTextLeftMargin(), and m_Items.

Referenced by CalcSize().

◆ GetToolTipText()

string CExpandItem::GetToolTipText ( CTextPanelContext context) const
virtual

Implements IExpandable.

Definition at line 102 of file expand_item.cpp.

References context, ITextItem::GetToolTipText(), m_Expanded, and m_Items.

◆ IsExpanded()

virtual bool CExpandItem::IsExpanded ( ) const
inlinevirtual

◆ IsSelectable()

virtual bool CExpandItem::IsSelectable ( ) const
inlinevirtual

Reimplemented from ITextItem.

Reimplemented in CXmlExpandItem.

Definition at line 97 of file expand_item.hpp.

References m_Selectable.

Referenced by Draw(), and MouseEvent().

◆ ItemSizeChanged()

virtual void CExpandItem::ItemSizeChanged ( int  index)
inlinevirtual

Implements IContainer.

Definition at line 104 of file expand_item.hpp.

References IContainer::ItemSizeChanged(), m_Container, and m_Index.

◆ MouseEvent()

void CExpandItem::MouseEvent ( wxMouseEvent &  event,
CTextPanelContext context 
)
virtual

◆ SetContainer()

virtual void CExpandItem::SetContainer ( IContainer container,
int  index 
)
inlinevirtual

Implements ITextItem.

Definition at line 68 of file expand_item.hpp.

References m_Container, and m_Index.

◆ SetSelectable()

void CExpandItem::SetSelectable ( bool  selectable = true)
inline

Definition at line 54 of file expand_item.hpp.

References m_Selectable.

Referenced by CFlatFileFactoryBuilder::AddItem(), and CFeaturesGroup::CFeaturesGroup().

◆ Toggle()

void CExpandItem::Toggle ( CTextPanelContext context,
bool  update 
)
virtual

◆ Traverse()

bool CExpandItem::Traverse ( ICompositeTraverser traverser)
virtual

Implements ITextItem.

Reimplemented in CFlatFileExpandItem.

Definition at line 196 of file expand_item.cpp.

References m_Items, ICompositeTraverser::ProcessItem(), and CTextItem::Traverse().

◆ UpdatePositions()

void CExpandItem::UpdatePositions ( )
virtual

Implements IContainer.

Definition at line 186 of file expand_item.cpp.

References i, m_Items, CTextItem::SetContainer(), and IContainer::UpdatePositions().

◆ x_LimitCollapsedSelection()

void CExpandItem::x_LimitCollapsedSelection ( CTextPanelContext context) const
protected

Member Data Documentation

◆ m_Container

IContainer* CExpandItem::m_Container
protected

◆ m_Expanded

int CExpandItem::m_Expanded
protected

◆ m_Glyph

CGlyph* CExpandItem::m_Glyph
protected

Definition at line 112 of file expand_item.hpp.

Referenced by CalcSize(), CExpandItem(), Draw(), MouseEvent(), and ~CExpandItem().

◆ m_Glyph2

CGlyph* CExpandItem::m_Glyph2
protected

Definition at line 113 of file expand_item.hpp.

Referenced by AddGlyph(), Draw(), MouseEvent(), and ~CExpandItem().

◆ m_Index

int CExpandItem::m_Index
protected

◆ m_Items

CTextItem* CExpandItem::m_Items[2]
protected

◆ m_Selectable

bool CExpandItem::m_Selectable
protected

Definition at line 114 of file expand_item.hpp.

Referenced by CSequenceGroup::CSequenceGroup(), IsSelectable(), and SetSelectable().


The documentation for this class was generated from the following files:
Modified on Sun Apr 21 03:37:46 2024 by modify_doxy.py rev. 669887