diff --git a/CHANGELOG b/CHANGELOG
index db926183..21c994a3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,13 @@
* RECENT CHANGES
*******************************************************************************
+=== 1.0.14 ===
+* Improved code base by using PVS Studio static code analyzer.
+* Fixed several issues reported by PVS Studio static analyzer.
+* Added tk::Menu::showmp method to show menu at current mouse cursor's position
+ as a window transient for specified widget.
+* Updated module versions in dependencies.
+
=== 1.0.13 ===
* Several fixes and optimizations related to tk::LedMeterChannel and tk::LedMeter.
* Fixed bug in tk::TabControl widget destruction.
diff --git a/README.md b/README.md
index 142bd62d..f5cea2db 100644
--- a/README.md
+++ b/README.md
@@ -329,4 +329,7 @@ The result of this example:
![Indicator widget](res/doc/example-msg.png)
+## SAST Tools
+
+* [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.
diff --git a/include/lsp-plug.in/tk/prop/base/Flags.h b/include/lsp-plug.in/tk/prop/base/Flags.h
index eec4a75b..f7522a67 100644
--- a/include/lsp-plug.in/tk/prop/base/Flags.h
+++ b/include/lsp-plug.in/tk/prop/base/Flags.h
@@ -33,19 +33,12 @@ namespace lsp
class Flags: public Property
{
- private:
- Flags & operator = (const Flags &);
- Flags(const Flags &);
-
protected:
size_t nFlags; // Bit field of flags
const char * const *pFlags; // Flag description
atom_t *vAtoms; // List of associated atoms
protected:
- virtual void push();
- virtual void commit(atom_t property);
-
status_t unbind();
status_t bind(atom_t id, Style *style);
status_t bind(const char *id, Style *style);
@@ -59,9 +52,18 @@ namespace lsp
bool unset(size_t ordinal);
bool toggle(size_t ordinal);
+ protected:
+ virtual void push() override;
+ virtual void commit(atom_t property) override;
+
protected:
explicit Flags(const char * const *flags, atom_t *atoms, prop::Listener *listener = NULL);
- virtual ~Flags();
+ Flags(const Flags &) = delete;
+ Flags(Flags &&) = delete;
+ virtual ~Flags() override;
+
+ Flags & operator = (const Flags &) = delete;
+ Flags & operator = (Flags &&) = delete;
};
} /* namespace tk */
diff --git a/include/lsp-plug.in/tk/prop/flags/Allocation.h b/include/lsp-plug.in/tk/prop/flags/Allocation.h
index 81e2ff17..a4eb74e5 100644
--- a/include/lsp-plug.in/tk/prop/flags/Allocation.h
+++ b/include/lsp-plug.in/tk/prop/flags/Allocation.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 16 мая 2020 г.
@@ -39,10 +39,6 @@ namespace lsp
*/
class Allocation: public Flags
{
- private:
- Allocation & operator = (const Allocation &);
- Allocation(const Allocation &);
-
protected:
static const char * const FLAGS[];
@@ -62,7 +58,12 @@ namespace lsp
atom_t vAtoms[F_TOTAL];
protected:
- inline Allocation(prop::Listener *listener = NULL): Flags(FLAGS, vAtoms, listener) {}
+ Allocation(prop::Listener *listener = NULL);
+ Allocation(const Allocation &) = delete;
+ Allocation(Allocation &&) = delete;
+
+ Allocation & operator = (const Allocation &) = delete;
+ Allocation & operator = (Allocation &&) = delete;
public:
inline bool hfill() const { return Flags::get(F_HFILL); }
@@ -119,7 +120,7 @@ namespace lsp
*/
inline status_t unbind() { return tk::Allocation::unbind(); };
};
- }
+ } /* namespace prop */
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/flags/WindowActions.h b/include/lsp-plug.in/tk/prop/flags/WindowActions.h
index 8cc38b1f..01c132d0 100644
--- a/include/lsp-plug.in/tk/prop/flags/WindowActions.h
+++ b/include/lsp-plug.in/tk/prop/flags/WindowActions.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 8 мая 2020 г.
@@ -35,15 +35,16 @@ namespace lsp
class WindowActions: public BitEnum
{
- private:
- WindowActions & operator = (const WindowActions &);
- WindowActions(const WindowActions &);
-
protected:
static const prop::enum_t ENUM[];
protected:
explicit WindowActions(prop::Listener *listener = NULL): BitEnum(ENUM, listener) {};
+ WindowActions(const WindowActions &) = delete;
+ WindowActions(WindowActions &&) = delete;
+
+ WindowActions & operator = (const WindowActions &) = delete;
+ WindowActions & operator = (WindowActions &&) = delete;
public:
inline bool allowed(ws::window_action_t wa) const { return nValue & wa; }
@@ -128,9 +129,9 @@ namespace lsp
*/
inline status_t unbind() { return tk::WindowActions::unbind(); };
};
- }
- }
-}
+ } /* namespace prop */
+ } /* namespace tk */
+} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/multi/Font.h b/include/lsp-plug.in/tk/prop/multi/Font.h
index e6b20a73..f982d116 100644
--- a/include/lsp-plug.in/tk/prop/multi/Font.h
+++ b/include/lsp-plug.in/tk/prop/multi/Font.h
@@ -82,12 +82,12 @@ namespace lsp
protected:
void push_masked(size_t mask);
- virtual void push();
- virtual void commit(atom_t property);
+ virtual void push() override;
+ virtual void commit(atom_t property) override;
protected:
explicit Font(prop::Listener *listener = NULL);
- virtual ~Font();
+ virtual ~Font() override;
public:
inline void set_default() { MultiProperty::set_default(vAtoms, DESC); }
@@ -123,7 +123,7 @@ namespace lsp
void set(const ws::Font *f);
public:
- virtual void override();
+ virtual void override() override;
bool get_parameters(ws::ISurface *s, float scaling, ws::font_parameters_t *fp) const;
bool get_parameters(Display *dpy, float scaling, ws::font_parameters_t *fp) const;
diff --git a/include/lsp-plug.in/tk/prop/multi/Vector2D.h b/include/lsp-plug.in/tk/prop/multi/Vector2D.h
index 39783d4c..b41cb1e1 100644
--- a/include/lsp-plug.in/tk/prop/multi/Vector2D.h
+++ b/include/lsp-plug.in/tk/prop/multi/Vector2D.h
@@ -37,10 +37,6 @@ namespace lsp
*/
class Vector2D: public MultiProperty
{
- private:
- Vector2D & operator = (const Vector2D &);
- Vector2D(const Vector2D &);
-
protected:
enum property_t
{
@@ -66,8 +62,8 @@ namespace lsp
float fPhi; // Angle
protected:
- virtual void push();
- virtual void commit(atom_t property);
+ virtual void push() override;
+ virtual void commit(atom_t property) override;
static void calc_cart (float *dx, float *dy, float rho, float phi);
static void calc_polar (float *rho, float *phi, float dx, float dy);
@@ -75,7 +71,12 @@ namespace lsp
protected:
explicit Vector2D(prop::Listener *listener = NULL);
- virtual ~Vector2D();
+ Vector2D(const Vector2D &) = delete;
+ Vector2D(Vector2D &&) = delete;
+ virtual ~Vector2D() override;
+
+ Vector2D & operator = (const Vector2D &) = delete;
+ Vector2D & operator = (Vector2D &&) = delete;
public:
inline float dx() const { return fDX; }
@@ -136,7 +137,7 @@ namespace lsp
*/
inline status_t unbind() { return tk::Vector2D::unbind(vAtoms, DESC, &sListener); };
};
- }
+ } /* namespace prop */
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/simple/Boolean.h b/include/lsp-plug.in/tk/prop/simple/Boolean.h
index 36b18aaf..e2684c47 100644
--- a/include/lsp-plug.in/tk/prop/simple/Boolean.h
+++ b/include/lsp-plug.in/tk/prop/simple/Boolean.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 7 мая 2020 г.
@@ -35,10 +35,6 @@ namespace lsp
*/
class Boolean: public SimpleProperty
{
- private:
- Boolean & operator = (const Boolean &);
- Boolean(const Boolean &);
-
protected:
bool bValue;
@@ -48,8 +44,13 @@ namespace lsp
protected:
explicit Boolean(prop::Listener *listener = NULL);
+ Boolean(const Boolean &) = delete;
+ Boolean(Boolean &&) = delete;
virtual ~Boolean();
+ Boolean & operator = (const Boolean &) = delete;
+ Boolean & operator = (Boolean &&) = delete;
+
public:
/**
* Get value of the boolean property
@@ -127,7 +128,7 @@ namespace lsp
inline void listener(prop::Listener *listener) { pListener = listener; }
};
- }
+ } /* namespace prop */
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/simple/Float.h b/include/lsp-plug.in/tk/prop/simple/Float.h
index d19aaf1c..e0d82e50 100644
--- a/include/lsp-plug.in/tk/prop/simple/Float.h
+++ b/include/lsp-plug.in/tk/prop/simple/Float.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 9 окт. 2019 г.
@@ -35,10 +35,6 @@ namespace lsp
*/
class Float: public SimpleProperty
{
- private:
- Float & operator = (const Float &);
- Float(const Float &);
-
protected:
float fValue;
@@ -48,8 +44,13 @@ namespace lsp
protected:
explicit Float(prop::Listener *listener = NULL);
+ Float(const Float &) = delete;
+ Float(Float &&) = delete;
virtual ~Float();
+ Float & operator = (const Float &) = delete;
+ Float & operator = (Float &&) = delete;
+
public:
/**
* Get value of the float property
@@ -109,7 +110,7 @@ namespace lsp
inline void listener(prop::Listener *listener) { pListener = listener; }
};
- }
+ } /* namespace prop */
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/simple/Integer.h b/include/lsp-plug.in/tk/prop/simple/Integer.h
index e0635526..588204ce 100644
--- a/include/lsp-plug.in/tk/prop/simple/Integer.h
+++ b/include/lsp-plug.in/tk/prop/simple/Integer.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 6 мая 2020 г.
@@ -31,17 +31,12 @@ namespace lsp
namespace tk
{
/**
- * Integering property interface
+ * Integer property interface
*/
class Integer: public SimpleProperty
{
- private:
- Integer & operator = (const Integer &);
- Integer(const Integer &);
-
protected:
ssize_t nValue;
- Listener sListener;
protected:
virtual void commit(atom_t property);
@@ -49,8 +44,13 @@ namespace lsp
protected:
explicit Integer(prop::Listener *listener = NULL);
+ Integer(const Integer &) = delete;
+ Integer(Integer &&) = delete;
virtual ~Integer();
+ Integer & operator = (const Integer &) = delete;
+ Integer & operator = (Integer &&) = delete;
+
public:
/**
* Get value of the float property
@@ -107,7 +107,7 @@ namespace lsp
inline void listener(prop::Listener *listener) { pListener = listener; }
};
- }
+ } /* namespace prop */
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/simple/PathPattern.h b/include/lsp-plug.in/tk/prop/simple/PathPattern.h
index a2070535..4ea6d85b 100644
--- a/include/lsp-plug.in/tk/prop/simple/PathPattern.h
+++ b/include/lsp-plug.in/tk/prop/simple/PathPattern.h
@@ -37,17 +37,18 @@ namespace lsp
*/
class PathPattern: public Property
{
- private:
- PathPattern & operator = (const PathPattern &);
- PathPattern(const PathPattern &);
-
protected:
io::PathPattern sPattern;
protected:
explicit PathPattern(prop::Listener *listener = NULL);
+ PathPattern(const PathPattern &) = delete;
+ PathPattern(PathPattern &&) = delete;
virtual ~PathPattern();
+ PathPattern & operator = (const PathPattern &) = delete;
+ PathPattern & operator = (PathPattern &&);
+
public:
const io::PathPattern *pattern() const { return &sPattern; }
const LSPString *get() const { return sPattern.get(); }
@@ -85,8 +86,8 @@ namespace lsp
public:
explicit PathPattern(prop::Listener *listener = NULL): tk::PathPattern(listener) {};
};
- }
- }
-}
+ } /* namespace prop */
+ } /* namespace tk */
+} /* namespace lsp */
#endif /* LSP_PLUG_IN_TK_PROP_SIMPLE_PATHPATTERN_H_ */
diff --git a/include/lsp-plug.in/tk/prop/simple/String.h b/include/lsp-plug.in/tk/prop/simple/String.h
index f9f5bb65..d5667815 100644
--- a/include/lsp-plug.in/tk/prop/simple/String.h
+++ b/include/lsp-plug.in/tk/prop/simple/String.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 2 мар. 2020 г.
@@ -40,10 +40,6 @@ namespace lsp
*/
class String: public SimpleProperty
{
- private:
- String & operator = (const String &);
- String(const String &);
-
protected:
enum flags_t
{
@@ -94,8 +90,13 @@ namespace lsp
protected:
explicit String(prop::Listener *listener = NULL);
+ String(const String &) = delete;
+ String(String &&) = delete;
virtual ~String();
+ String & operator = (const String &) = delete;
+ String & operator = (String &&) = delete;
+
public:
/**
* Check wheter the string is localized
@@ -240,11 +241,15 @@ namespace lsp
class String: public tk::String
{
private:
- String & operator = (const String &);
- String(const String &);
+
public:
explicit String(prop::Listener *listener = NULL): tk::String(listener) {};
+ String(const String &)= delete;
+ String(String &&)= delete;
+
+ String & operator = (const String &) = delete;
+ String & operator = (String &&) = delete;
public:
using tk::String::format;
@@ -273,7 +278,7 @@ namespace lsp
inline void listener(prop::Listener *listener) { pListener = listener; }
};
- }
+ } /* namespace prop */
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/prop/specific/GraphFrameData.h b/include/lsp-plug.in/tk/prop/specific/GraphFrameData.h
index d324a1f4..a43bbbe0 100644
--- a/include/lsp-plug.in/tk/prop/specific/GraphFrameData.h
+++ b/include/lsp-plug.in/tk/prop/specific/GraphFrameData.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 2 сент. 2020 г.
@@ -32,10 +32,6 @@ namespace lsp
{
class GraphFrameData: public MultiProperty
{
- private:
- GraphFrameData & operator = (const GraphFrameData &);
- GraphFrameData(const GraphFrameData &);
-
protected:
static const prop::desc_t DESC[];
@@ -60,7 +56,7 @@ namespace lsp
inline Listener(GraphFrameData *data) { pValue = data; };
public:
- virtual void notify(atom_t property);
+ virtual void notify(atom_t property) override;
};
protected:
@@ -87,8 +83,13 @@ namespace lsp
public:
explicit GraphFrameData(prop::Listener *listener);
+ GraphFrameData(const GraphFrameData &) = delete;
+ GraphFrameData(GraphFrameData &&) = delete;
virtual ~GraphFrameData();
+ GraphFrameData & operator = (const GraphFrameData &) = delete;
+ GraphFrameData & operator = (GraphFrameData &&) = delete;
+
public:
size_t rows() const { return nRows; }
size_t columns() const { return nCols; }
@@ -138,10 +139,9 @@ namespace lsp
inline status_t bind(const LSPString *property, Style *style) { return tk::GraphFrameData::bind(property, style, vAtoms, DESC, &sListener); }
};
- };
- }
-}
-
+ } /* namespace prop */
+ } /*namespace tk */
+} /* namespace lsp */
#endif /* LSP_PLUG_IN_TK_PROP_SPECIFIC_GRAPHFRAMEDATA_H_ */
diff --git a/include/lsp-plug.in/tk/prop/specific/GraphMeshData.h b/include/lsp-plug.in/tk/prop/specific/GraphMeshData.h
index 243a4863..812b84cb 100644
--- a/include/lsp-plug.in/tk/prop/specific/GraphMeshData.h
+++ b/include/lsp-plug.in/tk/prop/specific/GraphMeshData.h
@@ -32,10 +32,6 @@ namespace lsp
{
class GraphMeshData: public MultiProperty
{
- private:
- GraphMeshData &operator = (const GraphMeshData &);
- GraphMeshData(const GraphMeshData &);
-
protected:
static const prop::desc_t DESC[];
@@ -56,7 +52,7 @@ namespace lsp
inline Listener(GraphMeshData *color) { pValue = color; };
public:
- virtual void notify(atom_t property);
+ virtual void notify(atom_t property) override;
};
protected:
@@ -72,12 +68,17 @@ namespace lsp
protected:
void copy_data(float *dst, const float *src, size_t n);
void sync();
- void commit(atom_t property);
+ void commit(atom_t property) override;
bool resize_buffer(size_t size, bool strobe);
public:
explicit GraphMeshData(prop::Listener *listener);
- virtual ~GraphMeshData();
+ GraphMeshData(const GraphMeshData &) = delete;
+ GraphMeshData(GraphMeshData &&) = delete;
+ virtual ~GraphMeshData() override;
+
+ GraphMeshData &operator = (const GraphMeshData &) = delete;
+ GraphMeshData &operator = (GraphMeshData &&) = delete;
public:
inline size_t size() const { return nSize; }
@@ -110,20 +111,21 @@ namespace lsp
{
class GraphMeshData: public tk::GraphMeshData
{
- private:
- GraphMeshData &operator = (const GraphMeshData &);
- GraphMeshData(const GraphMeshData &);
-
public:
explicit inline GraphMeshData(prop::Listener *listener = NULL): tk::GraphMeshData(listener) {}
+ GraphMeshData(const GraphMeshData &) = delete;
+ GraphMeshData(GraphMeshData &&) = delete;
+
+ GraphMeshData &operator = (const GraphMeshData &) = delete;
+ GraphMeshData &operator = (GraphMeshData &&) = delete;
public:
inline status_t bind(atom_t property, Style *style) { return tk::GraphMeshData::bind(property, style, vAtoms, DESC, &sListener); }
inline status_t bind(const char *property, Style *style) { return tk::GraphMeshData::bind(property, style, vAtoms, DESC, &sListener); }
inline status_t bind(const LSPString *property, Style *style) { return tk::GraphMeshData::bind(property, style, vAtoms, DESC, &sListener); }
};
- };
- }
-}
+ } /* namespace prop */
+ } /*namespace tk */
+} /* namespace lsp */
#endif /* LSP_PLUG_IN_TK_PROP_SPECIFIC_GRAPHMESHDATA_H_ */
diff --git a/include/lsp-plug.in/tk/style/Style.h b/include/lsp-plug.in/tk/style/Style.h
index 5bf4c383..79877b96 100644
--- a/include/lsp-plug.in/tk/style/Style.h
+++ b/include/lsp-plug.in/tk/style/Style.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 1 окт. 2019 г.
@@ -43,9 +43,6 @@ namespace lsp
class Style
{
private:
- Style & operator = (const Style &);
- Style(const Style &);
-
friend class IStyleFactory;
friend class Schema;
friend class Property;
@@ -123,8 +120,13 @@ namespace lsp
public:
explicit Style(Schema *schema, const char *name, const char *parents);
+ Style(const Style &) = delete;
+ Style(Style &&) = delete;
virtual ~Style();
+ Style & operator = (const Style &) = delete;
+ Style & operator = (Style &&) = delete;
+
virtual status_t init();
void destroy();
diff --git a/include/lsp-plug.in/tk/util/KeyboardHandler.h b/include/lsp-plug.in/tk/util/KeyboardHandler.h
index 255c10fa..948f567d 100644
--- a/include/lsp-plug.in/tk/util/KeyboardHandler.h
+++ b/include/lsp-plug.in/tk/util/KeyboardHandler.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 11 сент. 2017 г.
@@ -32,9 +32,6 @@ namespace lsp
{
class KeyboardHandler: public ws::IEventHandler
{
- private:
- KeyboardHandler & operator = (const KeyboardHandler &);
-
protected:
enum constants_t
{
@@ -57,7 +54,12 @@ namespace lsp
public:
explicit KeyboardHandler();
- virtual ~KeyboardHandler();
+ KeyboardHandler(const KeyboardHandler &) = delete;
+ KeyboardHandler(KeyboardHandler &&) = delete;
+ virtual ~KeyboardHandler() override;
+
+ KeyboardHandler & operator = (KeyboardHandler &&) = delete;
+ KeyboardHandler & operator = (const KeyboardHandler &) = delete;
status_t init(Display *dpy);
@@ -74,7 +76,7 @@ namespace lsp
public:
// Event handling callbacks
- virtual status_t handle_event(const ws::event_t *e);
+ virtual status_t handle_event(const ws::event_t *e) override;
// Event handling callbacks
virtual status_t on_key_down(const ws::event_t *e);
diff --git a/include/lsp-plug.in/tk/version.h b/include/lsp-plug.in/tk/version.h
index 308013bd..e6091da0 100644
--- a/include/lsp-plug.in/tk/version.h
+++ b/include/lsp-plug.in/tk/version.h
@@ -24,7 +24,7 @@
#define LSP_TK_LIB_MAJOR 1
#define LSP_TK_LIB_MINOR 0
-#define LSP_TK_LIB_MICRO 13
+#define LSP_TK_LIB_MICRO 14
#if defined(LSP_TK_LIB_PUBLISHER)
#define LSP_TK_LIB_PUBLIC LSP_EXPORT_MODIFIER
diff --git a/include/lsp-plug.in/tk/widgets/compound/ComboBox.h b/include/lsp-plug.in/tk/widgets/compound/ComboBox.h
index 7309d7ad..829b7ec6 100644
--- a/include/lsp-plug.in/tk/widgets/compound/ComboBox.h
+++ b/include/lsp-plug.in/tk/widgets/compound/ComboBox.h
@@ -60,10 +60,6 @@ namespace lsp
class ComboBox: public WidgetContainer
{
- private:
- ComboBox & operator = (const ComboBox &);
- ComboBox(const ComboBox &);
-
public:
static const w_class_t metadata;
@@ -94,9 +90,8 @@ namespace lsp
public:
explicit Window(Display *dpy, ComboBox *cbox);
- virtual status_t on_hide();
-
- virtual status_t on_show();
+ virtual status_t on_hide() override;
+ virtual status_t on_show() override;
};
class List: public ListBox
@@ -111,12 +106,11 @@ namespace lsp
explicit List(Display *dpy, ComboBox *cbox);
protected:
- virtual void property_changed(Property *prop);
+ virtual void property_changed(Property *prop) override;
public:
- virtual status_t on_submit();
-
- virtual status_t on_change();
+ virtual status_t on_submit() override;
+ virtual status_t on_change() override;
};
protected:
@@ -158,16 +152,21 @@ namespace lsp
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
protected:
- virtual void property_changed(Property *prop);
- virtual void size_request(ws::size_limit_t *r);
- virtual void realize(const ws::rectangle_t *r);
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
public:
explicit ComboBox(Display *dpy);
- virtual ~ComboBox();
+ ComboBox(const ComboBox &) = delete;
+ ComboBox(ComboBox &&) = delete;
+ virtual ~ComboBox() override;
- virtual status_t init();
- virtual void destroy();
+ ComboBox & operator = (const ComboBox &) = delete;
+ ComboBox & operator = (ComboBox &&) = delete;
+
+ virtual status_t init() override;
+ virtual void destroy() override;
public:
LSP_TK_PROPERTY(Integer, border_size, &sBorderSize)
@@ -195,26 +194,19 @@ namespace lsp
LSP_TK_PROPERTY(WidgetList, items, sLBox.items())
public:
- virtual status_t add(Widget *child);
-
- virtual status_t remove(Widget *child);
-
- virtual status_t remove_all();
+ virtual status_t add(Widget *child) override;
+ virtual status_t remove(Widget *child) override;
+ virtual status_t remove_all() override;
+ virtual void draw(ws::ISurface *s) override;
- virtual void draw(ws::ISurface *s);
-
- virtual status_t on_mouse_down(const ws::event_t *e);
-
- virtual status_t on_mouse_up(const ws::event_t *e);
-
- virtual status_t on_mouse_move(const ws::event_t *e);
-
- virtual status_t on_mouse_scroll(const ws::event_t *e);
-
- virtual status_t on_key_down(const ws::event_t *e);
+ virtual status_t on_mouse_down(const ws::event_t *e) override;
+ virtual status_t on_mouse_up(const ws::event_t *e) override;
+ virtual status_t on_mouse_move(const ws::event_t *e) override;
+ virtual status_t on_mouse_scroll(const ws::event_t *e) override;
+ virtual status_t on_key_down(const ws::event_t *e) override;
+ public:
virtual status_t on_change();
-
virtual status_t on_submit();
};
} /* namespace tk */
diff --git a/include/lsp-plug.in/tk/widgets/compound/ComboGroup.h b/include/lsp-plug.in/tk/widgets/compound/ComboGroup.h
index 5b76c4a7..257e29d2 100644
--- a/include/lsp-plug.in/tk/widgets/compound/ComboGroup.h
+++ b/include/lsp-plug.in/tk/widgets/compound/ComboGroup.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 14 авг. 2020 г.
@@ -62,10 +62,6 @@ namespace lsp
*/
class ComboGroup: public WidgetContainer
{
- private:
- ComboGroup & operator = (const ComboGroup &);
- ComboGroup(const ComboGroup &);
-
public:
static const w_class_t metadata;
@@ -92,9 +88,8 @@ namespace lsp
public:
explicit Window(Display *dpy, ComboGroup *cbox);
- virtual status_t on_hide();
-
- virtual status_t on_show();
+ virtual status_t on_hide() override;
+ virtual status_t on_show() override;
};
class List: public ListBox
@@ -109,10 +104,10 @@ namespace lsp
explicit List(Display *dpy, ComboGroup *cbox);
protected:
- virtual void property_changed(Property *prop);
+ virtual void property_changed(Property *prop) override;
public:
- virtual status_t on_submit();
+ virtual status_t on_submit() override;
};
protected:
@@ -161,16 +156,21 @@ namespace lsp
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
protected:
- virtual Widget *find_widget(ssize_t x, ssize_t y);
- virtual void property_changed(Property *prop);
- virtual void size_request(ws::size_limit_t *r);
- virtual void realize(const ws::rectangle_t *r);
+ virtual Widget *find_widget(ssize_t x, ssize_t y) override;
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
public:
explicit ComboGroup(Display *dpy);
- virtual ~ComboGroup();
+ ComboGroup(const ComboGroup &) = delete;
+ ComboGroup(ComboGroup &&) = delete;
+ virtual ~ComboGroup() override;
+
+ ComboGroup & operator = (const ComboGroup &) = delete;
+ ComboGroup & operator = (ComboGroup &&) = delete;
- virtual status_t init();
+ virtual status_t init() override;
public:
LSP_TK_PROPERTY(Font, font, &sFont)
@@ -200,33 +200,25 @@ namespace lsp
LSP_TK_PROPERTY(WidgetList, widgets, &vWidgets)
public:
- virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
+ virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
+ virtual status_t add(Widget *child) override;
+ virtual status_t remove(Widget *child) override;
+ virtual status_t remove_all() override;
- virtual status_t add(Widget *child);
-
- virtual status_t remove(Widget *child);
-
- virtual status_t remove_all();
+ virtual status_t on_mouse_down(const ws::event_t *e) override;
+ virtual status_t on_mouse_up(const ws::event_t *e) override;
+ virtual status_t on_mouse_move(const ws::event_t *e) override;
+ virtual status_t on_mouse_scroll(const ws::event_t *e) override;
+ virtual status_t on_key_down(const ws::event_t *e) override;
+ public:
virtual status_t add_item(ListBoxItem *child);
-
virtual status_t remove_item(ListBoxItem *child);
-
virtual status_t remove_all_items();
virtual status_t on_change();
-
virtual status_t on_submit();
- virtual status_t on_mouse_down(const ws::event_t *e);
-
- virtual status_t on_mouse_up(const ws::event_t *e);
-
- virtual status_t on_mouse_move(const ws::event_t *e);
-
- virtual status_t on_mouse_scroll(const ws::event_t *e);
-
- virtual status_t on_key_down(const ws::event_t *e);
};
} /* namespace tk */
diff --git a/include/lsp-plug.in/tk/widgets/compound/ListBox.h b/include/lsp-plug.in/tk/widgets/compound/ListBox.h
index 2bfabbe9..c23fd968 100644
--- a/include/lsp-plug.in/tk/widgets/compound/ListBox.h
+++ b/include/lsp-plug.in/tk/widgets/compound/ListBox.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 30 июл. 2020 г.
@@ -56,10 +56,6 @@ namespace lsp
class ListBox: public WidgetContainer
{
- private:
- ListBox & operator = (const ListBox &);
- ListBox(const ListBox &);
-
public:
static const w_class_t metadata;
@@ -171,24 +167,28 @@ namespace lsp
static status_t slot_on_scroll_change(Widget *sender, void *ptr, void *data);
static status_t slot_on_change(Widget *sender, void *ptr, void *data);
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
- static status_t slot_on_scroll_key_down(Widget *sender, void *ptr, void *data);
- static status_t slot_on_scroll_key_up(Widget *sender, void *ptr, void *data);
+ static status_t slot_on_scroll_key_event(Widget *sender, void *ptr, void *data);
static void on_add_item(void *obj, Property *prop, void *w);
static void on_remove_item(void *obj, Property *prop, void *w);
static status_t key_scroll_handler(ws::timestamp_t sched, ws::timestamp_t time, void *arg);
protected:
- virtual void property_changed(Property *prop);
- virtual void size_request(ws::size_limit_t *r);
- virtual void realize(const ws::rectangle_t *r);
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
public:
explicit ListBox(Display *dpy);
- virtual ~ListBox();
+ ListBox(const ListBox &) = delete;
+ ListBox(ListBox &&) = delete;
+ virtual ~ListBox() override;
+
+ ListBox & operator = (const ListBox &) = delete;
+ ListBox & operator = (ListBox &&) = delete;
- virtual status_t init();
- virtual void destroy();
+ virtual status_t init() override;
+ virtual void destroy() override;
public:
LSP_TK_PROPERTY(SizeConstraints, constraints, &sSizeConstraints)
@@ -218,29 +218,26 @@ namespace lsp
LSP_TK_PROPERTY(Integer, vscroll_spacing, &sVScrollSpacing)
public:
- virtual Widget *find_widget(ssize_t x, ssize_t y);
-
- virtual status_t add(Widget *child);
+ virtual Widget *find_widget(ssize_t x, ssize_t y) override;
+ virtual status_t add(Widget *child) override;
+ virtual status_t remove(Widget *child) override;
+ virtual status_t remove_all() override;
+ virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
- virtual status_t remove(Widget *child);
+ virtual status_t on_mouse_down(const ws::event_t *e) override;
+ virtual status_t on_mouse_up(const ws::event_t *e) override;
+ virtual status_t on_mouse_out(const ws::event_t *e) override;
+ virtual status_t on_mouse_move(const ws::event_t *e) override;
+ virtual status_t on_mouse_scroll(const ws::event_t *e) override;
- virtual status_t remove_all();
-
- virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
-
- virtual void scroll_to_current();
-
- virtual status_t on_mouse_down(const ws::event_t *e);
- virtual status_t on_mouse_up(const ws::event_t *e);
- virtual status_t on_mouse_out(const ws::event_t *e);
- virtual status_t on_mouse_move(const ws::event_t *e);
- virtual status_t on_mouse_scroll(const ws::event_t *e);
-
- virtual status_t on_key_down(const ws::event_t *e);
- virtual status_t on_key_up(const ws::event_t *e);
+ virtual status_t on_key_down(const ws::event_t *e) override;
+ virtual status_t on_key_up(const ws::event_t *e) override;
+ public:
virtual status_t on_change();
virtual status_t on_submit();
+
+ virtual void scroll_to_current();
};
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/widgets/compound/Menu.h b/include/lsp-plug.in/tk/widgets/compound/Menu.h
index 0b1034d8..c6d4931c 100644
--- a/include/lsp-plug.in/tk/widgets/compound/Menu.h
+++ b/include/lsp-plug.in/tk/widgets/compound/Menu.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 18 сент. 2017 г.
@@ -59,10 +59,6 @@ namespace lsp
class Menu: public WidgetContainer
{
- private:
- Menu & operator = (const Menu &);
- Menu(const Menu &);
-
public:
static const w_class_t metadata;
@@ -124,14 +120,13 @@ namespace lsp
explicit Window(Display *dpy, Menu *menu);
protected:
- virtual Widget *sync_mouse_handler(const ws::event_t *e, bool lookup);
- virtual Widget *acquire_mouse_handler(const ws::event_t *e);
- virtual Widget *release_mouse_handler(const ws::event_t *e, bool lookup);
+ virtual Widget *sync_mouse_handler(const ws::event_t *e, bool lookup) override;
+ virtual Widget *acquire_mouse_handler(const ws::event_t *e) override;
+ virtual Widget *release_mouse_handler(const ws::event_t *e, bool lookup) override;
public:
- virtual status_t handle_event(const ws::event_t *e);
-
- virtual bool take_focus();
+ virtual status_t handle_event(const ws::event_t *e) override;
+ virtual bool take_focus() override;
};
class MenuScroll: public Widget
@@ -148,9 +143,9 @@ namespace lsp
explicit MenuScroll(Display *dpy, Menu *menu, ssize_t dir);
public:
- virtual status_t on_mouse_in(const ws::event_t *e);
- virtual status_t on_mouse_out(const ws::event_t *e);
- virtual status_t on_focus_out(const ws::event_t *e);
+ virtual status_t on_mouse_in(const ws::event_t *e) override;
+ virtual status_t on_mouse_out(const ws::event_t *e) override;
+ virtual status_t on_focus_out(const ws::event_t *e) override;
bool active() const;
};
@@ -211,36 +206,32 @@ namespace lsp
bool check_rtl_direction();
protected:
- virtual void property_changed(Property *prop);
-
- virtual void size_request(ws::size_limit_t *r);
-
- virtual void realize(const ws::rectangle_t *r);
-
- virtual void show_widget();
-
- virtual void hide_widget();
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
+ virtual void show_widget() override;
+ virtual void hide_widget() override;
virtual void select_menu_item(MenuItem *item, bool popup);
-
virtual void select_menu_item(ssize_t index, bool popup);
-
virtual void select_first_item(bool popup);
-
virtual void submit_menu_item(MenuItem *item, bool focus);
-
virtual void sync_scroll(MenuItem *item);
-
virtual status_t handle_key_scroll(ssize_t dir);
-
virtual status_t handle_mouse_scroll(ssize_t dir);
public:
explicit Menu(Display *dpy);
- virtual ~Menu();
+ Menu(const Menu &) = delete;
+ Menu(Menu &&) = delete;
+ virtual ~Menu() override;
+
+ Menu & operator = (const Menu &) = delete;
+ Menu & operator = (Menu &&) = delete;
- virtual status_t init();
- virtual void destroy();
+
+ virtual status_t init() override;
+ virtual void destroy() override;
public:
LSP_TK_PROPERTY(Font, font, &sFont)
@@ -272,28 +263,25 @@ namespace lsp
bool add_tether(size_t pos, float halign=1.0f, float valign=1.0f);
public:
- virtual Widget *find_widget(ssize_t x, ssize_t y);
+ virtual Widget *find_widget(ssize_t x, ssize_t y) override;
+ virtual status_t add(Widget *child) override;
+ virtual status_t remove(Widget *child) override;
+ virtual void show() override;
- virtual status_t add(Widget *child);
+ virtual void draw(ws::ISurface *s) override;
+ virtual status_t on_key_down(const ws::event_t *e) override;
+ virtual status_t on_key_up(const ws::event_t *e) override;
+ public:
virtual status_t insert(Widget *child, size_t index);
-
- virtual status_t remove(Widget *child);
-
virtual Widget *get(size_t index);
- virtual void show();
virtual void show(Widget *w);
virtual void showxy(Widget *w);
+ virtual void showmp(Widget *w);
virtual void show(Widget *w, ssize_t x, ssize_t y);
virtual void show(Widget *w, ssize_t x, ssize_t y, ssize_t xw, ssize_t xh);
virtual void show(Widget *w, const ws::rectangle_t *r);
-
- virtual void draw(ws::ISurface *s);
-
- virtual status_t on_key_down(const ws::event_t *e);
-
- virtual status_t on_key_up(const ws::event_t *e);
};
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/widgets/containers/Align.h b/include/lsp-plug.in/tk/widgets/containers/Align.h
index 9c57cc82..38c46896 100644
--- a/include/lsp-plug.in/tk/widgets/containers/Align.h
+++ b/include/lsp-plug.in/tk/widgets/containers/Align.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 17 июл. 2017 г.
@@ -46,10 +46,6 @@ namespace lsp
*/
class Align: public WidgetContainer
{
- private:
- Align & operator = (const Align &);
- Align(const Align &);
-
public:
static const w_class_t metadata;
@@ -62,28 +58,31 @@ namespace lsp
void do_destroy();
protected:
- virtual Widget *find_widget(ssize_t x, ssize_t y);
- virtual void property_changed(Property *prop);
- virtual void size_request(ws::size_limit_t *r);
- virtual void realize(const ws::rectangle_t *r);
+ virtual Widget *find_widget(ssize_t x, ssize_t y) override;
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
public:
explicit Align(Display *dpy);
- virtual ~Align();
+ Align(const Align &) = delete;
+ Align(Align &&) = delete;
+ virtual ~Align() override;
+
+ Align & operator = (const Align &) = delete;
+ Align & operator = (Align &&) = delete;
- virtual status_t init();
- virtual void destroy();
+ virtual status_t init() override;
+ virtual void destroy() override;
public:
LSP_TK_PROPERTY(Layout, layout, &sLayout)
LSP_TK_PROPERTY(SizeConstraints, constraints, &sConstraints)
public:
- virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
-
- virtual status_t add(Widget *widget);
-
- virtual status_t remove(Widget *widget);
+ virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
+ virtual status_t add(Widget *widget) override;
+ virtual status_t remove(Widget *widget) override;
};
} /* namespace tk */
diff --git a/include/lsp-plug.in/tk/widgets/containers/Box.h b/include/lsp-plug.in/tk/widgets/containers/Box.h
index 6df0469e..e0f0e775 100644
--- a/include/lsp-plug.in/tk/widgets/containers/Box.h
+++ b/include/lsp-plug.in/tk/widgets/containers/Box.h
@@ -50,10 +50,6 @@ namespace lsp
*/
class Box: public WidgetContainer
{
- private:
- Box & operator = (const Box &);
- Box(const Box &);
-
public:
static const w_class_t metadata;
@@ -104,16 +100,21 @@ namespace lsp
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
protected:
- virtual void size_request(ws::size_limit_t *r);
- virtual void property_changed(Property *prop);
- virtual void realize(const ws::rectangle_t *r);
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void property_changed(Property *prop) override;
+ virtual void realize(const ws::rectangle_t *r) override;
public:
explicit Box(Display *dpy);
+ Box(const Box &) = delete;
+ Box(Box &&) = delete;
virtual ~Box();
- virtual status_t init();
- virtual void destroy();
+ Box & operator = (const Box &) = delete;
+ Box & operator = (Box &&) = delete;
+
+ virtual status_t init() override;
+ virtual void destroy() override;
//---------------------------------------------------------------------------------
// Properties
@@ -168,25 +169,19 @@ namespace lsp
//---------------------------------------------------------------------------------
// Manipulation
public:
- virtual Widget *find_widget(ssize_t x, ssize_t y);
-
- virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
-
- virtual status_t add(Widget *widget);
-
- virtual status_t remove(Widget *child);
-
- virtual status_t remove_all();
-
- virtual status_t on_mouse_in(const ws::event_t *e);
-
- virtual status_t on_mouse_out(const ws::event_t *e);
+ virtual Widget *find_widget(ssize_t x, ssize_t y) override;
- virtual status_t on_mouse_move(const ws::event_t *e);
+ virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
- virtual status_t on_mouse_down(const ws::event_t *e);
+ virtual status_t add(Widget *widget) override;
+ virtual status_t remove(Widget *child) override;
+ virtual status_t remove_all() override;
- virtual status_t on_mouse_up(const ws::event_t *e);
+ virtual status_t on_mouse_in(const ws::event_t *e) override;
+ virtual status_t on_mouse_out(const ws::event_t *e) override;
+ virtual status_t on_mouse_move(const ws::event_t *e) override;
+ virtual status_t on_mouse_down(const ws::event_t *e) override;
+ virtual status_t on_mouse_up(const ws::event_t *e) override;
virtual status_t on_submit();
diff --git a/include/lsp-plug.in/tk/widgets/containers/Grid.h b/include/lsp-plug.in/tk/widgets/containers/Grid.h
index c07836c5..05cc114d 100644
--- a/include/lsp-plug.in/tk/widgets/containers/Grid.h
+++ b/include/lsp-plug.in/tk/widgets/containers/Grid.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 20 июн. 2017 г.
@@ -48,10 +48,6 @@ namespace lsp
*/
class Grid: public WidgetContainer
{
- private:
- Grid & operator = (const Grid &);
- Grid(const Grid &);
-
public:
static const w_class_t metadata;
@@ -144,8 +140,13 @@ namespace lsp
public:
explicit Grid(Display *dpy);
+ Grid(const Grid &) = delete;
+ Grid(Grid &&) = delete;
virtual ~Grid() override;
+ Grid & operator = (const Grid &) = delete;
+ Grid & operator = (Grid &&) = delete;
+
virtual status_t init() override;
virtual void destroy() override;
diff --git a/include/lsp-plug.in/tk/widgets/containers/Group.h b/include/lsp-plug.in/tk/widgets/containers/Group.h
index 6447c5bf..a2e0124b 100644
--- a/include/lsp-plug.in/tk/widgets/containers/Group.h
+++ b/include/lsp-plug.in/tk/widgets/containers/Group.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Linux Studio Plugins Project
- * (C) 2020 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 26 июн. 2020 г.
@@ -60,10 +60,6 @@ namespace lsp
*/
class Group: public Align
{
- private:
- Group & operator = (const Group &);
- Group(const Group &);
-
public:
static const w_class_t metadata;
@@ -101,18 +97,23 @@ namespace lsp
void allocate(alloc_t *alloc);
protected:
- virtual void property_changed(Property *prop);
- virtual void size_request(ws::size_limit_t *r);
- virtual void realize(const ws::rectangle_t *r);
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
- virtual void get_child_bg_color(lsp::Color *color) const;
- virtual void get_child_bg_color(lsp::Color &color) const;
+ virtual void get_child_bg_color(lsp::Color *color) const override;
+ virtual void get_child_bg_color(lsp::Color &color) const override;
public:
explicit Group(Display *dpy);
- virtual ~Group();
+ Group(const Group &) = delete;
+ Group(Group &&) = delete;
+ virtual ~Group() override;
+
+ Group & operator = (const Group &) = delete;
+ Group & operator = (Group &&) = delete;
- virtual status_t init();
+ virtual status_t init() override;
public:
LSP_TK_PROPERTY(Font, font, &sFont)
@@ -133,7 +134,7 @@ namespace lsp
LSP_TK_PROPERTY(Float, ibg_brightness, &sIBGBrightness)
public:
- virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force);
+ virtual void render(ws::ISurface *s, const ws::rectangle_t *area, bool force) override;
};
} /* namespace tk */
} /* namespace lsp */
diff --git a/include/lsp-plug.in/tk/widgets/containers/MultiLabel.h b/include/lsp-plug.in/tk/widgets/containers/MultiLabel.h
index 60b4668a..530b0137 100644
--- a/include/lsp-plug.in/tk/widgets/containers/MultiLabel.h
+++ b/include/lsp-plug.in/tk/widgets/containers/MultiLabel.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2021 Linux Studio Plugins Project
- * (C) 2021 Vladimir Sadovnikov
+ * Copyright (C) 2023 Linux Studio Plugins Project
+ * (C) 2023 Vladimir Sadovnikov
*
* This file is part of lsp-tk-lib
* Created on: 16 июн. 2021 г.
@@ -47,10 +47,6 @@ namespace lsp
*/
class MultiLabel: public WidgetContainer
{
- private:
- MultiLabel & operator = (const MultiLabel &);
- MultiLabel(const MultiLabel &);
-
public:
static const w_class_t metadata;
@@ -78,9 +74,9 @@ namespace lsp
void do_destroy();
protected:
- virtual void property_changed(Property *prop);
- virtual void size_request(ws::size_limit_t *r);
- virtual void realize(const ws::rectangle_t *r);
+ virtual void property_changed(Property *prop) override;
+ virtual void size_request(ws::size_limit_t *r) override;
+ virtual void realize(const ws::rectangle_t *r) override;
protected:
static status_t slot_on_submit(Widget *sender, void *ptr, void *data);
@@ -93,10 +89,15 @@ namespace lsp
public:
explicit MultiLabel(Display *dpy);
- virtual ~MultiLabel();
+ MultiLabel(const MultiLabel &) = delete;
+ MultiLabel(MultiLabel &&) = delete;
+ virtual ~MultiLabel() override;
+
+ MultiLabel & operator = (const MultiLabel &) = delete;
+ MultiLabel & operator = (MultiLabel &&) = delete;
- virtual status_t init();
- virtual void destroy();
+ virtual status_t init() override;
+ virtual void destroy() override;
public:
LSP_TK_PROPERTY(SizeConstraints, constraints, &sConstraints)
@@ -106,24 +107,19 @@ namespace lsp
LSP_TK_PROPERTY(WidgetPtr