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
5namespace bWidgets {
6
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).
19
20 private:
21 void setScrollOffset(int value);
22};
23
24} // namespace bWidgets
Base class for button like widgets.
Definition: bwAbstractButton.h:17
Definition: bwScrollBar.h:7
auto getTypeIdentifier() const -> std::string_view override
Definition: bwScrollBar.cc:14
int scroll_offset
Definition: bwScrollBar.h:18
bwScrollBar(unsigned int width_hint=0, unsigned int height_hint=0)
Definition: bwScrollBar.cc:9
float ratio
Definition: bwScrollBar.h:17
void draw(bwStyle &style) override
Definition: bwScrollBar.cc:29
auto createHandler() -> std::unique_ptr< bwScreenGraph::EventHandler > override
Definition: bwScrollBar.cc:92
Definition: bwStyle.h:10
unsigned int height_hint
Definition: bwWidget.h:68
unsigned int width_hint
Definition: bwWidget.h:68
Definition: bwContext.h:3