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

Public Member Functions

 Dialog (const sf::String &info="", const sf::String &name="")
 
virtual bool update (sf::Vector2f mp, bool pressLeft, bool pressRight, bool aboveHover) override
 
virtual void updateArea () override
 
TextLabelPtr & getLabel ()
 
void addButton (std::shared_ptr< Button > button)
 
void close ()
 
void unimplementedButton (const Button &)
 
void setButtonShift (float value)
 
void setButtonShiftType (PositionType value)
 
PanelSplittedScrolledPtr getPanel () const
 
void setDynamicButtonSize (bool value)
 
- Public Member Functions inherited from PanelScrolled
virtual void draw (sf::RenderTarget &target, sf::RenderStates states)
 
bool addScroll (float delta, Orientation type)
 
void centerScroll (sf::Vector2f position)
 
void setVerticalScrollVelocityMultiplier (float value)
 
void setHorizontalScrollVelocityMultiplier (float value)
 
void setVerticalScrollBrakeMultiplier (float value)
 
void setHorizontalScrollBrakeMultiplier (float value)
 
void setScrollType (ScrollType value)
 
void setScrollEnable (ScrollEnable value)
 
void setScrollButtonThick (float value)
 
void setScrollButtonSize (float value)
 
std::pair< float, float > getVerticalScrollLimits () const
 
std::pair< float, float > getHorizontalScrollLimits () const
 
sf::Vector2f getScrollSize () const
 
const ButtongetVerticalScrollButton () const
 
const ButtongetHorizontalScrollButton () const
 
const PanelgetVerticalScrollPanel () const
 
const PanelgetHorizontalScrollPanel () const
 
- Public Member Functions inherited from Panel
 Panel (const Element *parent=nullptr)
 
const std::shared_ptr< PanelModel > & getModel () const
 
void setModel (const std::shared_ptr< PanelModel > &model)
 
void add (const ElementPtr &element, const Element *stop)
 Instant adding element after stop ptr.
 
void add (const ElementPtr &element)
 Queued adding element to end.
 
void add (const std::vector< ElementPtr > &elements)
 Queued adding vector of elements to end.
 
void add (const std::vector< ElementPtr > &&elements)
 Queued adding vector of elements to end.
 
const ElementPtr get (const sf::String &name)
 
const ElementPtr getFront ()
 
const std::vector< ElementPtr > & getElements ()
 
const std::vector< ElementPtr > & getElements () const
 
bool remove (const Element *ptr)
 Queued removing by ptr.
 
bool remove (int index)
 Queued removing by order index.
 
bool removeFirst (const sf::String &name)
 Queued removing by name.
 
bool removeAll ()
 Queued removing all elements.
 
virtual void refreshModel (bool *wasTwice=nullptr)
 
- Public Member Functions inherited from HaveContextMenu
void setMenu (const std::shared_ptr< Element > &menu)
 
virtual void draw (sf::RenderTarget &target, const sf::RenderStates &states) const
 
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 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 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)
 
- Public Member Functions inherited from HaveEnabled
 HaveEnabled (ColorProvider &colorProvider, bool e=true)
 
bool isEnabled () const
 
void setEnabled (bool enabled)
 
- Public Member Functions inherited from HaveBackground
 HaveBackground (ColorProvider &colorProvider)
 
void setBackgroundTexture (const std::shared_ptr< sf::Texture > &backgroundTexture)
 
void setBackgroundTextureRect (const sf::IntRect &value)
 
void setGradientType (GradientType gradientType)
 
void updateGradient (sf::FloatRect &area)
 
void setGradientPoints (const ColorVector &evenlyColors)
 
void setGradientPoints (const GradientVector &gradientPoints)
 
void setGradientModifier (const GradientModifier &gradientModifier)
 
void setBackgroundSymbol (const sf::VertexArray &value)
 
void setBackgroundSymbolTransform (const sf::Transform &value)
 
void setBackgroundSymbolShift (const sf::Vector2f &value)
 
sf::Vector2f getBackgroundSymbolShift () const
 
void setBackgroundSymbolStrech (bool value)
 
void setBackgroundSymbolColor (sf::Color col)
 
void mulBackgroundSymbolColor (sf::Color col)
 
void initDefaultButtonBackgroundStyle (ColorProvider &colorProvider)
 
bool isBackroundTextureRectActive () const
 
- Public Member Functions inherited from SetColorAccess
 SetColorAccess (ColorProvider &colorProvider)
 
virtual bool setColorFrom (const SetColorAccess &colorAccess)
 
virtual bool setColor (ColorId::Type colorId, StateId::Type stateId, sf::Color newColor)
 
virtual bool setColorEnabled (ColorId::Type colorId, StateId::Type stateId, bool enabled)
 
- Public Member Functions inherited from GetColorAccess
 GetColorAccess (ColorProvider &colorProvider)
 
virtual bool colorDeduce (const ColorRef &colorRef) const
 
virtual bool getColor (ColorId::Type colorId, StateId::Type stateId, sf::Color &result) const
 
- Public Member Functions inherited from HaveMargin
virtual void setMargin (float margin)
 
float getMargin () const
 
void setMarginUnit (MarginUnit marginUnit)
 
float relativeMargin (sf::FloatRect area) const
 
MarginMode getMarginMode () const
 
void setMarginMode (MarginMode value)
 

Protected Attributes

PanelSplittedScrolledPtr ss
 
TextLabelPtr label
 
PanelModelLinePtr centerLine1
 
PanelModelLinePtr centerLine2
 
float buttonShift
 
float lastButtonHeight
 
bool dynamicButtonSize
 
PositionType buttonShiftType
 
- Protected Attributes inherited from PanelScrolled
Button verticalScrollButton
 
Button horizontalScrollButton
 
Panel verticalScrollPanel
 
Panel horizontalScrollPanel
 
sf::Vector2f scroll
 
sf::Vector2f scrollSize
 
sf::Vector2f scrollVelocity
 
sf::FloatRect insideRelativeArea
 
std::pair< float, float > verticalLimits
 
std::pair< float, float > horizontalLimits
 
float scrollVisibleTimer
 
float verticalScrollWakeTimer
 
float horizontalScrollWakeTimer
 
float verticalScrollVelocityMultiplier
 
float horizontalScrollVelocityMultiplier
 
float verticalScrollBrakeMultiplier
 
float horizontalScrollBrakeMultiplier
 
float buttonSize
 
float buttonThick
 
ScrollType scrollType
 
ScrollEnable scrollEnable
 
const float scrollSizeThreshold = 1.5f
 
- Protected Attributes inherited from Panel
std::vector< std::shared_ptr< Element > > elements
 
std::vector< std::pair< bool, std::shared_ptr< Element > > > elementsQueue
 
std::shared_ptr< PanelModelmodel
 
bool updateRenderTexture
 
- 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
 
- Protected Attributes inherited from HaveEnabled
bool enabled
 
- Protected Attributes inherited from HaveBackground
std::shared_ptr< sf::Texture > backgroundTexture
 
sf::VertexArray backgroundSymbol
 
sf::VertexArray gradient
 
GradientVector gradientPoints
 
GradientType gradientType
 
GradientModifier gradientModifier
 
sf::FloatRect lastGradientUpdateArea
 
sf::IntRect backgroundTextureRect
 
sf::Transform backgroundSymbolTransform
 
sf::Vector2f backgroundSymbolShift
 
bool backgroundSymbolStrech
 
- Protected Attributes inherited from HaveColorProviderReference
ColorProvidercolorProviderReference
 
- Protected Attributes inherited from HaveMargin
float margin
 
MarginUnit marginUnit
 
MarginMode marginMode
 

Additional Inherited Members

- Public Types inherited from HaveAction< const Element & >
using function_type = typename HaveActionHelper< const Element & >::function_type
 
- Static Public Member Functions inherited from PanelScrolled
static bool notifyScroll (float delta, Orientation type)
 
- Static Public Member Functions inherited from HaveContextMenu
static HaveContextMenugetLastActiveContextMenu ()
 
- Static Public Member Functions inherited from HaveFocus
static void unFocus ()
 
- Static Public Member Functions inherited from HaveBackground
static void setDefaultBackgroundColor (sf::Color defaultBackgroundColor)
 
static sf::Color sum (sf::Color col, sf::Vector3i mod)
 
- Public Attributes inherited from PanelScrolled
const float scrollVisibleTime = 2.f
 
- 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
 
- Public Attributes inherited from HaveEnabled
friend Element
 
- Public Attributes inherited from HaveBackground
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 Panel
void refreshModelLoop ()
 
void updateElements ()
 
- 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 Member Functions inherited from HaveBackground
void drawBackgroundSymbol (sf::FloatRect area, sf::RenderTarget &target, const sf::RenderStates &states=sf::RenderStates())
 
- Protected Member Functions inherited from HaveColorProviderReference
 HaveColorProviderReference (const HaveColorProviderReference &)=delete
 
HaveColorProviderReferenceoperator= (const HaveColorProviderReference &)
 
 HaveColorProviderReference (ColorProvider &colorProvider)
 
- Static Protected Attributes inherited from PanelScrolled
static PanelScrolledlastPanelScrolledHovered =nullptr
 
- Static Protected Attributes inherited from HaveFocus
static HaveFocuslastFocus = nullptr
 
static float timeFocused =0.f
 
- Static Protected Attributes inherited from HaveBackground
static sf::Color defaultBackgroundColor = {0, 0, 0, 0}
 
static std::shared_ptr< sf::Texture > defaultTexture = nullptr
 

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