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" 59 using FProgressbar = FProgressBar;
69 using FWidget::setGeometry;
78 auto getClassName()
const ->
FString override;
79 auto getPercentage()
const noexcept -> std::size_t;
82 void setPercentage (std::size_t);
83 void setSize (
const FSize&,
bool =
true)
override;
84 void setGeometry (
const FPoint&,
const FSize&,
bool =
true)
override;
85 void setShadow (
bool =
true) ;
89 auto hasShadow()
const -> bool;
97 static constexpr
auto NOT_SET =
static_cast<std::size_t
>(-1);
101 void draw()
override;
102 void drawProgressLabel();
103 void drawProgressBar();
104 auto drawProgressIndicator() -> std::size_t;
105 void drawProgressBackground (std::size_t);
108 std::size_t percentage{NOT_SET};
109 std::size_t bar_length{getWidth()};
115 inline auto FProgressBar::getClassName()
const ->
FString 116 {
return "FProgressBar"; }
119 inline auto FProgressBar::getPercentage()
const noexcept -> std::size_t
120 {
return percentage; }
123 inline void FProgressBar::unsetShadow()
124 { setShadow(
false); }
127 inline auto FProgressBar::hasShadow()
const ->
bool 128 {
return getFlags().shadow.shadow; }
132 #endif // FPROGRESSBAR_H Definition: fprogressbar.h:65
Definition: class_template.cpp:25