bWidgets
Core widget toolkit designed for Blender
bwPushButton.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "bwAbstractButton.h"
6
7namespace bWidgets {
8
10 public:
11 bwPushButton(const std::string& text,
12 std::optional<unsigned int> width_hint = std::nullopt,
13 std::optional<unsigned int> height_hint = std::nullopt);
14
15 auto getTypeIdentifier() const -> std::string_view override;
16
17 auto getIcon() const -> const bwIconInterface* override;
18 auto setIcon(const class bwIconInterface&) -> bwPushButton&;
19
20 auto canAlign() const -> bool override;
21
22 private:
23 const class bwIconInterface* icon{nullptr};
24};
25
26} // namespace bWidgets
Base class for button like widgets.
Definition: bwAbstractButton.h:17
std::string text
Definition: bwAbstractButton.h:42
Interface to reference icons from within bWidgets.
Definition: bwIconInterface.h:22
Definition: bwPushButton.h:9
auto canAlign() const -> bool override
Definition: bwPushButton.cc:28
auto getTypeIdentifier() const -> std::string_view override
Definition: bwPushButton.cc:12
auto setIcon(const class bwIconInterface &) -> bwPushButton &
Definition: bwPushButton.cc:22
auto getIcon() const -> const bwIconInterface *override
Definition: bwPushButton.cc:17
bwPushButton(const std::string &text, std::optional< unsigned int > width_hint=std::nullopt, std::optional< unsigned int > height_hint=std::nullopt)
Definition: bwPushButton.cc:5
unsigned int height_hint
Definition: bwWidget.h:68
unsigned int width_hint
Definition: bwWidget.h:68
Definition: bwContext.h:3