Wt  4.12.0
Public Member Functions | Protected Member Functions | List of all members
Wt::WLeafletMap::Marker Class Reference

An abstract marker. More...

#include <WLeafletMap.h>

Inheritance diagram for Wt::WLeafletMap::Marker:
[legend]

Public Member Functions

void addPopup (std::unique_ptr< Popup > popup)
 Add the popup to the Marker. More...
 
std::unique_ptr< PopupremovePopup ()
 Removes the popup from the Marker. More...
 
Popuppopup ()
 Return the popup added to the Marker. More...
 
void addTooltip (std::unique_ptr< Tooltip > tooltip)
 Add the tooltip to the Marker. More...
 
std::unique_ptr< TooltipremoveTooltip ()
 Removes the tooltip from the Marker. More...
 
Tooltiptooltip ()
 Return the tooltip added to the Marker. More...
 
- Public Member Functions inherited from Wt::WLeafletMap::AbstractMapItem
void move (const Coordinate &pos)
 Move the map item. More...
 
Coordinate position () const
 Get the current position. More...
 
Signalclicked ()
 Signal emitted when the user clicks on the map item. More...
 
SignaldoubleClicked ()
 Signal emitted when the user double-clicks on the map item. More...
 
SignalmouseWentDown ()
 Signal emitted when the user holds the mouse click on the map item. More...
 
SignalmouseWentUp ()
 Signal emitted when the user releases the mouse click on the map item. More...
 
SignalmouseWentOver ()
 Signal emitted when the user's mouse enters the map item. More...
 
SignalmouseWentOut ()
 Signal emitted when the user's mouse leaves the map item. More...
 
- Public Member Functions inherited from Wt::WObject
void addChild (std::unique_ptr< WObject > child)
 Add a child WObject whose lifetime is determined by this WObject.
 
template<typename Child >
Child * addChild (std::unique_ptr< Child > child)
 Add a child WObject, returning a raw pointer. More...
 
std::unique_ptr< WObjectremoveChild (WObject *child)
 Remove a child WObject, so its lifetime is no longer determined by this WObject.
 
template<typename Child >
std::unique_ptr< Child > removeChild (Child *child)
 Remove a child WObject, so its lifetime is no longer determined by this WObject. More...
 
virtual const std::string id () const
 Returns the (unique) identifier for this object. More...
 
virtual void setObjectName (const std::string &name)
 Sets an object name. More...
 
virtual std::string objectName () const
 Returns the object name. More...
 
void resetLearnedSlots ()
 Resets learned stateless slot implementations. More...
 
template<class T >
void resetLearnedSlot (void(T::*method)())
 Resets a learned stateless slot implementation. More...
 
template<class T >
WStatelessSlot * implementStateless (void(T::*method)())
 Declares a slot to be stateless and learn client-side behaviour on first invocation. More...
 
template<class T >
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 Declares a slot to be stateless and learn client-side behaviour in advance. More...
 
void isNotStateless ()
 Marks the current function as not stateless. More...
 
template<class T >
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 Provides a JavaScript implementation for a method. More...
 
- Public Member Functions inherited from Wt::Core::observable
 observable () noexcept
 Default constructor.
 
virtual ~observable ()
 Destructor. More...
 
template<typename... Args, typename C >
auto bindSafe (void(C::*method)(Args...)) noexcept
 Protects a method call against object destruction. More...
 
template<typename... Args, typename C >
auto bindSafe (void(C::*method)(Args...) const) const noexcept
 Protects a const method call against object destruction. More...
 
template<typename Function >
auto bindSafe (const Function &function) noexcept
 Protects a function against object destruction. More...
 

Protected Member Functions

void setMap (WLeafletMap *map) override
 Set the map this item belongs to. More...
 
- Protected Member Functions inherited from Wt::WLeafletMap::AbstractMapItem
 AbstractMapItem (const Coordinate &pos)
 Constructor. More...
 
virtual void createItemJS (WStringStream &ss, WStringStream &postJS, long long id)=0
 Writes the JS code to create this item to the stream. More...
 
virtual void unrender ()
 Unrender the item. More...
 
virtual bool needsUpdate () const
 Return whether this item needs to be updated. More...
 
WLeafletMapmap ()
 Returns the map this item belongs to.
 
const WLeafletMapmap () const
 Returns the map this item belongs to.
 
virtual void update (WStringStream &js)
 Writes the JS to update this item to the stream. More...
 
- Protected Member Functions inherited from Wt::WObject
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation. More...
 

Additional Inherited Members

- Public Types inherited from Wt::WObject
typedef void(WObject::* Method) ()
 Typedef for a WObject method without arguments.
 

Detailed Description

An abstract marker.

This marker can be placed on a WLeafletMap at certain coordinates.

Member Function Documentation

◆ addPopup()

void Wt::WLeafletMap::Marker::addPopup ( std::unique_ptr< Popup popup)

Add the popup to the Marker.

Add the popup to the Marker. This will remove any popup previously added to this Marker.

A popup added to a Marker will have it's coordinate set to the coordinate of the Marker and will be closed by default. If the Marker's interactive option is true, the popup will switch between closed and open when the Marker is clicked.

See also
removePopup

◆ addTooltip()

void Wt::WLeafletMap::Marker::addTooltip ( std::unique_ptr< Tooltip tooltip)

Add the tooltip to the Marker.

Add the tooltip to the Marker. This will remove any tooltip previously added to this Marker.

A tooltip added to a Marker will have it's coordinate set to the coordinate of the Marker. If the Marker's option interactive is true, the tooltip will switch between closed and open when the mouse hover over the Marker.

See also
removeTooltip

◆ popup()

Popup* Wt::WLeafletMap::Marker::popup ( )

Return the popup added to the Marker.

See also
addPopup

◆ removePopup()

std::unique_ptr< WLeafletMap::Popup > Wt::WLeafletMap::Marker::removePopup ( )

Removes the popup from the Marker.

See also
addPopup

◆ removeTooltip()

std::unique_ptr< WLeafletMap::Tooltip > Wt::WLeafletMap::Marker::removeTooltip ( )

Removes the tooltip from the Marker.

See also
addTooltip

◆ setMap()

void Wt::WLeafletMap::Marker::setMap ( WLeafletMap map)
overrideprotectedvirtual

Set the map this item belongs to.

This is called to set the map the item belongs to. You can override this function if you need to do something when the item is added to a map.

You should not call this function directly.

See also
map()

Reimplemented from Wt::WLeafletMap::AbstractMapItem.

Reimplemented in Wt::WLeafletMap::WidgetMarker.

◆ tooltip()

Tooltip* Wt::WLeafletMap::Marker::tooltip ( )

Return the tooltip added to the Marker.

See also
addTooltip