#include <Malena/Graphics/Controls/ScrollPane.h>
Definition at line 14 of file ScrollPane.h.
◆ App
◆ Flag
◆ State
◆ ScrollPane()
| ml::ScrollPane::ScrollPane |
( |
float | width, |
|
|
float | height ) |
◆ addComponent()
| void ml::ScrollPane::addComponent |
( |
ml::Core & | component | ) |
|
◆ draw()
◆ embed()
| void ml::ScrollPane::embed |
( |
| ) |
|
Silence this ScrollPane from the event system entirely.
Call this when using ScrollPane as a private member of another component rather than as a standalone addComponent() citizen. Removes ALL event subscriptions from both the pane and its internal scrollbar thumb so they cannot steal focus or intercept events from the host component.
ScrollPane remains fully functional as a draw helper — setPosition, setSize, setScrollOffsetY, setContentHeight, and draw() all continue to work normally.
Scroll wheel and thumb drag become the host component's responsibility when embedded.
Usage
{
MyWidget() {
}
};
Primary base class for all user-facing Malena components.
- See also
- unsubscribeAll
◆ getGlobalBounds()
◆ getPosition()
◆ getRenderStates()
◆ getScrollOffsetY()
| float ml::ScrollPane::getScrollOffsetY |
( |
| ) |
const |
|
nodiscard |
Return the current vertical scroll offset in pixels.
◆ removeComponent()
| void ml::ScrollPane::removeComponent |
( |
ml::Core & | component | ) |
|
◆ setBackgroundColor()
| void ml::ScrollPane::setBackgroundColor |
( |
sf::Color | color | ) |
|
◆ setContentHeight()
| void ml::ScrollPane::setContentHeight |
( |
float | height | ) |
|
Override the content height used for scroll calculations.
Use when content is rendered externally (e.g. TextArea canvas). Pass 0 to revert to summing children heights.
◆ setPosition()
| void ml::ScrollPane::setPosition |
( |
const sf::Vector2f & | position | ) |
|
|
override |
◆ setScrollBarColor()
| void ml::ScrollPane::setScrollBarColor |
( |
sf::Color | color | ) |
|
◆ setScrollBarWidth()
| void ml::ScrollPane::setScrollBarWidth |
( |
float | width | ) |
|
◆ setScrollOffsetY()
| void ml::ScrollPane::setScrollOffsetY |
( |
float | y | ) |
|
Programmatically set the vertical scroll offset (clamped).
◆ setSize()
| void ml::ScrollPane::setSize |
( |
float | width, |
|
|
float | height ) |
The documentation for this class was generated from the following file: