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

Search Toolkit Book for IStickyTooltipHandlerHost

IStickyTooltipHandlerHost - Class from which windows that want to support sticky tooltips ultimately need to be derived. More...

#include <gui/widgets/wx/sticky_tooltip_handler.hpp>

+ Inheritance diagram for IStickyTooltipHandlerHost:
+ Collaboration diagram for IStickyTooltipHandlerHost:

Classes

struct  TipLocation
 

Public Member Functions

 IStickyTooltipHandlerHost ()
 
virtual ~IStickyTooltipHandlerHost ()
 
void TTHH_Init ()
 Init calls virtual functions so can't be called from ctor. More...
 
virtual string TTHH_NeedTooltip (const wxPoint &)
 Return id of the underlying element to dispaly a tooltip, otherwise "". More...
 
virtual CTooltipInfo TTHH_GetTooltip (const wxRect &)
 Return the contents to be displayed in the tool tip. More...
 
virtual wxWindow * TTHH_GetWindow ()
 Return the pointer to the underlying window. More...
 
virtual bool TTHH_PopupMenuDisplayed ()
 Return true if underlying window is currently displaying a popup menu. More...
 
virtual bool TTHH_ProcessURL (const wxString &)
 Return true if the specified URL has been processed. Used for custom commands. More...
 
std::vector< TipLocationGetDisplayedTips ()
 Return id and position information for currently displayed tips. More...
 
void SetServiceLocator (IServiceLocator *s)
 Set service locator so we can find other views and adjust z order. More...
 

Protected Member Functions

void x_SetCurrentTips (std::vector< TipLocation > &tips)
 Sets information on current tips that can be queried by the user. More...
 
wxFrame * GetUnderlyingFrame ()
 Return the undering wxFrame parent for a wxWindow object. More...
 
bool IsFloatingWindow ()
 Return true if the hosting window is ultimately enclosed in a CFloatingFrame class (meaning its in a floating window) More...
 
void RaiseOverlappingWindows (wxRect r)
 If the tip window is docked in the main window (not a CFloatingFrame) this raises all the CFloatingFrame windows to make sure none of them are overlapped by tooltips. More...
 
bool IsDragging ()
 Retruns true if Any window is currently being dragged. More...
 
void InitWindowGroup (int dock_count=0)
 Mac only - create or return window group for this window. More...
 

Protected Attributes

IServiceLocatorm_ServiceLocator
 Needed to find other views. More...
 
std::vector< TipLocationm_CurrentTips
 

Friends

class CStickyTooltipHandler
 

Detailed Description

IStickyTooltipHandlerHost - Class from which windows that want to support sticky tooltips ultimately need to be derived.

Classes then need to add support for the TTHH_* functions to suppport tool tips.

Definition at line 150 of file sticky_tooltip_handler.hpp.

Constructor & Destructor Documentation

◆ IStickyTooltipHandlerHost()

IStickyTooltipHandlerHost::IStickyTooltipHandlerHost ( )

Definition at line 61 of file sticky_tooltip_handler.cpp.

References NULL.

◆ ~IStickyTooltipHandlerHost()

IStickyTooltipHandlerHost::~IStickyTooltipHandlerHost ( )
virtual

Definition at line 69 of file sticky_tooltip_handler.cpp.

Member Function Documentation

◆ GetDisplayedTips()

std::vector<TipLocation> IStickyTooltipHandlerHost::GetDisplayedTips ( )
inline

Return id and position information for currently displayed tips.

This allows windows showing tips to add visual elements linking the tip window on screen to its corresponding graphical element.

Definition at line 184 of file sticky_tooltip_handler.hpp.

References m_CurrentTips.

Referenced by CSeqGraphicPane::x_RenderTooltipConnector().

◆ GetUnderlyingFrame()

wxFrame * IStickyTooltipHandlerHost::GetUnderlyingFrame ( )
protected

Return the undering wxFrame parent for a wxWindow object.

Definition at line 78 of file sticky_tooltip_handler.cpp.

References _ASSERT, f(), NULL, and TTHH_GetWindow().

Referenced by InitWindowGroup(), and IsFloatingWindow().

◆ InitWindowGroup()

void IStickyTooltipHandlerHost::InitWindowGroup ( int  dock_count = 0)
protected

Mac only - create or return window group for this window.

Definition at line 148 of file sticky_tooltip_handler.cpp.

References f(), GetUnderlyingFrame(), IsFloatingWindow(), NULL, and TTHH_GetWindow().

Referenced by CStickyTooltipHandler::ReCreate(), and TTHH_Init().

◆ IsDragging()

bool IStickyTooltipHandlerHost::IsDragging ( void  )
protected

Retruns true if Any window is currently being dragged.

Definition at line 132 of file sticky_tooltip_handler.cpp.

References IServiceLocator::GetServiceByType(), IWindowManagerService::IsDragging(), m_ServiceLocator, and NULL.

Referenced by CStickyTooltipHandler::OnTimer().

◆ IsFloatingWindow()

bool IStickyTooltipHandlerHost::IsFloatingWindow ( )
protected

Return true if the hosting window is ultimately enclosed in a CFloatingFrame class (meaning its in a floating window)

Definition at line 101 of file sticky_tooltip_handler.cpp.

References f(), GetUnderlyingFrame(), and NULL.

Referenced by InitWindowGroup(), and RaiseOverlappingWindows().

◆ RaiseOverlappingWindows()

void IStickyTooltipHandlerHost::RaiseOverlappingWindows ( wxRect  r)
protected

If the tip window is docked in the main window (not a CFloatingFrame) this raises all the CFloatingFrame windows to make sure none of them are overlapped by tooltips.

Definition at line 109 of file sticky_tooltip_handler.cpp.

References IServiceLocator::GetServiceByType(), IsFloatingWindow(), m_ServiceLocator, NULL, r(), IWindowManagerService::RaiseFloatingWindowsInZOrder(), and TTHH_GetWindow().

Referenced by CStickyTooltipHandler::OnTimer(), CStickyTooltipHandler::ParentShow(), CStickyTooltipHandler::ReCreate(), and CStickyTooltipHandler::Resize().

◆ SetServiceLocator()

void IStickyTooltipHandlerHost::SetServiceLocator ( IServiceLocator s)
inline

Set service locator so we can find other views and adjust z order.

Definition at line 187 of file sticky_tooltip_handler.hpp.

References m_ServiceLocator.

◆ TTHH_GetTooltip()

virtual CTooltipInfo IStickyTooltipHandlerHost::TTHH_GetTooltip ( const wxRect &  )
inlinevirtual

Return the contents to be displayed in the tool tip.

Reimplemented in CSeqGraphicPane, CAlnMultiPane, and CPhyloTreePane.

Definition at line 173 of file sticky_tooltip_handler.hpp.

Referenced by CStickyTooltipHandler::Notify().

◆ TTHH_GetWindow()

virtual wxWindow* IStickyTooltipHandlerHost::TTHH_GetWindow ( )
inlinevirtual

◆ TTHH_Init()

void IStickyTooltipHandlerHost::TTHH_Init ( )

Init calls virtual functions so can't be called from ctor.

Definition at line 73 of file sticky_tooltip_handler.cpp.

References InitWindowGroup().

Referenced by CGlWidgetPane::CGlWidgetPane().

◆ TTHH_NeedTooltip()

virtual string IStickyTooltipHandlerHost::TTHH_NeedTooltip ( const wxPoint &  )
inlinevirtual

Return id of the underlying element to dispaly a tooltip, otherwise "".

Reimplemented in CSeqGraphicPane, CAlnMultiPane, and CPhyloTreePane.

Definition at line 171 of file sticky_tooltip_handler.hpp.

Referenced by CStickyTooltipHandler::CheckForNewTip().

◆ TTHH_PopupMenuDisplayed()

virtual bool IStickyTooltipHandlerHost::TTHH_PopupMenuDisplayed ( )
inlinevirtual

Return true if underlying window is currently displaying a popup menu.

Reimplemented in CGlWidgetPane.

Definition at line 177 of file sticky_tooltip_handler.hpp.

Referenced by CStickyTooltipHandler::Notify(), and CStickyTooltipHandler::OnTimer().

◆ TTHH_ProcessURL()

virtual bool IStickyTooltipHandlerHost::TTHH_ProcessURL ( const wxString &  )
inlinevirtual

Return true if the specified URL has been processed. Used for custom commands.

Reimplemented in CSeqGraphicPane, and CAlnMultiPane.

Definition at line 179 of file sticky_tooltip_handler.hpp.

Referenced by CStickyTooltipHandler::OnLinkClicked().

◆ x_SetCurrentTips()

void IStickyTooltipHandlerHost::x_SetCurrentTips ( std::vector< TipLocation > &  tips)
inlineprotected

Sets information on current tips that can be queried by the user.

Definition at line 193 of file sticky_tooltip_handler.hpp.

References m_CurrentTips.

Referenced by CStickyTooltipHandler::UpdateTips().

Friends And Related Function Documentation

◆ CStickyTooltipHandler

friend class CStickyTooltipHandler
friend

Definition at line 190 of file sticky_tooltip_handler.hpp.

Member Data Documentation

◆ m_CurrentTips

std::vector<TipLocation> IStickyTooltipHandlerHost::m_CurrentTips
protected

Definition at line 212 of file sticky_tooltip_handler.hpp.

Referenced by GetDisplayedTips(), and x_SetCurrentTips().

◆ m_ServiceLocator

IServiceLocator* IStickyTooltipHandlerHost::m_ServiceLocator
protected

Needed to find other views.

Definition at line 210 of file sticky_tooltip_handler.hpp.

Referenced by IsDragging(), RaiseOverlappingWindows(), and SetServiceLocator().


The documentation for this class was generated from the following files:
Modified on Thu Jul 18 16:02:20 2024 by modify_doxy.py rev. 669887