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

Search Toolkit Book for CTextItemPanel

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

+ Inheritance diagram for CTextItemPanel:
+ Collaboration diagram for CTextItemPanel:

Public Types

typedef multimap< const CObject *, ITextItem * > TObjectToItem
 

Public Member Functions

 CTextItemPanel (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBORDER_NONE|wxHSCROLL|wxVSCROLL)
 
 ~CTextItemPanel ()
 
void SetHost (ITextWidgetHost *host)
 
void ObjectSelectionChanged ()
 
void Init ()
 
virtual bool Layout ()
 
virtual bool SetFont (const wxFont &font)
 
void SetMainItem (ITextItem *item, CTextPanelContext *context)
 
void SetMainItem (shared_ptr< ITextItem > item, shared_ptr< CTextPanelContext > context)
 
CTextPanelContextGetContext ()
 
void RecalSize ()
 
void ReportError (const string &report)
 
void ReportLoading ()
 
void ScrollToBottom ()
 
ITextItemGetRootItem ()
 
void InitDC (wxDC &dc)
 
virtual void OnDraw (wxDC &dc)
 
bool FindText (const wxString &text, bool matchCase, bool forward)
 
bool FindSequence (const wxString &text)
 
void MakePosVisible (const CTextPosition &pos)
 
void MakeItemVisible (ITextItem *item)
 
bool MakeObjectVisible (const CObject &object)
 
bool IsTextSelected () const
 
wxString GetSelectedText () const
 
CTextBlock GetTextSelection () const
 
bool Selecting () const
 
void SelStart (int row, int col, bool shift)
 
void SelMove (int row, int col)
 
void SelEnd (int row, int col)
 
void SetSelection (const CTextBlock &selection)
 
void SetCaretPos (int x, int y)
 
void UpdateCaretPos ()
 
void TriggerTooltip ()
 
wxPoint GetMousePos () const
 
TObjectToItemGetObjectToItem ()
 
void SetTrackSelection (bool trackSelection)
 
bool GetTrackSelection () const
 

Protected Member Functions

void OnMouseEvent (wxMouseEvent &event)
 
void OnContextMenu (wxContextMenuEvent &event)
 
void OnSetFocus (wxFocusEvent &event)
 
void OnKillFocus (wxFocusEvent &event)
 
void OnTimer (wxTimerEvent &event)
 
void OnCaptureLost (wxMouseCaptureLostEvent &event)
 
void x_Draw (wxDC &dc)
 
void OnCopy (wxCommandEvent &event)
 
void OnUpdateCopy (wxUpdateUIEvent &event)
 
void OnSelectAll (wxCommandEvent &event)
 
void x_TextPosChanged ()
 

Protected Attributes

shared_ptr< CTextPanelContextm_Context
 
shared_ptr< ITextItemm_RootItem
 
int m_SaveIndex
 
bool m_Selecting
 
CTextBlock m_TextSelection
 
wxTimer m_Timer
 
wxWindow * m_TooltipWindow
 
wxPoint m_MousePos
 
bool m_TrackSelection
 
TObjectToItem m_ObjectToItem
 
wxBitmap m_Buffer
 
ITextWidgetHostm_Host
 

Detailed Description

Definition at line 176 of file text_item_panel.hpp.

Member Typedef Documentation

◆ TObjectToItem

Definition at line 238 of file text_item_panel.hpp.

Constructor & Destructor Documentation

◆ CTextItemPanel()

CTextItemPanel::CTextItemPanel ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxBORDER_NONE | wxHSCROLL | wxVSCROLL 
)

Definition at line 294 of file text_item_panel.cpp.

References Init(), and ncbi::grid::netcache::search::fields::size.

◆ ~CTextItemPanel()

CTextItemPanel::~CTextItemPanel ( )

Definition at line 303 of file text_item_panel.cpp.

References m_Context.

Member Function Documentation

◆ FindSequence()

bool CTextItemPanel::FindSequence ( const wxString &  text)

Definition at line 833 of file text_item_panel.cpp.

References m_Context, and text().

Referenced by CTextPanel::x_FindText().

◆ FindText()

bool CTextItemPanel::FindText ( const wxString &  text,
bool  matchCase,
bool  forward 
)

◆ GetContext()

CTextPanelContext* CTextItemPanel::GetContext ( void  )
inline

◆ GetMousePos()

wxPoint CTextItemPanel::GetMousePos ( ) const
inline

Definition at line 236 of file text_item_panel.hpp.

References m_MousePos.

◆ GetObjectToItem()

TObjectToItem& CTextItemPanel::GetObjectToItem ( )
inline

◆ GetRootItem()

ITextItem* CTextItemPanel::GetRootItem ( )
inline

◆ GetSelectedText()

wxString CTextItemPanel::GetSelectedText ( ) const

◆ GetTextSelection()

CTextBlock CTextItemPanel::GetTextSelection ( ) const
inline

◆ GetTrackSelection()

bool CTextItemPanel::GetTrackSelection ( ) const
inline

Definition at line 242 of file text_item_panel.hpp.

References m_TrackSelection.

Referenced by CTextPanelContext::SetSelectedObjects().

◆ Init()

void CTextItemPanel::Init ( void  )

Definition at line 309 of file text_item_panel.cpp.

References InitDC().

◆ InitDC()

void CTextItemPanel::InitDC ( wxDC &  dc)

◆ IsTextSelected()

bool CTextItemPanel::IsTextSelected ( ) const

Definition at line 323 of file text_item_panel.cpp.

References CTextBlock::IsEmpty(), and m_TextSelection.

Referenced by OnCopy(), and OnUpdateCopy().

◆ Layout()

bool CTextItemPanel::Layout ( void  )
virtual

◆ MakeItemVisible()

void CTextItemPanel::MakeItemVisible ( ITextItem item)

◆ MakeObjectVisible()

bool CTextItemPanel::MakeObjectVisible ( const CObject object)

◆ MakePosVisible()

void CTextItemPanel::MakePosVisible ( const CTextPosition pos)

◆ ObjectSelectionChanged()

void CTextItemPanel::ObjectSelectionChanged ( )

◆ OnCaptureLost()

void CTextItemPanel::OnCaptureLost ( wxMouseCaptureLostEvent &  event)
protected

Definition at line 618 of file text_item_panel.cpp.

References m_Context, m_MousePos, and m_RootItem.

◆ OnContextMenu()

void CTextItemPanel::OnContextMenu ( wxContextMenuEvent &  event)
protected

◆ OnCopy()

void CTextItemPanel::OnCopy ( wxCommandEvent &  event)
protected

◆ OnDraw()

void CTextItemPanel::OnDraw ( wxDC &  dc)
virtual

Definition at line 526 of file text_item_panel.cpp.

References m_Buffer, and x_Draw().

◆ OnKillFocus()

void CTextItemPanel::OnKillFocus ( wxFocusEvent &  event)
protected

Definition at line 683 of file text_item_panel.cpp.

References m_Host, and ITextWidgetHost::OnTextLostFocus().

◆ OnMouseEvent()

void CTextItemPanel::OnMouseEvent ( wxMouseEvent &  event)
protected

◆ OnSelectAll()

void CTextItemPanel::OnSelectAll ( wxCommandEvent &  event)
protected

Definition at line 763 of file text_item_panel.cpp.

References m_RootItem, and SetSelection().

◆ OnSetFocus()

static void CTextItemPanel::OnSetFocus ( wxFocusEvent &  event)
protected

Definition at line 676 of file text_item_panel.cpp.

◆ OnTimer()

void CTextItemPanel::OnTimer ( wxTimerEvent &  event)
protected

Definition at line 949 of file text_item_panel.cpp.

References m_Context, m_MousePos, m_Timer, m_TooltipWindow, and max().

◆ OnUpdateCopy()

void CTextItemPanel::OnUpdateCopy ( wxUpdateUIEvent &  event)
protected

Definition at line 758 of file text_item_panel.cpp.

References IsTextSelected().

◆ RecalSize()

void CTextItemPanel::RecalSize ( )

Definition at line 513 of file text_item_panel.cpp.

References InitDC(), m_Context, and m_RootItem.

◆ ReportError()

void CTextItemPanel::ReportError ( const string report)

◆ ReportLoading()

void CTextItemPanel::ReportLoading ( )

◆ ScrollToBottom()

void CTextItemPanel::ScrollToBottom ( )

Definition at line 769 of file text_item_panel.cpp.

◆ Selecting()

bool CTextItemPanel::Selecting ( ) const
inline

◆ SelEnd()

void CTextItemPanel::SelEnd ( int  row,
int  col 
)

◆ SelMove()

void CTextItemPanel::SelMove ( int  row,
int  col 
)

◆ SelStart()

void CTextItemPanel::SelStart ( int  row,
int  col,
bool  shift 
)

◆ SetCaretPos()

void CTextItemPanel::SetCaretPos ( int  x,
int  y 
)

◆ SetFont()

bool CTextItemPanel::SetFont ( const wxFont &  font)
virtual

◆ SetHost()

void CTextItemPanel::SetHost ( ITextWidgetHost host)
inline

◆ SetMainItem() [1/2]

void CTextItemPanel::SetMainItem ( ITextItem item,
CTextPanelContext context 
)

◆ SetMainItem() [2/2]

void CTextItemPanel::SetMainItem ( shared_ptr< ITextItem item,
shared_ptr< CTextPanelContext context 
)

◆ SetSelection()

void CTextItemPanel::SetSelection ( const CTextBlock selection)

◆ SetTrackSelection()

void CTextItemPanel::SetTrackSelection ( bool  trackSelection)
inline

◆ TriggerTooltip()

void CTextItemPanel::TriggerTooltip ( )

Definition at line 938 of file text_item_panel.cpp.

References m_Timer, and m_TooltipWindow.

Referenced by OnMouseEvent(), and CTextPanelContext::TriggerTooltip().

◆ UpdateCaretPos()

void CTextItemPanel::UpdateCaretPos ( )

◆ x_Draw()

void CTextItemPanel::x_Draw ( wxDC &  dc)
protected

Definition at line 552 of file text_item_panel.cpp.

References InitDC(), m_Context, m_RootItem, and origin.

Referenced by OnDraw().

◆ x_TextPosChanged()

void CTextItemPanel::x_TextPosChanged ( )
protected

Member Data Documentation

◆ m_Buffer

wxBitmap CTextItemPanel::m_Buffer
protected

Definition at line 278 of file text_item_panel.hpp.

Referenced by OnDraw().

◆ m_Context

shared_ptr<CTextPanelContext> CTextItemPanel::m_Context
protected

◆ m_Host

ITextWidgetHost* CTextItemPanel::m_Host
protected

◆ m_MousePos

wxPoint CTextItemPanel::m_MousePos
protected

Definition at line 270 of file text_item_panel.hpp.

Referenced by GetMousePos(), OnCaptureLost(), OnMouseEvent(), and OnTimer().

◆ m_ObjectToItem

TObjectToItem CTextItemPanel::m_ObjectToItem
protected

Definition at line 274 of file text_item_panel.hpp.

Referenced by GetObjectToItem(), MakeObjectVisible(), and SetMainItem().

◆ m_RootItem

shared_ptr<ITextItem> CTextItemPanel::m_RootItem
protected

◆ m_SaveIndex

int CTextItemPanel::m_SaveIndex
protected

Definition at line 263 of file text_item_panel.hpp.

◆ m_Selecting

bool CTextItemPanel::m_Selecting
protected

Definition at line 265 of file text_item_panel.hpp.

Referenced by Selecting(), SelEnd(), and SelStart().

◆ m_TextSelection

CTextBlock CTextItemPanel::m_TextSelection
protected

◆ m_Timer

wxTimer CTextItemPanel::m_Timer
protected

Definition at line 268 of file text_item_panel.hpp.

Referenced by OnTimer(), and TriggerTooltip().

◆ m_TooltipWindow

wxWindow* CTextItemPanel::m_TooltipWindow
protected

Definition at line 269 of file text_item_panel.hpp.

Referenced by OnMouseEvent(), OnTimer(), and TriggerTooltip().

◆ m_TrackSelection

bool CTextItemPanel::m_TrackSelection
protected

Definition at line 272 of file text_item_panel.hpp.

Referenced by GetTrackSelection(), and SetTrackSelection().


The documentation for this class was generated from the following files:
Modified on Tue Apr 23 07:38:03 2024 by modify_doxy.py rev. 669887