sptk2 logo
SPTK Home Page
CProgressBar.h
1/*
2╔══════════════════════════════════════════════════════════════════════════════╗
3║ SIMPLY POWERFUL TOOLKIT (SPTK) ║
4╟──────────────────────────────────────────────────────────────────────────────╢
5║ copyright © 1999-2022 Alexey Parshin. All rights reserved. ║
6║ email alexeyp@gmail.com ║
7╚══════════════════════════════════════════════════════════════════════════════╝
8┌──────────────────────────────────────────────────────────────────────────────┐
9│ This library is free software; you can redistribute it and/or modify it │
10│ under the terms of the GNU Library General Public License as published by │
11│ the Free Software Foundation; either version 2 of the License, or (at your │
12│ option) any later version. │
13│ │
14│ This library is distributed in the hope that it will be useful, but │
15│ WITHOUT ANY WARRANTY; without even the implied warranty of │
16│ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library │
17│ General Public License for more details. │
18│ │
19│ You should have received a copy of the GNU Library General Public License │
20│ along with this library; if not, write to the Free Software Foundation, │
21│ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. │
22│ │
23│ Please report all bugs and problems to alexeyp@gmail.com. │
24└──────────────────────────────────────────────────────────────────────────────┘
25*/
26
27#pragma once
28
29#include <sptk5/gui/CDataControl.h>
30
31namespace sptk {
32
44class SP_EXPORT CProgressBar
45 : public CInput
46{
51 void ctor_init(const char* label);
52
53public:
60 CProgressBar(const char* lbl, int layoutSize = 20, CLayoutAlign layoutAlign = CLayoutAlign::TOP);
61
62#ifdef __COMPATIBILITY_MODE__
71 CProgressBar(int x, int y, int w, int h, const char* label = 0);
72#endif
73
80 bool preferredSize(int& w, int& h) override;
81
86 void minimum(float min);
87
91 float minimum() const;
92
97 void maximum(float max);
98
102 float maximum() const;
103
107 void units(const char* un);
108
112 std::string units() const;
113
118 void showText(bool flag = true);
119
124 Variant data() const override;
125
129 void data(const Variant& v) override;
130
135 static CLayoutClient* creator(const xdoc::SNode& node);
136};
140}
Definition: CInput.h:197
Definition: CLayoutClient.h:82
Definition: CProgressBar.h:46
bool preferredSize(int &w, int &h) override
CProgressBar(const char *lbl, int layoutSize=20, CLayoutAlign layoutAlign=CLayoutAlign::TOP)
static CLayoutClient * creator(const xdoc::SNode &node)
float minimum() const
void maximum(float max)
void data(const Variant &v) override
void minimum(float min)
void units(const char *un)
void showText(bool flag=true)
Variant data() const override
float maximum() const
std::string units() const
Definition: Variant.h:372
CLayoutAlign
Definition: CLayoutClient.h:44
@ TOP
Align to the right.

Fri Oct 14 2022 09:58:31: SPTK 5.4.1