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

Search Toolkit Book for CCompositeTextItem

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

+ Inheritance diagram for CCompositeTextItem:
+ Collaboration diagram for CCompositeTextItem:

Public Types

typedef CTextItem TParent

Public Member Functions

 CCompositeTextItem (bool deleteChildren=true)
 ~CCompositeTextItem ()
void SetDeleteChildren (bool val)
virtual ITextItemGetItemByLine (int lineNum, bool expanded)
virtual void MouseEvent (wxMouseEvent &event, CTextPanelContext &context)
virtual void CalcSize (wxDC &dc, CTextPanelContext *context)
virtual void Draw (wxDC &dc, const wxRect &updateRect, CTextPanelContext *context)
void AddItem (ITextItem *item, bool updatePositions=true)
ITextItemGetItem (size_t index)
size_t GetItemCount () const
void UpdateSelection (ITextItem *start, ITextItem *end, bool selected=false)
virtual void GetText (wxTextOutputStream &os, const CTextBlock &block, CTextPanelContext *context)
virtual bool Traverse (ICompositeTraverser &traverser)
virtual wxPoint GetItemPosition (int index) const
virtual int GetItemStartLine (int index) const
virtual void ItemSizeChanged (int index)
virtual void UpdatePositions ()
void InsertItems (size_t index, ITextItem *const *items, size_t count, bool updatePositions=true)
void RemoveItem (size_t index)
- Public Member Functions inherited from CTextItem
 CTextItem ()
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 size_t GetLineCount () const
virtual void SetLineCount (size_t lineCount)
virtual int GetTextLeftMargin (CTextPanelContext *context) const
virtual int GetIndent () const
virtual void TextPosToExpanded (CTextPosition &WXUNUSED(pos), CTextPanelContext *WXUNUSED(context)) const
virtual void TextPosToCollapsed (CTextPosition &WXUNUSED(pos), CTextPanelContext *WXUNUSED(context)) const
void RenderText (CStyledTextOStream &ostream, CTextPanelContext *context) const
- Public Member Functions inherited from ITextItem
 ITextItem ()
virtual ~ITextItem ()
virtual wxRect GetRect () const
virtual string GetToolTipText (CTextPanelContext *) const
virtual void FillContextMenu (wxMenu &WXUNUSED(menu)) const
virtual const CConstRef< CObjectGetAssosiatedObject () const
virtual objects::CScope * GetAssosiatedScope () const
virtual bool IsSelectable () const
CTextBlock GetItemBlock () const
virtual ITextItemClone ()
- Public Member Functions inherited from IContainer
virtual ~IContainer ()

Protected Attributes

vector< ITextItem * > m_Items
vector< intm_AccumLines
vector< intm_AccumHeight
bool m_DeleteChildren
- Protected Attributes inherited from CTextItem
size_t m_LineCount
wxSize m_Size
int m_Index

Additional Inherited Members

- Protected Member Functions inherited from CTextItem
virtual void x_Indent (CStyledTextOStream &ostream) const
virtual void x_RenderText (CStyledTextOStream &WXUNUSED(ostream), CTextPanelContext *WXUNUSED(context)) const

Detailed Description

Definition at line 44 of file composite_text_item.hpp.

Member Typedef Documentation

◆ TParent

Definition at line 47 of file composite_text_item.hpp.

Constructor & Destructor Documentation

◆ CCompositeTextItem()

CCompositeTextItem::CCompositeTextItem ( bool  deleteChildren = true)

Definition at line 49 of file composite_text_item.hpp.

◆ ~CCompositeTextItem()

CCompositeTextItem::~CCompositeTextItem ( )

Definition at line 43 of file composite_text_item.cpp.

References m_DeleteChildren, and m_Items.

Member Function Documentation

◆ AddItem()

void CCompositeTextItem::AddItem ( ITextItem item,
bool  updatePositions = true 

◆ CalcSize()

void CCompositeTextItem::CalcSize ( wxDC &  dc,
CTextPanelContext context 

◆ Draw()

void CCompositeTextItem::Draw ( wxDC &  dc,
const wxRect &  updateRect,
CTextPanelContext context 

Reimplemented from CTextItem.

Definition at line 114 of file composite_text_item.cpp.

References context, ITextItem::Draw(), m_AccumHeight, and m_Items.

◆ GetItem()

ITextItem * CCompositeTextItem::GetItem ( size_t  index)

◆ GetItemByLine()

ITextItem * CCompositeTextItem::GetItemByLine ( int  lineNum,
bool  expanded 

Reimplemented from CTextItem.

Definition at line 73 of file composite_text_item.cpp.

References CTextItem::GetLineCount(), m_AccumLines, and m_Items.

◆ GetItemCount()

size_t CCompositeTextItem::GetItemCount ( ) const

◆ GetItemPosition()

wxPoint CCompositeTextItem::GetItemPosition ( int  index) const

Implements IContainer.

Definition at line 88 of file composite_text_item.cpp.

References CTextItem::GetPosition(), and m_AccumHeight.

◆ GetItemStartLine()

int CCompositeTextItem::GetItemStartLine ( int  index) const

Implements IContainer.

Definition at line 97 of file composite_text_item.cpp.

References CTextItem::GetStartLine(), and m_AccumLines.

◆ GetText()

void CCompositeTextItem::GetText ( wxTextOutputStream &  os,
const CTextBlock block,
CTextPanelContext context 

◆ InsertItems()

void CCompositeTextItem::InsertItems ( size_t  index,
ITextItem *const items,
size_t  count,
bool  updatePositions = true 

◆ ItemSizeChanged()

void CCompositeTextItem::ItemSizeChanged ( int  index)

◆ MouseEvent()

void CCompositeTextItem::MouseEvent ( wxMouseEvent &  event,
CTextPanelContext context 

◆ RemoveItem()

void CCompositeTextItem::RemoveItem ( size_t  index)

◆ SetDeleteChildren()

void CCompositeTextItem::SetDeleteChildren ( bool  val)

Definition at line 52 of file composite_text_item.hpp.

References m_DeleteChildren, and val.

Referenced by CTextPanel::x_SelectFlatFileSequence().

◆ Traverse()

bool CCompositeTextItem::Traverse ( ICompositeTraverser traverser)

◆ UpdatePositions()

void CCompositeTextItem::UpdatePositions ( )

◆ UpdateSelection()

void CCompositeTextItem::UpdateSelection ( ITextItem start,
ITextItem end,
bool  selected = false 

Member Data Documentation

◆ m_AccumHeight

vector<int> CCompositeTextItem::m_AccumHeight

◆ m_AccumLines

vector<int> CCompositeTextItem::m_AccumLines

◆ m_DeleteChildren

bool CCompositeTextItem::m_DeleteChildren

Definition at line 88 of file composite_text_item.hpp.

Referenced by RemoveItem(), SetDeleteChildren(), and ~CCompositeTextItem().

◆ m_Items

vector<ITextItem*> CCompositeTextItem::m_Items

The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:09:30 2024 by rev. 669887