bWidgets
Core widget toolkit designed for Blender
bwScrollBar.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
bwAbstractButton.h
"
4
5
namespace
bWidgets
{
6
7
class
bwScrollBar
:
public
bwAbstractButton
{
8
public
:
9
bwScrollBar
(
unsigned
int
width_hint
= 0,
unsigned
int
height_hint
= 0);
10
11
auto
getTypeIdentifier
()
const
-> std::string_view
override
;
12
13
void
draw
(
bwStyle
& style)
override
;
14
15
auto
createHandler
() -> std::unique_ptr<bwScreenGraph::EventHandler>
override
;
16
17
float
ratio
= 0.0f;
// Ration between content and area height (max 1.0f).
18
int
scroll_offset
= 0;
19
20
private
:
21
void
setScrollOffset(
int
value);
22
};
23
24
}
// namespace bWidgets
bwAbstractButton.h
bWidgets::bwAbstractButton
Base class for button like widgets.
Definition:
bwAbstractButton.h:17
bWidgets::bwScrollBar
Definition:
bwScrollBar.h:7
bWidgets::bwScrollBar::getTypeIdentifier
auto getTypeIdentifier() const -> std::string_view override
Definition:
bwScrollBar.cc:14
bWidgets::bwScrollBar::scroll_offset
int scroll_offset
Definition:
bwScrollBar.h:18
bWidgets::bwScrollBar::bwScrollBar
bwScrollBar(unsigned int width_hint=0, unsigned int height_hint=0)
Definition:
bwScrollBar.cc:9
bWidgets::bwScrollBar::ratio
float ratio
Definition:
bwScrollBar.h:17
bWidgets::bwScrollBar::draw
void draw(bwStyle &style) override
Definition:
bwScrollBar.cc:29
bWidgets::bwScrollBar::createHandler
auto createHandler() -> std::unique_ptr< bwScreenGraph::EventHandler > override
Definition:
bwScrollBar.cc:92
bWidgets::bwStyle
Definition:
bwStyle.h:10
bWidgets::bwWidget::height_hint
unsigned int height_hint
Definition:
bwWidget.h:68
bWidgets::bwWidget::width_hint
unsigned int width_hint
Definition:
bwWidget.h:68
bWidgets
Definition:
bwContext.h:3
bwidgets
widgets
bwScrollBar.h
Generated by
1.9.3