43 #ifndef FPROGRESSBAR_H 44 #define FPROGRESSBAR_H 46 #if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT) 47 #error "Only <final/final.h> can be included directly." 50 #include "final/fwidget.h" 63 using FWidget::setGeometry;
72 auto getClassName()
const ->
FString override;
73 auto getPercentage()
const noexcept -> std::size_t;
76 void setPercentage (std::size_t);
77 void setSize (
const FSize&,
bool =
true)
override;
78 void setGeometry (
const FPoint&,
const FSize&,
bool =
true)
override;
79 void setShadow (
bool =
true) ;
83 auto hasShadow()
const -> bool;
91 static constexpr
auto NOT_SET =
static_cast<std::size_t
>(-1);
96 void drawProgressLabel();
97 void drawProgressBar();
98 auto drawProgressIndicator() -> std::size_t;
99 void drawProgressBackground (std::size_t);
102 std::size_t percentage{NOT_SET};
103 std::size_t bar_length{getWidth()};
109 inline auto FProgressbar::getClassName()
const ->
FString 110 {
return "FProgressbar"; }
113 inline auto FProgressbar::getPercentage()
const noexcept -> std::size_t
114 {
return percentage; }
117 inline void FProgressbar::unsetShadow()
118 { setShadow(
false); }
121 inline auto FProgressbar::hasShadow()
const ->
bool 122 {
return getFlags().shadow.shadow; }
126 #endif // FPROGRESSBAR_H Definition: fprogressbar.h:59
Definition: class_template.cpp:25