OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (C) 2011 Kyounga Ra (kyounga.ra@gmail.com) |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * |
| 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. |
| 9 * |
| 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. |
| 14 * |
| 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. |
| 19 * |
| 20 */ |
| 21 |
| 22 #ifndef StyleNavigationData_h |
| 23 #define StyleNavigationData_h |
| 24 |
| 25 #include "StyleNavigationValue.h" |
| 26 |
| 27 namespace WebCore { |
| 28 |
| 29 class StyleNavigationData { |
| 30 public: |
| 31 enum NavigationDirection { |
| 32 NavigationDown, |
| 33 NavigationLeft, |
| 34 NavigationRight, |
| 35 NavigationUp |
| 36 }; |
| 37 |
| 38 bool operator==(const StyleNavigationData& o) const |
| 39 { |
| 40 return m_up == o.m_up && m_down == o.m_down && m_left == o.m_left && m_r
ight == o.m_right; |
| 41 } |
| 42 |
| 43 bool operator!=(const StyleNavigationData& o) const |
| 44 { |
| 45 return !(*this == o); |
| 46 } |
| 47 |
| 48 const StyleNavigationValue& up() const { return m_up; } |
| 49 const StyleNavigationValue& down() const { return m_down; } |
| 50 const StyleNavigationValue& left() const { return m_left; } |
| 51 const StyleNavigationValue& right() const { return m_right; } |
| 52 |
| 53 void setUp(const StyleNavigationValue& value) { m_up = value; } |
| 54 void setDown(const StyleNavigationValue& value) { m_down = value; } |
| 55 void setLeft(const StyleNavigationValue& value) { m_left = value; } |
| 56 void setRight(const StyleNavigationValue& value) { m_right = value; } |
| 57 |
| 58 void setProperty(NavigationDirection, const StyleNavigationValue&); |
| 59 |
| 60 private: |
| 61 StyleNavigationValue m_up; |
| 62 StyleNavigationValue m_down; |
| 63 StyleNavigationValue m_left; |
| 64 StyleNavigationValue m_right; |
| 65 }; |
| 66 |
| 67 } // namespace WebCore |
| 68 |
| 69 #endif // StyleNavigationData_h |
OLD | NEW |