1
1
/*
2
- * Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/>
3
- * (C) 2021 Vladimir Sadovnikov <[email protected] >
2
+ * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3
+ * (C) 2023 Vladimir Sadovnikov <[email protected] >
4
4
*
5
5
* This file is part of lsp-plugin-fw
6
6
* Created on: 13 апр. 2021 г.
@@ -42,10 +42,6 @@ namespace lsp
42
42
public:
43
43
static const ctl_class_t metadata;
44
44
45
- private:
46
- PluginWindow & operator = (const PluginWindow &);
47
- PluginWindow (const PluginWindow &);
48
-
49
45
private:
50
46
static const tk::tether_t top_tether[];
51
47
static const tk::tether_t bottom_tether[];
@@ -96,6 +92,14 @@ namespace lsp
96
92
ssize_t nMouseY;
97
93
} window_scale_t ;
98
94
95
+ typedef struct enum_menu_t
96
+ {
97
+ PluginWindow *pWnd;
98
+ tk::Menu *pMenu;
99
+ ui::IPort *pPort;
100
+ lltl::parray<tk::MenuItem> vItems;
101
+ } enum_menu_t ;
102
+
99
103
class ConfigSink : public tk ::TextDataSink
100
104
{
101
105
private:
@@ -132,10 +136,13 @@ namespace lsp
132
136
tk::CheckBox *wRelPaths; // Relative path checkbox
133
137
tk::MenuItem *wInvertVScroll; // Global inversion of mouse vertical scroll
134
138
tk::MenuItem *wInvertGraphDotVScroll; // Invert mouse vertical scroll for GraphDot widgets
139
+ tk::MenuItem *wZoomableSpectrum; // Automatic scaling mode of the frequency graph
140
+ tk::Menu *wFilterPointThickness; // Filter point thickness submenu
135
141
136
142
ui::IPort *pPVersion;
137
143
ui::IPort *pPBypass;
138
144
ui::IPort *pPath;
145
+ ui::IPort *pFileType;
139
146
ui::IPort *pR3DBackend;
140
147
ui::IPort *pLanguage;
141
148
ui::IPort *pRelPaths;
@@ -147,10 +154,12 @@ namespace lsp
147
154
ui::IPort *pOverrideHydrogen;
148
155
ui::IPort *pInvertVScroll;
149
156
ui::IPort *pInvertGraphDotVScroll;
157
+ ui::IPort *pZoomableSpectrum;
150
158
151
159
ConfigSink *pConfigSink; // Configuration sink
152
160
153
161
window_scale_t sWndScale ;
162
+ enum_menu_t sFilterPointThickness ;
154
163
155
164
lltl::parray<backend_sel_t > vBackendSel;
156
165
lltl::parray<lang_sel_t > vLangSel;
@@ -220,11 +229,15 @@ namespace lsp
220
229
221
230
static status_t slot_invert_vscroll_changed (tk::Widget *sender, void *ptr, void *data);
222
231
static status_t slot_invert_graph_dot_vscroll_changed (tk::Widget *sender, void *ptr, void *data);
232
+ static status_t slot_zoomable_spectrum_changed (tk::Widget *sender, void *ptr, void *data);
233
+
234
+ static status_t slot_submit_enum_menu_item (tk::Widget *sender, void *ptr, void *data);
223
235
224
236
protected:
225
237
static i18n::IDictionary *get_default_dict (tk::Widget *src);
226
238
static tk::FileFilters *create_config_filters (tk::FileDialog *dlg);
227
239
static ssize_t compare_presets (const resource::resource_t *a, const resource::resource_t *b);
240
+ void init_enum_menu (enum_menu_t *menu);
228
241
229
242
protected:
230
243
void do_destroy ();
@@ -238,6 +251,7 @@ namespace lsp
238
251
tk::Hyperlink *create_hlink (tk::WidgetContainer *dst, const char *url, const char *text, const expr::Parameters *params, const char *style_name);
239
252
tk::MenuItem *create_menu_item (tk::Menu *dst);
240
253
tk::Menu *create_menu ();
254
+ tk::Menu *create_enum_menu (enum_menu_t *em, tk::Menu *parent, const char *label);
241
255
status_t create_dialog_window (ctl::Window **ctl, tk::Window **dst, const char *path);
242
256
243
257
status_t init_r3d_support (tk::Menu *menu);
@@ -258,6 +272,9 @@ namespace lsp
258
272
void sync_knob_scale_enabled ();
259
273
void sync_override_hydrogen ();
260
274
void sync_invert_vscroll (ui::IPort *port);
275
+ void sync_zoomable_spectrum ();
276
+ void sync_filter_point_thickness ();
277
+ void sync_enum_menu (enum_menu_t *menu, ui::IPort *port);
261
278
void apply_user_paths_settings ();
262
279
void read_path_param (tk::String *value, const char *port_id);
263
280
void read_bool_param (tk::Boolean *value, const char *port_id);
@@ -269,8 +286,13 @@ namespace lsp
269
286
270
287
public:
271
288
explicit PluginWindow (ui::IWrapper *src, tk::Window *widget);
289
+ PluginWindow (const PluginWindow &) = delete ;
290
+ PluginWindow (PluginWindow &&) = delete ;
272
291
virtual ~PluginWindow () override ;
273
292
293
+ PluginWindow & operator = (const PluginWindow &) = delete ;
294
+ PluginWindow & operator = (PluginWindow &&) = delete ;
295
+
274
296
/* * Init widget
275
297
*
276
298
*/
@@ -288,8 +310,8 @@ namespace lsp
288
310
virtual void end (ui::UIContext *ctx) override ;
289
311
virtual void notify (ui::IPort *port, size_t flags) override ;
290
312
};
291
- }
292
- }
313
+ } /* namespace ctl */
314
+ } /* namespace lsp */
293
315
294
316
295
317
0 commit comments