Skip to content

Commit 09f9a46

Browse files
committed
Release 1.0.24
* Improved ListBox behaviour relative to the item size. * Bugfixes in tk::ListBox related to item creation, deletion and selection. * Added text estimation suppot for tk::Button widget. * Added aggregate size computation (enabled by default) for tk::TabControl widget. * Fixed bug in bookmak editor (set first/last actions) of the tk::FileDialog widget. * Updated build scripts. * Updated module versions in dependencies.
2 parents 92fa328 + 72e2afd commit 09f9a46

File tree

19 files changed

+445
-222
lines changed

19 files changed

+445
-222
lines changed

CHANGELOG

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

5+
=== 1.0.24 ===
6+
* Improved ListBox behaviour relative to the item size.
7+
* Bugfixes in tk::ListBox related to item creation, deletion and selection.
8+
* Added text estimation suppot for tk::Button widget.
9+
* Added aggregate size computation (enabled by default) for tk::TabControl widget.
10+
* Fixed bug in bookmak editor (set first/last actions) of the tk::FileDialog widget.
11+
* Updated build scripts.
12+
* Updated module versions in dependencies.
13+
514
=== 1.0.23 ===
615
* Added header support by tk::LedMeterChannel.
716
* Added header support by tk::LedMeter.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/make -f
22
#
3-
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
4-
# (C) 2020 Vladimir Sadovnikov <[email protected]>
3+
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
4+
# (C) 2024 Vladimir Sadovnikov <[email protected]>
55
#
66
# This file is part of lsp-tk-lib
77
#

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 23
27+
#define LSP_TK_LIB_MICRO 24
2828

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

include/lsp-plug.in/tk/widgets/compound/ListBox.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ namespace lsp
7373
lltl::darray<item_t> vItems; // Items
7474
ssize_t wMinW; // Minimum width
7575
ssize_t wMinH; // Minimum height
76+
ssize_t wItemH; // Maximum item height
7677
bool bHBar; // Horizontal scroll enabled
7778
bool bVBar; // Vertical scroll enabled
7879
ws::size_limit_t sSize; // Actual size
@@ -117,6 +118,7 @@ namespace lsp
117118
protected:
118119
size_t nBMask;
119120
size_t nXFlags;
121+
ssize_t nPendingIndex; // Pending index
120122
ssize_t nCurrIndex;
121123
ssize_t nLastIndex;
122124
size_t nKeyScroll; // Key scroll direction
@@ -238,6 +240,7 @@ namespace lsp
238240
virtual status_t on_submit();
239241

240242
virtual void scroll_to_current();
243+
virtual void scroll_to(size_t index);
241244
};
242245
} /* namespace tk */
243246
} /* namespace lsp */

include/lsp-plug.in/tk/widgets/containers/TabControl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace lsp
5050
prop::Boolean sTabJoint;
5151
prop::Boolean sHeadingFill;
5252
prop::Boolean sHeadingSpacingFill;
53+
prop::Boolean sAggregateSize;
5354
prop::Pointer sTabPointer; // Tab pointer
5455
LSP_TK_STYLE_DEF_END
5556
} /* namespae style */
@@ -108,6 +109,7 @@ namespace lsp
108109
prop::Boolean sTabJoint;
109110
prop::Boolean sHeadingFill;
110111
prop::Boolean sHeadingSpacingFill;
112+
prop::Boolean sAggregateSize;
111113
prop::Pointer sTabPointer; // Tab pointer
112114

113115
prop::WidgetList<Tab> vWidgets;

include/lsp-plug.in/tk/widgets/simple/Button.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ namespace lsp
9797
S_HOVER = (1 << 10)
9898
};
9999

100+
typedef struct estimation_t
101+
{
102+
LSPString text;
103+
float scaling;
104+
float fscaling;
105+
ssize_t min_width;
106+
ssize_t min_height;
107+
ws::font_parameters_t fp;
108+
ws::text_parameters_t tp;
109+
} estimation_t;
110+
100111
protected:
101112
size_t nState;
102113
size_t nBMask;
@@ -140,8 +151,11 @@ namespace lsp
140151
prop::Position sTextDownShift;
141152
prop::Position sTextPressedShift;
142153

154+
lltl::parray<prop::String> vEstimations; // Estimation string
155+
143156
protected:
144157
void update_mode(button_mode_t mode);
158+
void estimate_string_size(estimation_t *e, tk::String *s);
145159

146160
static status_t slot_on_change(Widget *sender, void *ptr, void *data);
147161
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
@@ -169,6 +183,10 @@ namespace lsp
169183

170184
virtual status_t init() override;
171185

186+
public:
187+
void clear_text_estimations();
188+
tk::String *add_text_estimation();
189+
172190
public:
173191
LSP_TK_PROPERTY(Color, color, &sColor)
174192
LSP_TK_PROPERTY(Color, text_color, &sTextColor)

make/configure.mk

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
# (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
# (C) 2024 Vladimir Sadovnikov <[email protected]>
44
#
55
# This file is part of lsp-tk-lib
66
#
@@ -49,7 +49,7 @@ MERGED_DEPENDENCIES := \
4949
$(TEST_DEPENDENCIES)
5050
UNIQ_MERGED_DEPENDENCIES := $(call uniq, $(MERGED_DEPENDENCIES))
5151
DEPENDENCIES = $(UNIQ_MERGED_DEPENDENCIES)
52-
FEATURES := $(call uniq, $(call subtraction,$(SUB_FEATURES),$(DEFAULT_FEATURES) $(ADD_FEATURES)))
52+
FEATURES := $(sort $(call subtraction,$(SUB_FEATURES),$(DEFAULT_FEATURES) $(ADD_FEATURES)))
5353

5454
# Determine versions
5555
ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel)
@@ -123,6 +123,10 @@ define _modconfig =
123123
$(if $($(name)_OBJ_TEST),, $(eval $(name)_OBJ_TEST := "$($(name)_BIN)/$($(name)_NAME)-test.o"))
124124
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := $(if $(publisher),,"-D$(name)_BUILTIN -fvisibility=hidden")))
125125

126+
$(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME)))
127+
$(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC)))
128+
$(if $(HOST_$(name)_URL),, $(eval HOST_$(name)_URL := $($(name)_URL$(X_URL_SUFFIX))))
129+
126130
$(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME)))
127131
$(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include))
128132
$(if $(HOST_$(name)_SRC),, $(eval HOST_$(name)_SRC := $(HOST_$(name)_PATH)/src))
@@ -160,6 +164,10 @@ define hdrconfig =
160164
$(if $($(name)_TESTING),, $(eval $(name)_TESTING := 0))
161165
$(if $($(name)_CFLAGS),, $(eval $(name)_CFLAGS := "$(if $($(name)_INC_OPT),$($(name)_INC_OPT) ,-I )\"$($(name)_INC)\""$(if $(publisher), "-D$(name)_PUBLISHER")))
162166
$(if $($(name)_MFLAGS),, $(eval $(name)_MFLAGS := "-D$(name)_BUILTIN -fvisibility=hidden"))
167+
168+
$(if $(HOST_$(name)_NAME),, $(eval HOST_$(name)_NAME := $($(name)_NAME)))
169+
$(if $(HOST_$(name)_DESC),, $(eval HOST_$(name)_DESC := $($(name)_DESC)))
170+
$(if $(HOST_$(name)_URL),, $(eval HOST_$(name)_URL := $($(name)_URL$(X_URL_SUFFIX))))
163171

164172
$(if $(HOST_$(name)_PATH),, $(eval HOST_$(name)_PATH := $(MODULES)/$($(name)_NAME)))
165173
$(if $(HOST_$(name)_INC),, $(eval HOST_$(name)_INC := $(HOST_$(name)_PATH)/include))
@@ -233,6 +241,8 @@ CONFIG_VARS = \
233241
$(name)_OBJ \
234242
$(name)_OBJ_TEST \
235243
\
244+
HOST_$(name)_NAME \
245+
HOST_$(name)_DESC \
236246
HOST_$(name)_PATH \
237247
HOST_$(name)_INC \
238248
HOST_$(name)_SRC \
@@ -258,8 +268,9 @@ $(CONFIG_VARS): prepare
258268
echo "$(@)=$($(@))" >> "$(CONFIG)"
259269

260270
config: $(CONFIG_VARS)
261-
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))"
262-
echo "Features: $(FEATURES)"
271+
echo "Host architecture: $(HOST_ARCHITECTURE_FAMILY)/$(HOST_ARCHITECTURE) ($(HOST_ARCHITECTURE_CFLAGS))"
272+
echo "Architecture: $(ARCHITECTURE_FAMILY)/$(ARCHITECTURE) ($(ARCHITECTURE_CFLAGS))"
273+
echo "Features: $(FEATURES)"
263274
echo "Configured OK"
264275

265276
help: | pathvars toolvars sysvars

make/functions.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
# (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
# (C) 2024 Vladimir Sadovnikov <[email protected]>
44
#
55
# This file is part of lsp-tk-lib
66
#

make/modules.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
# (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
# (C) 2024 Vladimir Sadovnikov <[email protected]>
44
#
55
# This file is part of lsp-tk-lib
66
#
@@ -45,9 +45,15 @@ UNIQ_ALL_DEPENDENCIES := $(filter-out $(ARTIFACT_ID),$(call uniq, $(ALL_DEP
4545
MODULES ?= $(BASEDIR)/modules
4646
GIT ?= git
4747

48+
ifeq ($(DEVEL),1)
49+
X_URL_SUFFIX = _RW
50+
else
51+
X_URL_SUFFIX = _RO
52+
endif
53+
4854
ifeq ($(TREE),1)
4955
$(foreach dep,$(UNIQ_ALL_DEPENDENCIES), \
50-
$(eval $(dep)_URL=$($(dep)_URL_RO)) \
56+
$(eval $(dep)_URL=$($(dep)_URL$(X_URL_SUFFIX))) \
5157
)
5258

5359
ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel)

make/paths.mk

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
# (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
# Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
# (C) 2024 Vladimir Sadovnikov <[email protected]>
44
#
55
# This file is part of lsp-tk-lib
66
#
@@ -22,6 +22,8 @@
2222
ifndef PREFIX
2323
ifeq ($(PLATFORM),Windows)
2424
PREFIX := $(BASEDIR)/INSTALL
25+
else ifeq ($(CROSS_COMPILE),1)
26+
PREFIX := $(BASEDIR)/INSTALL
2527
else
2628
PREFIX := /usr/local
2729
endif
@@ -38,11 +40,14 @@ endif
3840

3941
LIBDIR := $(PREFIX)/lib
4042
BINDIR := $(PREFIX)/bin
41-
SHAREDDIR := $(PREFIX)/share
4243
INCDIR := $(PREFIX)/include
4344
BUILDDIR := $(BASEDIR)/.build
4445
TARGET_BUILDDIR := $(BUILDDIR)/target
45-
HOST_BUILDDIR := $(BUILDDIR)/host
46+
ifeq ($(CROSS_COMPILE),1)
47+
HOST_BUILDDIR := $(BUILDDIR)/host
48+
else
49+
HOST_BUILDDIR := $(TARGET_BUILDDIR)
50+
endif
4651
MODULES := $(BASEDIR)/modules
4752
CONFIG := $(BASEDIR)/.config.mk
4853

@@ -61,6 +66,15 @@ ifndef INCDIR
6166
INCDIR := $(PREFIX)/include
6267
endif
6368

69+
# Shared resources
70+
ifndef SHAREDDIR
71+
ifeq ($(PLATFORM),Haiku)
72+
SHAREDDIR := $(PREFIX)/data
73+
else
74+
SHAREDDIR := $(PREFIX)/share
75+
endif
76+
endif
77+
6478
# Temporary directory
6579
ifndef TEMPDIR
6680
ifeq ($(PLATFORM),Windows)

0 commit comments

Comments
 (0)