aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-19 18:30:59 (GMT)
committerfluxgen <fluxgen>2004-01-19 18:30:59 (GMT)
commit2c9e26ba0344263397227ee04e8b0f539205b6eb (patch)
tree5fca8030f3913325d17bdb8acfb511616e9b14b6 /src
parent2e0fba32533f505e5121e7506de8987ac12c2cdc (diff)
downloadfluxbox-2c9e26ba0344263397227ee04e8b0f539205b6eb.zip
fluxbox-2c9e26ba0344263397227ee04e8b0f539205b6eb.tar.bz2
operator ==
Diffstat (limited to 'src')
-rw-r--r--src/Strut.hh20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/Strut.hh b/src/Strut.hh
index a0e8dfc..70930fb 100644
--- a/src/Strut.hh
+++ b/src/Strut.hh
@@ -1,6 +1,6 @@
1// Strut.hh for Fluxbox Window Manager 1// Strut.hh for Fluxbox Window Manager
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2003-2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// and Simon Bowden (rathnor at users.sourceforge.net) 3// and Simon Bowden (rathnor at users.sourceforge.net)
4// 4//
5// Permission is hereby granted, free of charge, to any person obtaining a 5// Permission is hereby granted, free of charge, to any person obtaining a
6// copy of this software and associated documentation files (the "Software"), 6// copy of this software and associated documentation files (the "Software"),
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: Strut.hh,v 1.2 2003/06/20 01:30:41 fluxgen Exp $ 23// $Id: Strut.hh,v 1.3 2004/01/19 18:30:59 fluxgen Exp $
24 24
25#ifndef STRUT_HH 25#ifndef STRUT_HH
26#define STRUT_HH 26#define STRUT_HH
@@ -30,10 +30,16 @@ public:
30 Strut(int left, int right, 30 Strut(int left, int right,
31 int top, int bottom):m_left(left), m_right(right), 31 int top, int bottom):m_left(left), m_right(right),
32 m_top(top), m_bottom(bottom) { } 32 m_top(top), m_bottom(bottom) { }
33 int left() const { return m_left; } 33 inline int left() const { return m_left; }
34 int right() const { return m_right; } 34 inline int right() const { return m_right; }
35 int bottom() const { return m_bottom; } 35 inline int bottom() const { return m_bottom; }
36 int top() const { return m_top; } 36 inline int top() const { return m_top; }
37 bool operator == (const Strut &test) const {
38 return (left() == test.left() &&
39 right() == test.right() &&
40 top() == test.top() &&
41 bottom() == test.bottom());
42 }
37private: 43private:
38 int m_left, m_right, m_top, m_bottom; 44 int m_left, m_right, m_top, m_bottom;
39}; 45};