|
Simple GUI Library
|
Public Member Functions | |
| ImageView (Image *image=nullptr, bool preserveRatio=false) | |
| virtual Component * | getHitComponent (int32_t x, int32_t y) override |
| virtual void | render (const Sml::Rectangle< int32_t > &targetRegion) override |
| virtual void | layout () override |
| virtual void | prerender () override |
| virtual bool | isResizable () const override |
| const Image * | getImage () const |
| void | setImage (const Image *image) |
| float | getRatio () const |
| bool | getPreserveRatio () const |
| void | setPreserveRatio (bool preserveRatio) |
| int32_t | getFitWidth () const |
| void | setFitWidth (int32_t width) |
| int32_t | getFitHeight () const |
| void | setFitHeight (int32_t height) |
| virtual int32_t | computePrefWidth (int32_t height=-1) const override |
| virtual int32_t | computePrefHeight (int32_t width=-1) const override |
| virtual int32_t | computeMinWidth (int32_t height=-1) const override |
| virtual int32_t | computeMinHeight (int32_t width=-1) const override |
| virtual int32_t | computeMaxWidth (int32_t height=-1) const override |
| virtual int32_t | computeMaxHeight (int32_t width=-1) const override |
Public Member Functions inherited from Sgl::Component | |
| virtual bool | containsComponent (Component *component) |
| virtual Sml::EventDispatchChain * | buildEventDispatchChain (Sml::EventDispatchChain *chain) override |
| bool | isVisible () const |
| void | setVisible (bool visible) |
| bool | isInteractable () const |
| void | setInteractable (bool interactable) |
| Visibility | getVisibility () const |
| void | setVisibility (Visibility visibility) |
| bool | isFocused () const |
| bool | isHovered () const |
| void | requestFocus () |
| void | requestDrag () |
| const Shadow & | getShadow () const |
| void | setShadow (const ShadowSpecification *specification) |
| GuiEventDispatcher * | getEventDispatcher () |
| Scene * | getScene () |
| void | setScene (Scene *scene) |
| const Parent * | getParent () const |
| Parent * | getModifiableParent () |
| void | setParent (Parent *parent) |
| Sml::Vec2i | computeLocalToScenePos (const Sml::Vec2i &localPos) const |
| Sml::Vec2i | computeSceneToLocalPos (const Sml::Vec2i &scenePos) const |
| Sml::Rectangle< int32_t > | getOriginBounds () const |
| const Sml::Rectangle< int32_t > & | getLayoutBounds () const |
| const Sml::Vec2i & | getLayoutPos () const |
| int32_t | getLayoutX () const |
| int32_t | getLayoutY () const |
| int32_t | getLayoutWidth () const |
| int32_t | getLayoutHeight () const |
| void | setLayoutX (int32_t x) |
| void | setLayoutY (int32_t y) |
| void | setLayoutWidth (int32_t width) |
| void | setLayoutHeight (int32_t height) |
| Sml::Vec2i | computeScenePos () |
Additional Inherited Members | |
Public Types inherited from Sgl::Component | |
| enum class | Visibility { INVISIBLE_DISABLED = 0b00 , INVISIBLE_INTERACTABLE = 0b01 , VISIBLE_DISABLED = 0b10 , VISIBLE_INTERACTABLE = 0b11 } |
| Used to determine if Component should be rendered and targeted by events. More... | |
Public Attributes inherited from Sgl::Component | |
| friend | Scene |
Static Public Attributes inherited from Sgl::Component | |
| static const int32_t | USE_COMPUTED_SIZE = INT32_MIN |
| static const int32_t | UNLIMITED_SIZE = INT32_MAX |
Protected Member Functions inherited from Sgl::Component | |
| void | updateShadow () |
| void | renderShadow (const Sml::Rectangle< int32_t > &targetRegion) |
| virtual void | setSceneInSceneTree (Scene *scene) |
Protected Attributes inherited from Sgl::Component | |
| Visibility | m_Visibility = Visibility::VISIBLE_INTERACTABLE |
| bool | m_Focused = false |
| bool | m_Hovered = false |
| Shadow | m_Shadow |
| GuiEventDispatcher | m_Dispatcher |
| Scene * | m_Scene = nullptr |
| Parent * | m_Parent = nullptr |
| Sml::Rectangle< int32_t > | m_LayoutBounds = {{0, 0}, 0, 0} |
Definition at line 16 of file image_view.h.
| Sgl::ImageView::ImageView | ( | Image * | image = nullptr, |
| bool | preserveRatio = false |
||
| ) |
Definition at line 13 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 98 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 97 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 95 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 94 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 82 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 70 of file image_view.cpp.
| int32_t Sgl::ImageView::getFitHeight | ( | ) | const |
Definition at line 55 of file image_view.cpp.
| int32_t Sgl::ImageView::getFitWidth | ( | ) | const |
Definition at line 52 of file image_view.cpp.
|
overridevirtual |
Reimplemented from Sgl::Component.
Definition at line 16 of file image_view.cpp.
| const Image * Sgl::ImageView::getImage | ( | ) | const |
Definition at line 41 of file image_view.cpp.
| bool Sgl::ImageView::getPreserveRatio | ( | ) | const |
Definition at line 49 of file image_view.cpp.
| float Sgl::ImageView::getRatio | ( | ) | const |
Definition at line 44 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 39 of file image_view.cpp.
|
overridevirtual |
Reimplemented from Sgl::Component.
Definition at line 36 of file image_view.cpp.
|
overridevirtual |
Reimplemented from Sgl::Component.
Definition at line 37 of file image_view.cpp.
|
overridevirtual |
Implements Sgl::Component.
Definition at line 26 of file image_view.cpp.
| void Sgl::ImageView::setFitHeight | ( | int32_t | height | ) |
Definition at line 56 of file image_view.cpp.
| void Sgl::ImageView::setFitWidth | ( | int32_t | width | ) |
Definition at line 53 of file image_view.cpp.
| void Sgl::ImageView::setImage | ( | const Image * | image | ) |
Definition at line 42 of file image_view.cpp.
| void Sgl::ImageView::setPreserveRatio | ( | bool | preserveRatio | ) |
Definition at line 50 of file image_view.cpp.