1 #ifndef GUI_WIDGETS_TEXT_WIDGET___TEXT_ITEM__HPP
2 #define GUI_WIDGETS_TEXT_WIDGET___TEXT_ITEM__HPP
130 CTextItem() : m_LineCount(1), m_Size(wxDefaultSize), m_Container(), m_Index(0) {}
133 { m_Container = container; m_Index = index; }
135 { container = m_Container; index = m_Index; }
138 {
return m_Container ? m_Container->GetItemPosition(m_Index) : wxPoint(0, 0); }
140 virtual wxSize
GetSize()
const {
return m_Size; }
146 {
return m_Container ? m_Container->GetItemStartLine(m_Index) : 0; }
150 virtual void SetLineCount(
size_t lineCount) { m_LineCount = lineCount; }
165 { x_RenderText(ostream,
context); }
CAtomicCounter_WithAutoInit –.
virtual void SetContainer(IContainer *container, int index)
virtual void SetLineCount(size_t lineCount)
virtual wxPoint GetPosition() const
virtual int GetStartLine() const
virtual void GetContainer(IContainer *&container, int &index)
virtual void TextPosToExpanded(CTextPosition &WXUNUSED(pos), CTextPanelContext *WXUNUSED(context)) const
virtual size_t GetLineCount() const
virtual void TextPosToCollapsed(CTextPosition &WXUNUSED(pos), CTextPanelContext *WXUNUSED(context)) const
virtual int GetIndent() const
virtual bool Traverse(ICompositeTraverser &traverser)
virtual wxSize GetSize() const
virtual void x_RenderText(CStyledTextOStream &WXUNUSED(ostream), CTextPanelContext *WXUNUSED(context)) const
void RenderText(CStyledTextOStream &ostream, CTextPanelContext *context) const
virtual bool ProcessItem(CTextItem &textItem)=0
virtual int GetItemStartLine(int index) const =0
virtual wxPoint GetItemPosition(int index) const =0
virtual void ItemSizeChanged(int index)=0
virtual void UpdatePositions()=0
virtual wxSize GetSize() const =0
virtual bool IsSelectable() const
CTextBlock GetItemBlock() const
virtual ITextItem * GetItemByLine(int lineNum, bool expanded)=0
virtual int GetTextLeftMargin(CTextPanelContext *context) const =0
virtual void Draw(wxDC &dc, const wxRect &updateRect, CTextPanelContext *context)=0
virtual void MouseEvent(wxMouseEvent &, CTextPanelContext &)
virtual ITextItem * Clone()
virtual void GetContainer(IContainer *&container, int &index)=0
virtual int GetStartLine() const =0
virtual wxPoint GetPosition() const =0
virtual void FillContextMenu(wxMenu &WXUNUSED(menu)) const
virtual bool Traverse(ICompositeTraverser &)=0
virtual void CalcSize(wxDC &dc, CTextPanelContext *context)=0
virtual string GetToolTipText(CTextPanelContext *) const
virtual objects::CScope * GetAssosiatedScope() const
virtual size_t GetLineCount() const =0
virtual wxRect GetRect() const
virtual void GetText(wxTextOutputStream &os, const CTextBlock &block, CTextPanelContext *context)=0
virtual void SetContainer(IContainer *container, int index)=0
virtual const CConstRef< CObject > GetAssosiatedObject() const
TValue Add(int delta) THROWS_NONE
Atomically add value (=delta), and return new counter value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_GUIWIDGETS_TEXT_WIDGET_EXPORT
Defines to provide correct exporting from DLLs in Windows.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
CAtomicCounter_WithAutoInit gITextItemCount
static CS_CONTEXT * context