summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp31
-rw-r--r--src/gui/widgets/extendedlistboxitem.h4
-rw-r--r--src/gui/widgets/guitable.h1
-rw-r--r--src/gui/widgets/layoutcell.h2
-rw-r--r--src/gui/widgets/linkhandler.h2
-rw-r--r--src/gui/widgets/widget2.h2
6 files changed, 24 insertions, 18 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index f0a10c77c..f6f86a42d 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -47,6 +47,23 @@
#include "debug.h"
+namespace
+{
+ struct MouseOverLink final
+ {
+ MouseOverLink(const int x, const int y) :
+ mX(x), mY(y)
+ { }
+
+ bool operator() (const BrowserLink &link) const
+ {
+ return (mX >= link.x1 && mX < link.x2 &&
+ mY >= link.y1 && mY < link.y2);
+ }
+ int mX, mY;
+ };
+} // namespace
+
ImageSet *BrowserBox::mEmotes = nullptr;
int BrowserBox::mInstances = 0;
@@ -409,20 +426,6 @@ void BrowserBox::clearRows()
updateHeight();
}
-struct MouseOverLink
-{
- MouseOverLink(const int x, const int y) :
- mX(x), mY(y)
- { }
-
- bool operator() (const BrowserLink &link) const
- {
- return (mX >= link.x1 && mX < link.x2 &&
- mY >= link.y1 && mY < link.y2);
- }
- int mX, mY;
-};
-
void BrowserBox::mousePressed(MouseEvent &event)
{
if (!mLinkHandler)
diff --git a/src/gui/widgets/extendedlistboxitem.h b/src/gui/widgets/extendedlistboxitem.h
index 4fdc59633..81fd35a50 100644
--- a/src/gui/widgets/extendedlistboxitem.h
+++ b/src/gui/widgets/extendedlistboxitem.h
@@ -23,7 +23,9 @@
#include <string>
-struct ExtendedListBoxItem
+#include "localconsts.h"
+
+struct ExtendedListBoxItem final
{
ExtendedListBoxItem(const int row0,
const std::string &text0,
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 64e0adae4..bea678706 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -29,6 +29,7 @@
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
+#include "listeners/tablemodellistener.h"
#include "gui/widgets/widget.h"
diff --git a/src/gui/widgets/layoutcell.h b/src/gui/widgets/layoutcell.h
index 7761e021c..ffc1f13a8 100644
--- a/src/gui/widgets/layoutcell.h
+++ b/src/gui/widgets/layoutcell.h
@@ -35,7 +35,7 @@ class Widget;
* right, or centered in the cell. The process is similar for the vertical
* alignment, except that top is represented by LEFT and bottom by RIGHT.
*/
-class LayoutCell
+class LayoutCell notfinal
{
friend class Layout;
friend class LayoutArray;
diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h
index b373162a3..95fac1845 100644
--- a/src/gui/widgets/linkhandler.h
+++ b/src/gui/widgets/linkhandler.h
@@ -31,7 +31,7 @@
* A simple interface to windows that need to handle links from BrowserBox
* widget.
*/
-class LinkHandler
+class LinkHandler notfinal
{
public:
virtual ~LinkHandler()
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index 7890fd648..c29376239 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -25,7 +25,7 @@
#include "render/renderers.h"
-class Widget2
+class Widget2 notfinal
{
public:
virtual ~Widget2()