From eb290bf362c3663059f2dddba939b553a8be17fe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 9 Aug 2013 15:21:31 +0200 Subject: [PATCH] Added some comments. --- common/drawpanel_gal.cpp | 6 ------ include/class_drawpanel_gal.h | 40 ++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 16c59c3ced..ba7e5b38b7 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -213,9 +213,3 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) m_eventDispatcher->DispatchWxEvent( aEvent ); } } - - -KiGfx::VIEW_CONTROLS* EDA_DRAW_PANEL_GAL::GetViewControls() const -{ - return m_viewControls; -} diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 9c789ac3b0..0ed254471a 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -69,20 +69,44 @@ public: void SwitchBackend( GalType aGalType ); /** - * Function GetGAL + * Function GetGAL() * Returns a pointer to the GAL instance used in the panel. - * @return KiGfx::GAL* Instance of GAL. + * @return The instance of GAL. */ - KiGfx::GAL* GetGAL() { return m_gal; } + KiGfx::GAL* GetGAL() const + { + return m_gal; + } - void SetView( KiGfx::VIEW* aView ) { m_view = aView; } + /** + * Function GetView() + * Returns a pointer to the VIEW instance used in the panel. + * @return The instance of VIEW. + */ + KiGfx::VIEW* GetView() const + { + return m_view; + } - KiGfx::VIEW* GetView() const { return m_view; } - KiGfx::VIEW_CONTROLS* GetViewControls() const; + /** + * Function GetViewControls() + * Returns a pointer to the VIEW_CONTROLS instance used in the panel. + * @return The instance of VIEW_CONTROLS. + */ + KiGfx::VIEW_CONTROLS* GetViewControls() const + { + return m_viewControls; + } + /// @copydoc wxWindow::Refresh() virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); - void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher) + /** + * Function SetEventDispatcher() + * Sets a dispatcher that processes events and forwards them to tools. + * @param aEventDispatcher is the object that will be used for dispatching events. + */ + void SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ) { m_eventDispatcher = aEventDispatcher; } @@ -99,7 +123,7 @@ protected: ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL - TOOL_DISPATCHER* m_eventDispatcher; + TOOL_DISPATCHER* m_eventDispatcher; ///< Processes and forwards events to tools }; #endif