fw4spl
src/fwGui/Cursor.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 
8 #include "fwGui/Cursor.hpp"
9 
10 namespace fwGui
11 {
12 
13 //-----------------------------------------------------------------------------
14 
16 {
17  ::fwGui::GuiBaseObject::sptr guiObj = ::fwGui::factory::New(ICursor::REGISTRY_KEY);
18  m_implementation = ::fwGui::ICursor::dynamicCast(guiObj);
19 }
20 
21 //-----------------------------------------------------------------------------
22 
24 {
25 }
26 
27 //-----------------------------------------------------------------------------
28 
30 {
32  {
33  m_implementation->setCursor(cursor);
34  }
35 }
36 
37 //-----------------------------------------------------------------------------
38 
40 {
42  {
43  m_implementation->setDefaultCursor();
44  }
45 }
46 
47 //-----------------------------------------------------------------------------
48 
49 } // namespace fwGui
50 
51 
52 
virtual FWGUI_API void setCursor(::fwGui::ICursor::CursorType cursor) override
Set the cursor.
CursorType
Cursor type.
Definition: ICursor.hpp:29
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
::fwGui::ICursor::sptr m_implementation
Implementation of a cursor in a specific IHM (wx/Qt)
virtual FWGUI_API ~Cursor()
Destructor. Do nothing.
FWGUI_API Cursor()
Constructor. Create the implementation of the specific cursor.
virtual FWGUI_API void setDefaultCursor() override
Set the default cursor.