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

Search Toolkit Book for CGlWidgetBase

class CGlWidgetBase More...

#include <gui/widgets/gl/gl_widget_base.hpp>

+ Inheritance diagram for CGlWidgetBase:
+ Collaboration diagram for CGlWidgetBase:

Public Types

enum  { ID_GLCHILDPANE = wxID_HIGHEST + 200 , ID_VSCROPLLBAR , ID_HSCROPLLBAR }
 
- Public Types inherited from CEventHandler
enum  EDispatch { eDispatch_SelfOnly , eDispatch_AllHandlers , eDispatch_FirstHandler , eDispatch_Default = eDispatch_AllHandlers }
 enum controlling dispatching strategies More...
 
enum  EPoolName {
  ePool_Default = 0 , ePool_Parent , ePool_Child , ePool_Sibling ,
  ePool_NextAvailable
}
 Identifiers for standard pools. More...
 
typedef vector< CEventHandler * > TListeners
 
typedef map< int, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 

Public Member Functions

 CGlWidgetBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
 class CGlWidgetBase More...
 
virtual ~CGlWidgetBase ()
 
virtual void Create ()
 creates controls and performs basic initialization More...
 
virtual CGlPaneGetPort ()=0
 implement these 2 functions in derived classes More...
 
virtual const CGlPaneGetPort () const =0
 
virtual void ZoomRect (const TModelRect &rc)
 
virtual void ZoomPoint (const TModelPoint &point, TModelUnit factor, CGlPane::EZoomOptions=CGlPane::fZoomXY)
 
virtual void Scroll (TModelUnit d_x, TModelUnit d_y)
 
virtual void NotifyVisibleRangeChanged ()
 
void OnAllEvents (CViewEvent::TEventObject evt)
 
IRegSettings interface implementation
virtual void SetRegistryPath (const string &reg_path)
 
virtual void LoadSettings ()
 
virtual void SaveSettings () const
 
wxWidgets event handlers
void OnSize (wxSizeEvent &event)
 
void OnScroll (wxScrollEvent &event)
 
void OnZoomIn (wxCommandEvent &event)
 
void OnZoomInX (wxCommandEvent &event)
 
void OnZoomInY (wxCommandEvent &event)
 
void OnZoomInMouse (wxCommandEvent &event)
 
void OnZoomOut (wxCommandEvent &event)
 
void OnZoomOutX (wxCommandEvent &event)
 
void OnZoomOutY (wxCommandEvent &event)
 
void OnZoomOutMouse (wxCommandEvent &event)
 
void OnZoomAll (wxCommandEvent &event)
 
void OnZoomAllX (wxCommandEvent &event)
 
void OnZoomAllY (wxCommandEvent &event)
 
void OnEnableCmdUpdate (wxUpdateUIEvent &event)
 
- Public Member Functions inherited from CEventHandler
 CEventHandler ()
 CEventHandler. More...
 
virtual ~CEventHandler ()
 
virtual void AddListener (CEventHandler *listener, int pool_name=ePool_Default)
 Add a listener. More...
 
virtual void RemoveListener (CEventHandler *listener)
 Remove a listener. More...
 
virtual void RemoveAllListeners (void)
 
virtual bool HasListener (CEventHandler *listener, int pool_name=ePool_Default) const
 returns "true" if the given listener belongs to the specified pool More...
 
virtual const TListenersGetListeners (int pool_name=ePool_Default) const
 returns a set of listeners fro the specified pool More...
 
virtual bool OnEvent (CEvent *evt)
 Processes en event. Returns "true" if event has been processed. More...
 
virtual bool Dispatch (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Dispatches an event to the listeners (but does not handle it). More...
 
virtual bool Send (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Sends an event synchronously. More...
 
virtual bool Send (CEvent *evt, int pool_name)
 
void Post (CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Handles an event asynchronously (process and/or dispatch). More...
 
- Public Member Functions inherited from IRegSettings
virtual ~IRegSettings ()
 

Protected Member Functions

virtual bool DoPopupMenu (wxMenu *menu, int x, int y)
 Override to record when (blocking) popup menu is active. More...
 
virtual void x_CreateControls (void)
 creates Pane, Scrollbars and other child widgets, called from Create() More...
 
virtual void x_CreatePane ()=0
 factory method creating master pane, called form x_CreateControls() More...
 
virtual CGlWidgetPanex_GetPane ()
 
virtual void x_RedrawControls (void)
 
virtual void x_Update ()
 Update handlers. More...
 
virtual void x_SaveStates ()
 
virtual void x_SetPortLimits (void)=0
 updates model limits of the Master CGlPane More...
 
virtual void x_ZoomIn (int options)
 Zoom functions. More...
 
virtual void x_ZoomOut (int options)
 
virtual void x_ZoomAll (int options)
 
virtual void x_UpdateOnZoom ()
 
virtual void x_UpdateOnHScroll ()
 
virtual void x_UpdateOnVScroll ()
 
virtual void x_UpdateScrollbars ()
 
virtual void x_OnScrollX (int pos)
 
virtual void x_OnScrollY (int pos)
 
virtual void x_ShowDecoratedPopupMenu (wxMenu *menu)
 
- Protected Member Functions inherited from CEventHandler
virtual const SEvtMapGetEventMap () const
 
void x_DeclareDead ()
 Removes itself unavailable for async event delivery. More...
 
void x_AddListenerToPool (CEventHandler *listener, int pool_name)
 

Protected Attributes

string m_RegPath
 path to the widget's settings in GUI Registry More...
 
TModelPoint m_PopupPoint
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

Additional Inherited Members

- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

class CGlWidgetBase

Definition at line 212 of file gl_widget_base.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_GLCHILDPANE 
ID_VSCROPLLBAR 
ID_HSCROPLLBAR 

Definition at line 219 of file gl_widget_base.hpp.

Constructor & Destructor Documentation

◆ CGlWidgetBase()

CGlWidgetBase::CGlWidgetBase ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel") 
)

class CGlWidgetBase

Definition at line 633 of file gl_widget_base.cpp.

◆ ~CGlWidgetBase()

CGlWidgetBase::~CGlWidgetBase ( )
virtual

Definition at line 645 of file gl_widget_base.cpp.

Member Function Documentation

◆ Create()

void CGlWidgetBase::Create ( void  )
virtual

◆ DoPopupMenu()

bool CGlWidgetBase::DoPopupMenu ( wxMenu *  menu,
int  x,
int  y 
)
protectedvirtual

Override to record when (blocking) popup menu is active.

Definition at line 878 of file gl_widget_base.cpp.

References b, CGlWidgetPane::SetPopupMenuDisplayed(), and x_GetPane().

◆ GetPort() [1/2]

virtual const CGlPane& CGlWidgetBase::GetPort ( ) const
pure virtual

◆ GetPort() [2/2]

virtual CGlPane& CGlWidgetBase::GetPort ( )
pure virtual

◆ LoadSettings()

void CGlWidgetBase::LoadSettings ( )
virtual

Implements IRegSettings.

Reimplemented in CPhyloTreeWidget, and CAlnMultiWidget.

Definition at line 664 of file gl_widget_base.cpp.

References Error(), and LOG_POST.

◆ NotifyVisibleRangeChanged()

void CGlWidgetBase::NotifyVisibleRangeChanged ( )
virtual

◆ OnAllEvents()

void CGlWidgetBase::OnAllEvents ( CViewEvent::TEventObject  evt)

Definition at line 1126 of file gl_widget_base.cpp.

References _TRACE.

◆ OnEnableCmdUpdate()

void CGlWidgetBase::OnEnableCmdUpdate ( wxUpdateUIEvent &  event)

Definition at line 816 of file gl_widget_base.cpp.

◆ OnScroll()

void CGlWidgetBase::OnScroll ( wxScrollEvent &  event)

◆ OnSize()

void CGlWidgetBase::OnSize ( wxSizeEvent &  event)

◆ OnZoomAll()

void CGlWidgetBase::OnZoomAll ( wxCommandEvent &  event)

Definition at line 798 of file gl_widget_base.cpp.

References CGlPane::fZoomXY, and x_ZoomAll().

Referenced by CUpdateSeqPanel::OnZoomAll().

◆ OnZoomAllX()

void CGlWidgetBase::OnZoomAllX ( wxCommandEvent &  event)

Definition at line 804 of file gl_widget_base.cpp.

References CGlPane::fZoomX, and x_ZoomAll().

◆ OnZoomAllY()

void CGlWidgetBase::OnZoomAllY ( wxCommandEvent &  event)

Definition at line 810 of file gl_widget_base.cpp.

References CGlPane::fZoomY, and x_ZoomAll().

◆ OnZoomIn()

void CGlWidgetBase::OnZoomIn ( wxCommandEvent &  event)

Definition at line 737 of file gl_widget_base.cpp.

References CGlPane::fZoomXY, and x_ZoomIn().

◆ OnZoomInMouse()

void CGlWidgetBase::OnZoomInMouse ( wxCommandEvent &  event)

◆ OnZoomInX()

void CGlWidgetBase::OnZoomInX ( wxCommandEvent &  event)

Definition at line 743 of file gl_widget_base.cpp.

References CGlPane::fZoomX, and x_ZoomIn().

Referenced by CUpdateSeqPanel::OnZoomIn().

◆ OnZoomInY()

void CGlWidgetBase::OnZoomInY ( wxCommandEvent &  event)

Definition at line 749 of file gl_widget_base.cpp.

References CGlPane::fZoomY, and x_ZoomIn().

◆ OnZoomOut()

void CGlWidgetBase::OnZoomOut ( wxCommandEvent &  event)

Definition at line 767 of file gl_widget_base.cpp.

References CGlPane::fZoomXY, and x_ZoomOut().

◆ OnZoomOutMouse()

void CGlWidgetBase::OnZoomOutMouse ( wxCommandEvent &  event)

◆ OnZoomOutX()

void CGlWidgetBase::OnZoomOutX ( wxCommandEvent &  event)

Definition at line 773 of file gl_widget_base.cpp.

References CGlPane::fZoomX, and x_ZoomOut().

Referenced by CUpdateSeqPanel::OnZoomOut().

◆ OnZoomOutY()

void CGlWidgetBase::OnZoomOutY ( wxCommandEvent &  event)

Definition at line 779 of file gl_widget_base.cpp.

References CGlPane::fZoomY, and x_ZoomOut().

◆ SaveSettings()

void CGlWidgetBase::SaveSettings ( ) const
virtual

Implements IRegSettings.

Reimplemented in CPhyloTreeWidget, and CAlnMultiWidget.

Definition at line 670 of file gl_widget_base.cpp.

References Error(), and LOG_POST.

◆ Scroll()

void CGlWidgetBase::Scroll ( TModelUnit  d_x,
TModelUnit  d_y 
)
virtual

◆ SetRegistryPath()

void CGlWidgetBase::SetRegistryPath ( const string reg_path)
virtual

Implements IRegSettings.

Reimplemented in CPhyloTreeWidget.

Definition at line 658 of file gl_widget_base.cpp.

References m_RegPath.

Referenced by CUpdateSeqPanel::CreateControls(), and CMultiAlignView::SetRegistryPath().

◆ x_CreateControls()

void CGlWidgetBase::x_CreateControls ( void  )
protectedvirtual

creates Pane, Scrollbars and other child widgets, called from Create()

Reimplemented in CPhyloTreeWidget, and CCrossAlnWidget.

Definition at line 890 of file gl_widget_base.cpp.

References _ASSERT, ID_HSCROPLLBAR, ID_VSCROPLLBAR, x_CreatePane(), and x_GetPane().

Referenced by Create(), CAlnMultiWidget::CreateWidget(), and CPhyloTreeWidget::x_CreateControls().

◆ x_CreatePane()

virtual void CGlWidgetBase::x_CreatePane ( )
protectedpure virtual

factory method creating master pane, called form x_CreateControls()

Implemented in CPhyloTreeWidget, CAlnMultiWidget, CSeqGraphicWidget, CGlWidgetDemo, CSeqTextWidget, CHitMatrixWidget, and CCrossAlnWidget.

Referenced by x_CreateControls().

◆ x_GetPane()

CGlWidgetPane * CGlWidgetBase::x_GetPane ( )
protectedvirtual

◆ x_OnScrollX()

void CGlWidgetBase::x_OnScrollX ( int  pos)
protectedvirtual

◆ x_OnScrollY()

void CGlWidgetBase::x_OnScrollY ( int  pos)
protectedvirtual

◆ x_RedrawControls()

void CGlWidgetBase::x_RedrawControls ( void  )
protectedvirtual

◆ x_SaveStates()

virtual void CGlWidgetBase::x_SaveStates ( )
inlineprotectedvirtual

◆ x_SetPortLimits()

virtual void CGlWidgetBase::x_SetPortLimits ( void  )
protectedpure virtual

updates model limits of the Master CGlPane

Implemented in CPhyloTreeWidget, CAlnMultiWidget, CSeqGraphicWidget, CGlWidgetDemo, CSeqTextWidget, CHitMatrixWidget, and CCrossAlnWidget.

Referenced by Create().

◆ x_ShowDecoratedPopupMenu()

void CGlWidgetBase::x_ShowDecoratedPopupMenu ( wxMenu *  menu)
protectedvirtual

◆ x_Update()

void CGlWidgetBase::x_Update ( )
protectedvirtual

Update handlers.

Reimplemented in CSeqGraphicWidget, CSeqTextWidget, CPhyloTreeWidget, CHitMatrixWidget, and CCrossAlnWidget.

Definition at line 936 of file gl_widget_base.cpp.

◆ x_UpdateOnHScroll()

void CGlWidgetBase::x_UpdateOnHScroll ( )
protectedvirtual

Definition at line 953 of file gl_widget_base.cpp.

References x_UpdateOnZoom().

Referenced by OnScroll().

◆ x_UpdateOnVScroll()

void CGlWidgetBase::x_UpdateOnVScroll ( )
protectedvirtual

Reimplemented in CSeqGraphicWidget.

Definition at line 958 of file gl_widget_base.cpp.

References x_UpdateOnZoom().

Referenced by OnScroll().

◆ x_UpdateOnZoom()

void CGlWidgetBase::x_UpdateOnZoom ( void  )
protectedvirtual

◆ x_UpdateScrollbars()

void CGlWidgetBase::x_UpdateScrollbars ( )
protectedvirtual

◆ x_ZoomAll()

void CGlWidgetBase::x_ZoomAll ( int  options)
protectedvirtual

◆ x_ZoomIn()

void CGlWidgetBase::x_ZoomIn ( int  options)
protectedvirtual

◆ x_ZoomOut()

void CGlWidgetBase::x_ZoomOut ( int  options)
protectedvirtual

◆ ZoomPoint()

void CGlWidgetBase::ZoomPoint ( const TModelPoint point,
TModelUnit  factor,
CGlPane::EZoomOptions  options = CGlPane::fZoomXY 
)
virtual

◆ ZoomRect()

void CGlWidgetBase::ZoomRect ( const TModelRect rc)
virtual

Member Data Documentation

◆ m_PopupPoint

TModelPoint CGlWidgetBase::m_PopupPoint
protected

◆ m_RegPath

string CGlWidgetBase::m_RegPath
protected

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