diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/salnativewidgets.hxx | 1 | ||||
-rw-r--r-- | include/vcl/status.hxx | 2 | ||||
-rw-r--r-- | include/vcl/toolkit/prgsbar.hxx | 10 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 9 |
4 files changed, 20 insertions, 2 deletions
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx index 907c3b618f88..aa856a16c35d 100644 --- a/include/vcl/salnativewidgets.hxx +++ b/include/vcl/salnativewidgets.hxx @@ -92,6 +92,7 @@ enum class ControlType { // application but not for the splash // screen (used in desktop/) IntroProgress = 132, + LevelBar = 133, // tool tips Tooltip = 140, // to draw the implemented theme diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx index 4e59481671fd..0c287ddbc1b1 100644 --- a/include/vcl/status.hxx +++ b/include/vcl/status.hxx @@ -36,7 +36,7 @@ struct ImplStatusItem; void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos, tools::Long nOffset, tools::Long nPrgsWidth, tools::Long nPrgsHeight, sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount, - const tools::Rectangle& rFramePosSize); + const tools::Rectangle& rFramePosSize, ControlType eControlType); enum class StatusBarItemBits { diff --git a/include/vcl/toolkit/prgsbar.hxx b/include/vcl/toolkit/prgsbar.hxx index dd9423178dda..1fcba74fdaba 100644 --- a/include/vcl/toolkit/prgsbar.hxx +++ b/include/vcl/toolkit/prgsbar.hxx @@ -52,6 +52,13 @@ class UNLESS_MERGELIBS(VCL_DLLPUBLIC) ProgressBar final : public vcl::Window { +public: + enum class BarStyle + { + Progress, + Level, + }; + private: Point maPos; tools::Long mnPrgsWidth; @@ -59,6 +66,7 @@ private: sal_uInt16 mnPercent; sal_uInt16 mnPercentCount; bool mbCalcNew; + BarStyle meBarStyle; using Window::ImplInit; SAL_DLLPRIVATE void ImplInit(); @@ -66,7 +74,7 @@ private: SAL_DLLPRIVATE void ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16 nNewPerc); public: - ProgressBar( vcl::Window* pParent, WinBits nWinBits ); + ProgressBar( vcl::Window* pParent, WinBits nWinBits, BarStyle eBarStyle ); virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index e37bd36f65f4..2d8c4db085d6 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1714,6 +1714,14 @@ public: virtual void set_text(const OUString& rText) = 0; }; +class VCL_DLLPUBLIC LevelBar : virtual public Widget +{ +public: + /// Sets LevelBar fill percentage. + /// @param fPercentage bar's fill percentage, [0.0, 100.0] + virtual void set_percentage(double fPercentage) = 0; +}; + class VCL_DLLPUBLIC Entry : virtual public Widget { private: @@ -2622,6 +2630,7 @@ public: virtual std::unique_ptr<Entry> weld_entry(const OUString& id) = 0; virtual std::unique_ptr<Scale> weld_scale(const OUString& id) = 0; virtual std::unique_ptr<ProgressBar> weld_progress_bar(const OUString& id) = 0; + virtual std::unique_ptr<LevelBar> weld_level_bar(const OUString& id) = 0; virtual std::unique_ptr<Spinner> weld_spinner(const OUString& id) = 0; virtual std::unique_ptr<Image> weld_image(const OUString& id) = 0; virtual std::unique_ptr<Calendar> weld_calendar(const OUString& id) = 0; |