Skip to content

Commit 701b113

Browse files
committed
Release 1.0.6
* Added stretch and loop markers to the AudioChannel and AudioSample widgets. * Added tk::Tab and tk::TabControl widgets. * Additional functions to work with coordinates provided in the tk::Graph: xy_to_axis, axis_to_xy. * Improved widget tk::Grid space allocation algorithm that eliminates rows/columns which contain widgets that share space across other rows/columns. * Added support of cusom file preview embedding into tk::FileDialog widget. * Fixed problems with scrolling of the tk::ListBox. * Fixed operations on undefined values in tk::CheckBox and tk::RadioButton. * Updated build scripts.
2 parents 5db033f + 58dd648 commit 701b113

File tree

46 files changed

+6479
-2358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6479
-2358
lines changed

.cproject

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
</option>
4747
<option id="gnu.cpp.compiler.option.dialect.std.1989774018" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++11" valueType="enumerated"/>
4848
<option id="gnu.cpp.compiler.option.other.other.1804512181" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -msse -msse2 -msse3 -mssse3 -mavx -mavx2 $(shell pkg-config --cflags cairo freetype2 xrandr)" valueType="string"/>
49+
<option id="gnu.cpp.compiler.option.warnings.toerrors.1025644201" superClass="gnu.cpp.compiler.option.warnings.toerrors" useByScannerDiscovery="false" value="true" valueType="boolean"/>
4950
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1903750940" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
5051
</tool>
5152
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.940991091" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
@@ -398,4 +399,4 @@
398399
</configuration>
399400
</storageModule>
400401
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
401-
</cproject>
402+
</cproject>

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
2525
- name: Install dependencies
2626
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828
- name: Configure project
2929
run: make config TEST=1
3030
- name: Fetch project dependencies
@@ -50,7 +50,7 @@ jobs:
5050
printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist
5151
- name: Install dependencies
5252
run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind libglvnd libsndfile libx11 libxrandr freetype2 cairo
53-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
5454
- name: Configure project
5555
run: make config TEST=1 DEBUG=1
5656
- name: Fetch project dependencies
@@ -72,7 +72,7 @@ jobs:
7272
steps:
7373
- name: Install dependencies
7474
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
75-
- uses: actions/checkout@v2
75+
- uses: actions/checkout@v3
7676
- name: Configure project
7777
run: make config TEST=1
7878
- name: Fetch project dependencies
@@ -96,7 +96,7 @@ jobs:
9696
run: apt-get update
9797
- name: Install dependencies
9898
run: apt-get -y install git make pkg-config valgrind gcc g++ libgl-dev libsndfile1-dev libx11-dev libxrandr-dev libfreetype6-dev libcairo2-dev
99-
- uses: actions/checkout@v2
99+
- uses: actions/checkout@v3
100100
- name: Configure project
101101
run: make config TEST=1
102102
- name: Fetch project dependencies

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.6 ===
6+
* Added stretch and loop markers to the AudioChannel and AudioSample widgets.
7+
* Added tk::Tab and tk::TabControl widgets.
8+
* Additional functions to work with coordinates provided in the tk::Graph: xy_to_axis, axis_to_xy.
9+
* Improved widget tk::Grid space allocation algorithm that eliminates rows/columns which contain
10+
widgets that share space across other rows/columns.
11+
* Added support of cusom file preview embedding into tk::FileDialog widget.
12+
* Fixed problems with scrolling of the tk::ListBox.
13+
* Fixed operations on undefined values in tk::CheckBox and tk::RadioButton.
14+
* Updated build scripts.
15+
516
=== 1.0.5 ===
617
* Updated build scripts.
718

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The full list of provided widgets:
4444
* Group - container for surrounding widgets into a distinguishable group.
4545
* MultiLabel - widget that allows to implement overlay of multiple labels on the same area.
4646
* ScrollArea - container that allows to package widget into limited rectangular space.
47+
* TabControl - container that allows to organize widgets as a set of tabs.
4748
* Window - window widget.
4849
* Dialogs:
4950
* FileDialog - widget for selecting files for load/save operations.

include/lsp-plug.in/tk/prop/base/Property.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#error "use <lsp-plug.in/tk/tk.h>"
2727
#endif
2828

29+
#include <lsp-plug.in/common/variadic.h>
30+
2931
namespace lsp
3032
{
3133
namespace tk
@@ -98,6 +100,8 @@ namespace lsp
98100
static float normalized(float value, float min, float max);
99101
static bool matches(float value, float min, float max);
100102

103+
constexpr inline bool one_of() const { return false; }
104+
101105
public:
102106
/**
103107
* Override property for the style
@@ -117,6 +121,19 @@ namespace lsp
117121
* @return true if property matches
118122
*/
119123
inline bool is(const Property &prop) const { return &prop == this; }
124+
125+
/**
126+
* Check that property matches one of the
127+
* @param prop reference to property to check
128+
* @return true if property matches one of the passed properties in the list
129+
*/
130+
template <class... T>
131+
inline bool one_of(const Property &prop, T && ... args) const
132+
{
133+
if (is(prop))
134+
return true;
135+
return one_of(lsp::forward<T>(args)...);
136+
}
120137
};
121138

122139
}

include/lsp-plug.in/tk/prop/multi/Position.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ namespace lsp
8686
static bool inside(const ws::rectangle_t *rect, ssize_t left, ssize_t top);
8787
inline bool inside(const ws::rectangle_t *rect) { return inside(rect, nLeft, nTop); }
8888

89+
static bool rminside(const ws::rectangle_t *rect, ssize_t left, ssize_t top, size_t mask, ssize_t radius);
90+
inline bool rminside(const ws::rectangle_t *rect, size_t mask, ssize_t radius) { return rminside(rect, nLeft, nTop, mask, radius); }
91+
8992
static bool rinside(const ws::rectangle_t *rect, ssize_t left, ssize_t top, ssize_t radius);
90-
inline bool rinside(const ws::rectangle_t *rect, ssize_t radius) { return rinside(rect, nLeft, nTop, radius); }
93+
inline bool rinside(const ws::rectangle_t *rect, ssize_t radius) { return rminside(rect, nLeft, nTop, SURFMASK_ALL_CORNER, radius); }
9194
};
9295

9396
namespace prop

include/lsp-plug.in/tk/prop/simple/String.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ namespace lsp
182182
* @return status of operation
183183
*/
184184
status_t set(const LSPString *key, const expr::Parameters *params);
185-
inline status_t set(const LSPString *key) { return set(key, (expr::Parameters *)NULL); };
185+
inline status_t set(const LSPString *key) { return set(key, static_cast<expr::Parameters *>(NULL)); };
186186

187187
/**
188188
* Set localized value
@@ -191,7 +191,7 @@ namespace lsp
191191
* @return status of operation
192192
*/
193193
status_t set(const char *key, const expr::Parameters *params);
194-
inline status_t set(const char *key) { return set(key, (expr::Parameters *)NULL); };
194+
inline status_t set(const char *key) { return set(key, static_cast<expr::Parameters *>(NULL)); };
195195

196196
/**
197197
* Make a copy of data from the source local string to this local string

include/lsp-plug.in/tk/style/StyleSheet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace lsp
9797

9898
status_t parse_metadata(xml::PullParser *p);
9999
status_t parse_style(xml::PullParser *p, bool root);
100-
status_t parse_color(xml::PullParser *p, lsp::Color *color);
100+
status_t parse_color(xml::PullParser *p, const LSPString *color_name, lsp::Color *color);
101101
status_t parse_constant(xml::PullParser *p, LSPString *value);
102102
status_t parse_font(xml::PullParser *p, font_t *font);
103103
status_t parse_property(xml::PullParser *p, style_t *style, const LSPString *name);

include/lsp-plug.in/tk/tk.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
#include <lsp-plug.in/tk/widgets/cast.h>
143143

144144
// Simple widgets
145+
#include <lsp-plug.in/tk/widgets/simple/Bevel.h>
145146
#include <lsp-plug.in/tk/widgets/simple/Button.h>
146147
#include <lsp-plug.in/tk/widgets/simple/CheckBox.h>
147148
#include <lsp-plug.in/tk/widgets/simple/Edit.h>
@@ -159,7 +160,6 @@
159160
#include <lsp-plug.in/tk/widgets/simple/Separator.h>
160161
#include <lsp-plug.in/tk/widgets/simple/Switch.h>
161162
#include <lsp-plug.in/tk/widgets/simple/Void.h>
162-
#include <lsp-plug.in/tk/widgets/simple/Bevel.h>
163163

164164
// Container widgets
165165
#include <lsp-plug.in/tk/widgets/containers/Window.h>
@@ -170,6 +170,8 @@
170170
#include <lsp-plug.in/tk/widgets/containers/Group.h>
171171
#include <lsp-plug.in/tk/widgets/containers/ScrollArea.h>
172172
#include <lsp-plug.in/tk/widgets/containers/MultiLabel.h>
173+
#include <lsp-plug.in/tk/widgets/containers/Tab.h>
174+
#include <lsp-plug.in/tk/widgets/containers/TabControl.h>
173175

174176
// Compound widgets
175177
#include <lsp-plug.in/tk/widgets/compound/Menu.h>

include/lsp-plug.in/tk/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define LSP_TK_LIB_MAJOR 1
2626
#define LSP_TK_LIB_MINOR 0
27-
#define LSP_TK_LIB_MICRO 5
27+
#define LSP_TK_LIB_MICRO 6
2828

2929
#if defined(LSP_TK_LIB_PUBLISHER)
3030
#define LSP_TK_LIB_PUBLIC LSP_EXPORT_MODIFIER

0 commit comments

Comments
 (0)