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

Search Toolkit Book for CTextItem

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

+ Inheritance diagram for CTextItem:
+ Collaboration diagram for CTextItem:

Public Member Functions

 CTextItem ()
 
virtual void SetContainer (IContainer *container, int index)
 
virtual void GetContainer (IContainer *&container, int &index)
 
virtual wxPoint GetPosition () const
 
virtual wxSize GetSize () const
 
virtual void MouseEvent (wxMouseEvent &event, CTextPanelContext &context)
 
virtual int GetStartLine () const
 
virtual size_t GetLineCount () const
 
virtual ITextItemGetItemByLine (int lineNum, bool expanded)
 
virtual void SetLineCount (size_t lineCount)
 
virtual int GetTextLeftMargin (CTextPanelContext *context) const
 
virtual void CalcSize (wxDC &dc, CTextPanelContext *context)
 
virtual void Draw (wxDC &dc, const wxRect &updateRect, CTextPanelContext *context)
 
virtual int GetIndent () const
 
virtual bool Traverse (ICompositeTraverser &traverser)
 
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 void GetText (wxTextOutputStream &os, const CTextBlock &block, CTextPanelContext *context)=0
 
virtual const CConstRef< CObjectGetAssosiatedObject () const
 
virtual objects::CScope * GetAssosiatedScope () const
 
virtual bool IsSelectable () const
 
CTextBlock GetItemBlock () const
 
virtual ITextItemClone ()
 

Protected Member Functions

virtual void x_Indent (CStyledTextOStream &ostream) const
 
virtual void x_RenderText (CStyledTextOStream &WXUNUSED(ostream), CTextPanelContext *WXUNUSED(context)) const
 

Protected Attributes

size_t m_LineCount
 
wxSize m_Size
 
IContainerm_Container
 
int m_Index
 

Detailed Description

Definition at line 127 of file text_item.hpp.

Constructor & Destructor Documentation

◆ CTextItem()

CTextItem::CTextItem ( )
inline

Definition at line 130 of file text_item.hpp.

Member Function Documentation

◆ CalcSize()

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

◆ Draw()

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

◆ GetContainer()

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

Implements ITextItem.

Definition at line 134 of file text_item.hpp.

References m_Container, and m_Index.

◆ GetIndent()

virtual int CTextItem::GetIndent ( ) const
inlinevirtual

◆ GetItemByLine()

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

Implements ITextItem.

Reimplemented in CCompositeTextItem.

Definition at line 187 of file text_item.cpp.

References GetLineCount().

Referenced by CExpandItem::GetItemByLine().

◆ GetLineCount()

virtual size_t CTextItem::GetLineCount ( ) const
inlinevirtual

◆ GetPosition()

virtual wxPoint CTextItem::GetPosition ( void  ) const
inlinevirtual

◆ GetSize()

virtual wxSize CTextItem::GetSize ( void  ) const
inlinevirtual

◆ GetStartLine()

virtual int CTextItem::GetStartLine ( ) const
inlinevirtual

◆ GetTextLeftMargin()

int CTextItem::GetTextLeftMargin ( CTextPanelContext context) const
virtual

Implements ITextItem.

Definition at line 83 of file text_item.cpp.

References context, and GetIndent().

Referenced by CExpandItem::GetTextLeftMargin().

◆ MouseEvent()

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

◆ RenderText()

void CTextItem::RenderText ( CStyledTextOStream ostream,
CTextPanelContext context 
) const
inline

◆ SetContainer()

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

Implements ITextItem.

Definition at line 132 of file text_item.hpp.

References m_Container, and m_Index.

Referenced by CExpandItem::CExpandItem(), and CExpandItem::UpdatePositions().

◆ SetLineCount()

virtual void CTextItem::SetLineCount ( size_t  lineCount)
inlinevirtual

Definition at line 150 of file text_item.hpp.

References m_LineCount.

Referenced by CExpandItem::CalcSize().

◆ TextPosToCollapsed()

virtual void CTextItem::TextPosToCollapsed ( CTextPosition WXUNUSEDpos,
CTextPanelContext WXUNUSEDcontext 
) const
inlinevirtual

Definition at line 162 of file text_item.hpp.

Referenced by Draw(), and CTextItemPanel::UpdateCaretPos().

◆ TextPosToExpanded()

virtual void CTextItem::TextPosToExpanded ( CTextPosition WXUNUSEDpos,
CTextPanelContext WXUNUSEDcontext 
) const
inlinevirtual

Definition at line 161 of file text_item.hpp.

Referenced by CTextSelectItem::x_CalcTextPos().

◆ Traverse()

virtual bool CTextItem::Traverse ( ICompositeTraverser traverser)
inlinevirtual

Implements ITextItem.

Reimplemented in CCompositeTextItem.

Definition at line 159 of file text_item.hpp.

References ICompositeTraverser::ProcessItem().

Referenced by CExpandItem::Traverse().

◆ x_Indent()

void CTextItem::x_Indent ( CStyledTextOStream ostream) const
protectedvirtual

◆ x_RenderText()

virtual void CTextItem::x_RenderText ( CStyledTextOStream WXUNUSEDostream,
CTextPanelContext WXUNUSEDcontext 
) const
inlineprotectedvirtual

Member Data Documentation

◆ m_Container

IContainer* CTextItem::m_Container
protected

◆ m_Index

int CTextItem::m_Index
protected

◆ m_LineCount

size_t CTextItem::m_LineCount
protected

◆ m_Size

wxSize CTextItem::m_Size
protected

The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:06 2024 by modify_doxy.py rev. 669887