Skip to content

Commit 3a2e04e

Browse files
committed
Release 1.0.23
* Added obtaining information about the original file provided by the MapPath::absolute_path LV2 extension. * Added custom option support by ComboBox. * Fixed behaviour of ctl::Fraction when writing values. * Added text estimation support by the Parameter controller. * Added ListBox controller. * Added empty text support for Edit controller. * Updated module versions in dependencies.
2 parents f4a725c + 7080782 commit 3a2e04e

Some content is hidden

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

52 files changed

+1688
-234
lines changed

CHANGELOG

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

5+
=== 1.0.23 ===
6+
* Added obtaining information about the original file provided by the
7+
MapPath::absolute_path LV2 extension.
8+
* Added custom option support by ComboBox.
9+
* Fixed behaviour of ctl::Fraction when writing values.
10+
* Added text estimation support by the Parameter controller.
11+
* Added ListBox controller.
12+
* Added empty text support for Edit controller.
13+
* Updated module versions in dependencies.
14+
515
=== 1.0.22 ===
616
* Added experimental support of VST3 plugin format.
717
* Added helper functions to ui::Module.

dependencies.mk

Lines changed: 18 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-plugin-fw
66
#
@@ -114,6 +114,7 @@ LINUX_TEST_DEPENDENCIES_UI = \
114114
LINUX_DEPENDENCIES_CLAP = \
115115
LIBPTHREAD \
116116
LIBDL \
117+
LIBRT \
117118
LIBSNDFILE \
118119
LIBX11 \
119120
LIBXRANDR \
@@ -124,12 +125,14 @@ LINUX_DEPENDENCIES_CLAP = \
124125
LINUX_DEPENDENCIES_JACK = \
125126
LIBPTHREAD \
126127
LIBDL \
128+
LIBRT \
127129
LIBJACK \
128130
LIBSNDFILE
129131

130132
LINUX_DEPENDENCIES_JACK_UI = \
131133
LIBPTHREAD \
132134
LIBDL \
135+
LIBRT \
133136
LIBJACK \
134137
LIBSNDFILE \
135138
LIBX11 \
@@ -144,18 +147,21 @@ LINUX_DEPENDENCIES_JACK_WRAP = \
144147
LINUX_DEPENDENCIES_LADSPA = \
145148
LIBPTHREAD \
146149
LIBDL \
150+
LIBRT \
147151
LIBSNDFILE
148152

149153
# LV2 dependencies
150154
LINUX_DEPENDENCIES_LV2 = \
151155
LIBPTHREAD \
152156
LIBDL \
157+
LIBRT \
153158
LIBSNDFILE \
154159
LIBCAIRO
155160

156161
LINUX_DEPENDENCIES_LV2_UI = \
157162
LIBPTHREAD \
158163
LIBDL \
164+
LIBRT \
159165
LIBSNDFILE \
160166
LIBX11 \
161167
LIBXRANDR \
@@ -166,6 +172,7 @@ LINUX_DEPENDENCIES_LV2_UI = \
166172
LINUX_DEPENDENCIES_VST2 = \
167173
LIBPTHREAD \
168174
LIBDL \
175+
LIBRT \
169176
LIBSNDFILE \
170177
LIBX11 \
171178
LIBXRANDR \
@@ -179,6 +186,7 @@ LINUX_DEPENDENCIES_VST2_WRAP = \
179186
LINUX_DEPENDENCIES_VST3 = \
180187
LIBPTHREAD \
181188
LIBDL \
189+
LIBRT \
182190
LIBSNDFILE \
183191
LIBX11 \
184192
LIBXRANDR \
@@ -231,6 +239,7 @@ BSD_TEST_DEPENDENCIES_UI = \
231239
BSD_DEPENDENCIES_CLAP = \
232240
LIBPTHREAD \
233241
LIBDL \
242+
LIBRT \
234243
LIBSNDFILE \
235244
LIBX11 \
236245
LIBXRANDR \
@@ -241,12 +250,14 @@ BSD_DEPENDENCIES_CLAP = \
241250
BSD_DEPENDENCIES_JACK = \
242251
LIBPTHREAD \
243252
LIBDL \
253+
LIBRT \
244254
LIBJACK \
245255
LIBSNDFILE
246256

247257
BSD_DEPENDENCIES_JACK_UI = \
248258
LIBPTHREAD \
249259
LIBDL \
260+
LIBRT \
250261
LIBJACK \
251262
LIBSNDFILE \
252263
LIBX11 \
@@ -261,18 +272,21 @@ BSD_DEPENDENCIES_JACK_WRAP = \
261272
BSD_DEPENDENCIES_LADSPA = \
262273
LIBPTHREAD \
263274
LIBDL \
275+
LIBRT \
264276
LIBSNDFILE
265277

266278
# LV2 dependencies
267279
BSD_DEPENDENCIES_LV2 = \
268280
LIBPTHREAD \
269281
LIBDL \
282+
LIBRT \
270283
LIBSNDFILE \
271284
LIBCAIRO
272285

273286
BSD_DEPENDENCIES_LV2_UI = \
274287
LIBPTHREAD \
275288
LIBDL \
289+
LIBRT \
276290
LIBSNDFILE \
277291
LIBX11 \
278292
LIBXRANDR \
@@ -283,6 +297,7 @@ BSD_DEPENDENCIES_LV2_UI = \
283297
BSD_DEPENDENCIES_VST2 = \
284298
LIBPTHREAD \
285299
LIBDL \
300+
LIBRT \
286301
LIBSNDFILE \
287302
LIBX11 \
288303
LIBXRANDR \
@@ -296,6 +311,7 @@ BSD_DEPENDENCIES_VST2_WRAP = \
296311
BSD_DEPENDENCIES_VST3 = \
297312
LIBPTHREAD \
298313
LIBDL \
314+
LIBRT \
299315
LIBSNDFILE \
300316
LIBX11 \
301317
LIBXRANDR \

include/lsp-plug.in/plug-fw/ctl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <lsp-plug.in/plug-fw/ctl/util/Direction.h>
4444
#include <lsp-plug.in/plug-fw/ctl/util/Layout.h>
4545
#include <lsp-plug.in/plug-fw/ctl/util/TextLayout.h>
46+
#include <lsp-plug.in/plug-fw/ctl/util/IChildSync.h>
4647

4748
// Widget controllers
4849
#include <lsp-plug.in/plug-fw/ctl/Widget.h>
@@ -73,6 +74,8 @@
7374
#include <lsp-plug.in/plug-fw/ctl/containers/Cell.h>
7475
#include <lsp-plug.in/plug-fw/ctl/containers/MultiLabel.h>
7576
#include <lsp-plug.in/plug-fw/ctl/containers/TabControl.h>
77+
#include <lsp-plug.in/plug-fw/ctl/containers/ListBox.h>
78+
#include <lsp-plug.in/plug-fw/ctl/containers/ListBoxItem.h>
7679

7780
#include <lsp-plug.in/plug-fw/ctl/compound/ComboBox.h>
7881
#include <lsp-plug.in/plug-fw/ctl/compound/ComboGroup.h>

include/lsp-plug.in/plug-fw/ctl/PluginWindow.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ namespace lsp
138138
tk::MenuItem *wInvertGraphDotVScroll; // Invert mouse vertical scroll for GraphDot widgets
139139
tk::MenuItem *wZoomableSpectrum; // Automatic scaling mode of the frequency graph
140140
tk::Menu *wFilterPointThickness; // Filter point thickness submenu
141+
tk::Timer wGreetingTimer; // Greeting window timer
141142

142143
ui::IPort *pPVersion;
143144
ui::IPort *pPBypass;
@@ -233,6 +234,8 @@ namespace lsp
233234

234235
static status_t slot_submit_enum_menu_item(tk::Widget *sender, void *ptr, void *data);
235236

237+
static status_t timer_show_greeting(ws::timestamp_t sched, ws::timestamp_t time, void *arg);
238+
236239
protected:
237240
static i18n::IDictionary *get_default_dict(tk::Widget *src);
238241
static tk::FileFilters *create_config_filters(tk::FileDialog *dlg);
@@ -241,8 +244,10 @@ namespace lsp
241244

242245
protected:
243246
void do_destroy();
247+
status_t set_greeting_timer();
244248
status_t show_greeting_window();
245249
status_t show_user_paths_window();
250+
status_t fmt_package_version(LSPString &pkgver);
246251
status_t locate_window();
247252
status_t show_menu(tk::Widget *menu, tk::Widget *actor, void *data);
248253
tk::Label *create_label(tk::WidgetContainer *dst, const char *key, const char *style_name);

include/lsp-plug.in/plug-fw/ctl/Window.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ namespace lsp
6565

6666
virtual void reloaded(const tk::StyleSheet *sheet);
6767
};
68-
}
69-
}
68+
} /* namespace ctl */
69+
} /* namespace lsp */
7070

7171

7272

include/lsp-plug.in/plug-fw/ctl/compound/ComboBox.h

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2021 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-plugin-fw
66
* Created on: 27 июн. 2021 г.
@@ -33,45 +33,61 @@ namespace lsp
3333
{
3434
namespace ctl
3535
{
36+
class ListBoxItem;
37+
3638
/**
3739
* ComboBox controller
3840
*/
39-
class ComboBox: public Widget
41+
class ComboBox: public Widget, public IChildSync
4042
{
4143
public:
4244
static const ctl_class_t metadata;
4345

4446
protected:
45-
ui::IPort *pPort;
46-
ctl::Color sColor;
47-
ctl::Color sSpinColor;
48-
ctl::Color sTextColor;
49-
ctl::Color sSpinTextColor;
50-
ctl::Color sBorderColor;
51-
ctl::Color sBorderGapColor;
52-
ctl::LCString sEmptyText;
53-
54-
float fMin;
55-
float fMax;
56-
float fStep;
47+
ui::IPort *pPort;
48+
ctl::Color sColor;
49+
ctl::Color sSpinColor;
50+
ctl::Color sTextColor;
51+
ctl::Color sSpinTextColor;
52+
ctl::Color sBorderColor;
53+
ctl::Color sBorderGapColor;
54+
ctl::LCString sEmptyText;
55+
lltl::parray<ListBoxItem> vItems; // Custom items
56+
57+
float fMin;
58+
float fMax;
59+
float fStep;
5760

5861
protected:
5962
static status_t slot_combo_submit(tk::Widget *sender, void *ptr, void *data);
6063

6164
protected:
6265
virtual void sync_metadata(ui::IPort *port) override;
6366
void submit_value();
67+
void do_destroy();
68+
void update_selection();
6469

6570
public:
6671
explicit ComboBox(ui::IWrapper *wrapper, tk::ComboBox *widget);
72+
ComboBox(const ComboBox &) = delete;
73+
ComboBox(ComboBox &&) = delete;
6774
virtual ~ComboBox() override;
6875

76+
ComboBox & operator = (const ComboBox &) = delete;
77+
ComboBox & operator = (ComboBox &&) = delete;
78+
6979
virtual status_t init() override;
80+
virtual void destroy() override;
7081

71-
public:
82+
public: // ctl::Widget
7283
virtual void set(ui::UIContext *ctx, const char *name, const char *value) override;
84+
virtual status_t add(ui::UIContext *ctx, ctl::Widget *child) override;
7385
virtual void notify(ui::IPort *port, size_t flags) override;
7486
virtual void end(ui::UIContext *ctx) override;
87+
88+
public: // ctl::IChildSync
89+
virtual void child_changed(Widget *child) override;
90+
7591
};
7692

7793
} /* namespace ctl */
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <[email protected]>
4+
*
5+
* This file is part of lsp-plugin-fw
6+
* Created on: 31 мар. 2024 г.
7+
*
8+
* lsp-plugin-fw is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* any later version.
12+
*
13+
* lsp-plugin-fw is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with lsp-plugin-fw. If not, see <https://www.gnu.org/licenses/>.
20+
*/
21+
22+
23+
#ifndef LSP_PLUG_IN_PLUG_FW_CTL_CONTAINERS_LISTBOX_H_
24+
#define LSP_PLUG_IN_PLUG_FW_CTL_CONTAINERS_LISTBOX_H_
25+
26+
#ifndef LSP_PLUG_IN_PLUG_FW_CTL_IMPL_
27+
#error "Use #include <lsp-plug.in/plug-fw/ctl.h>"
28+
#endif /* LSP_PLUG_IN_PLUG_FW_CTL_IMPL_ */
29+
30+
#include <lsp-plug.in/plug-fw/version.h>
31+
#include <lsp-plug.in/tk/tk.h>
32+
33+
namespace lsp
34+
{
35+
namespace ctl
36+
{
37+
/**
38+
* ComboBox controller
39+
*/
40+
class ListBox: public Widget
41+
{
42+
public:
43+
static const ctl_class_t metadata;
44+
45+
protected:
46+
ctl::Enum sHScroll;
47+
ctl::Enum sVScroll;
48+
49+
public:
50+
explicit ListBox(ui::IWrapper *wrapper, tk::ListBox *widget);
51+
virtual ~ListBox() override;
52+
53+
virtual status_t init() override;
54+
55+
public:
56+
virtual void set(ui::UIContext *ctx, const char *name, const char *value) override;
57+
virtual void end(ui::UIContext *ctx) override;
58+
};
59+
60+
} /* namespace ctl */
61+
} /* namespace lsp */
62+
63+
64+
65+
#endif /* LSP_PLUG_IN_PLUG_FW_CTL_CONTAINERS_LISTBOX_H_ */

0 commit comments

Comments
 (0)