Simple SFML GUI  0.2a
Public Member Functions | Static Public Member Functions | List of all members
HaveContextMenu Class Reference
Inheritance diagram for HaveContextMenu:
Inheritance graph
[legend]
Collaboration diagram for HaveContextMenu:
Collaboration graph
[legend]

Public Member Functions

void setMenu (const std::shared_ptr< Element > &menu)
 
virtual void draw (sf::RenderTarget &target, const sf::RenderStates &states) const
 
virtual bool update (sf::Vector2f pointerPos, bool pressLeft, bool pressRight, bool aboveHover)
 
void setMenuActive (bool menuActive)
 
- Public Member Functions inherited from Pressable< const Element &>
virtual bool setPressed (bool pressed)
 
virtual bool setPressedAlt (bool pressed)
 
sf::Keyboard::Key getHotKey () const
 
void setHotKey (sf::Keyboard::Key hotKey)
 
void setStickyPress (bool stickyPress)
 
void setIgnoreAbove (bool value)
 
void setIgnoreDialogs (bool value)
 
void setIgnoreTextInputable (bool value)
 
- Public Member Functions inherited from FocusAction< const Element & >
virtual void onFocusGain ()
 
virtual void onFocusLost ()
 
- Public Member Functions inherited from Element
 Element (const Element *parent=nullptr)
 
 Element (const Element &element)
 
Elementoperator= (const Element &)
 
void mainDraw (sf::RenderTarget &target, const sf::RenderStates &states=sf::RenderStates())
 
void mainUpdate (sf::RenderWindow &rw)
 
void setParent (const Element *parent)
 
const ElementgetParent () const
 
virtual void updateArea ()
 
virtual bool setRelativeViewport (sf::RenderTarget &target, const sf::FloatRect *area=nullptr) const
 
bool isMaximized () const
 
void setMaximized (bool maximized)
 
void setMaximizationMode (MaximizationMode value)
 
sf::Vector2f getPosition () const
 
sf::Vector2f getSize () const
 
virtual void setSize (sf::Vector2f)
 
virtual void setPosition (sf::Vector2f)
 
void move (sf::Vector2f)
 
sf::FloatRect & getArea ()
 
const sf::FloatRect & getArea () const
 
void fitToWindow (const sf::RenderWindow &rw)
 
void setArea (const sf::FloatRect &area)
 
const sf::FloatRect & getRelativeArea () const
 
sf::Vector2f getRelativeViewportCenterShift () const
 
sf::Vector2f getViewportCenterShift () const
 
void setViewportCenterShift (const sf::Vector2f &value)
 
sf::String getParentName () const
 
sf::String getTypeName () const
 
sf::FloatRect getClippedArea () const
 
sf::FloatRect computeRelativeArea () const
 
- Public Member Functions inherited from ElementBase
virtual void draw (sf::RenderTarget &target, sf::RenderStates states=sf::RenderStates())=0
 
- Public Member Functions inherited from HaveName
 HaveName (const sf::String &n=L"")
 
const sf::String & getName () const
 
void setName (const sf::String &name)
 
- Public Member Functions inherited from HaveFocus
 HaveFocus (bool focus=false)
 
bool isFocus () const
 
void setFocus (bool focus)
 
- Public Member Functions inherited from HaveVisible
 HaveVisible (bool v=true)
 
bool isVisible () const
 
void setVisible (bool visible)
 
- Public Member Functions inherited from HaveAction< const Element & >
virtual void onSetAction (const sf::String &type)
 
virtual void setAction (function_type &&action, const sf::String &type=ActionType::main)
 
virtual void setAction (function_type &action, const sf::String &type=ActionType::main)
 
virtual void setAction (std::function< void()> &&action, const sf::String &type=ActionType::main)
 
virtual void setAction (std::function< void()> &action, const sf::String &type=ActionType::main)
 
virtual void doAction (const sf::String &type=ActionType::main)
 
- Public Member Functions inherited from HaveHover
 HaveHover (ColorProvider &colorProvider, bool h=false)
 
bool isHover () const
 
void setHover (bool hover)
 
virtual bool updateHover (const sf::Vector2f &pointer, const sf::FloatRect &clippedArea)
 
void setTooltip (const sf::String &value)
 
- Public Member Functions inherited from HavePressed
 HavePressed (ColorProvider &colorProvider, bool p=false, bool pa=false)
 
virtual bool isPressed () const
 
virtual bool isPressedAlt () const
 
- Public Member Functions inherited from HaveSelected
 HaveSelected (ColorProvider &colorProvider)
 
bool isSelected () const
 
void setSelected (bool value)
 

Static Public Member Functions

static HaveContextMenugetLastActiveContextMenu ()
 
- Static Public Member Functions inherited from HaveFocus
static void unFocus ()
 

Additional Inherited Members

- Public Types inherited from HaveAction< const Element & >
using function_type = typename HaveActionHelper< const Element & >::function_type
 
- Public Attributes inherited from HaveFocus
friend TextInputable
 
- Public Attributes inherited from GlobalTimer
friend Element
 
- Public Attributes inherited from HaveHover
friend Element
 
- Public Attributes inherited from HavePressed
friend Element
 
- Static Public Attributes inherited from GlobalTimer
static const sf::Clock & dclock = GlobalTimer::drawClock
 
static const sf::Clock & rclock = GlobalTimer::runtimeClock
 
static const float & dtime = GlobalTimer::drawTime
 
static const float & rtime = GlobalTimer::runTime
 
static const float & fps = GlobalTimer::framesPerSecond
 
- Protected Member Functions inherited from Element
sf::Vector2f computeRelativeViewportCenterShift () const
 
sf::FloatRect computeClipped () const
 
sf::FloatRect clipArea (const sf::FloatRect &scissors, sf::FloatRect toCut) const
 
ColorProvidergetColorProvider ()
 
- Protected Member Functions inherited from HaveGUIManagerInfo
bool anyDialogExist ()
 
- Protected Attributes inherited from Pressable< const Element &>
sf::Keyboard::Key hotKey
 
bool hotPress
 
bool stickyPress
 
bool ignoreAbove
 
bool ignoreDialogs
 
bool ignoreTextInputable
 
- Protected Attributes inherited from Element
const Elementparent = nullptr
 
sf::FloatRect area
 
sf::FloatRect lastArea
 
sf::FloatRect relativeParentArea
 
sf::FloatRect relativeArea
 
sf::FloatRect clippedArea
 
sf::Vector2f viewportCenterShift
 
sf::Vector2f relativeViewportCenterShift
 
MaximizationMode maximizationMode = MaximizationMode::Both
 
bool relativeParentSizeChanged = false
 
bool relativeParentWidthChanged = false
 
bool relativeParentHeightChanged = false
 
bool areaChanged = false
 
bool maximized = false
 
- Protected Attributes inherited from HaveName
sf::String name
 
- Protected Attributes inherited from HaveFocus
bool focus
 
- Protected Attributes inherited from HaveVisible
bool visible
 
- Protected Attributes inherited from HaveAction< const Element & >
std::map< sf::String, function_type > action
 
std::map< sf::String, std::function< void()> > actionVoid
 
sf::String mainActionType
 
- Protected Attributes inherited from HaveHover
bool hover
 
sf::String tooltip
 
- Protected Attributes inherited from HavePressed
bool pressed = false
 
bool lastPressLeft = false
 
bool pressedAlt = false
 
bool lastPressRight = false
 
- Protected Attributes inherited from HaveSelected
friend Element
 
bool selected
 
- Static Protected Attributes inherited from HaveFocus
static HaveFocuslastFocus = nullptr
 
static float timeFocused =0.f
 

The documentation for this class was generated from the following files: