diff options
author | fluxgen <fluxgen> | 2002-01-20 02:15:23 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-01-20 02:15:23 (GMT) |
commit | aaa0c6d0780ceb021a3306e2f0c3ae965541eff6 (patch) | |
tree | d7b6127d71a1295f83533d25bebfefbbccdc441b /src/Tab.cc | |
parent | e1b1f375c6621ab5e51673216522526ad41b29fc (diff) | |
download | fluxbox_pavel-aaa0c6d0780ceb021a3306e2f0c3ae965541eff6.zip fluxbox_pavel-aaa0c6d0780ceb021a3306e2f0c3ae965541eff6.tar.bz2 |
Named enums
Diffstat (limited to 'src/Tab.cc')
-rw-r--r-- | src/Tab.cc | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Tab.cc,v 1.15 2002/01/18 18:28:17 pekdon Exp $ | 22 | // $Id: Tab.cc,v 1.16 2002/01/20 02:15:23 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Tab.hh" | 24 | #include "Tab.hh" |
25 | 25 | ||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include "i18n.hh" | 30 | #include "i18n.hh" |
31 | #include "DrawUtil.hh" | 31 | #include "DrawUtil.hh" |
32 | #include "Screen.hh" | ||
32 | 33 | ||
33 | #include <iostream> | 34 | #include <iostream> |
34 | using namespace std; | 35 | using namespace std; |
@@ -1049,7 +1050,7 @@ unsigned int Tab::calcCenterYPos() { | |||
1049 | // Returns the tabplacement string of the | 1050 | // Returns the tabplacement string of the |
1050 | // tabplacement number on success else 0. | 1051 | // tabplacement number on success else 0. |
1051 | //---------------------------------------- | 1052 | //---------------------------------------- |
1052 | const char *Tab::getTabPlacementString(int placement) { | 1053 | const char *Tab::getTabPlacementString(Tab::Placement placement) { |
1053 | for (int i=0; i<(PNONE / 5); i++) { | 1054 | for (int i=0; i<(PNONE / 5); i++) { |
1054 | if (m_tabplacementlist[i] == placement) | 1055 | if (m_tabplacementlist[i] == placement) |
1055 | return m_tabplacementlist[i].string; | 1056 | return m_tabplacementlist[i].string; |
@@ -1062,10 +1063,10 @@ const char *Tab::getTabPlacementString(int placement) { | |||
1062 | // tabplacement string on success else | 1063 | // tabplacement string on success else |
1063 | // the type none on failure. | 1064 | // the type none on failure. |
1064 | //---------------------------------------- | 1065 | //---------------------------------------- |
1065 | int Tab::getTabPlacementNum(const char *string) { | 1066 | Tab::Placement Tab::getTabPlacementNum(const char *string) { |
1066 | for (int i=0; i<(PNONE / 5); i ++) { | 1067 | for (int i=0; i<(PNONE / 5); i ++) { |
1067 | if (m_tabplacementlist[i] == string) { | 1068 | if (m_tabplacementlist[i] == string) { |
1068 | return m_tabplacementlist[i].tp; | 1069 | return static_cast<Tab::Placement>(m_tabplacementlist[i].tp); |
1069 | } | 1070 | } |
1070 | } | 1071 | } |
1071 | return PNONE; | 1072 | return PNONE; |
@@ -1075,9 +1076,9 @@ int Tab::getTabPlacementNum(const char *string) { | |||
1075 | // Returns the tabplacement string of the | 1076 | // Returns the tabplacement string of the |
1076 | // tabplacement number on success else 0. | 1077 | // tabplacement number on success else 0. |
1077 | //---------------------------------------- | 1078 | //---------------------------------------- |
1078 | const char *Tab::getTabAlignmentString(int placement) { | 1079 | const char *Tab::getTabAlignmentString(Tab::Alignment alignment) { |
1079 | for (int i=0; i<ANONE; i++) { | 1080 | for (int i=0; i<ANONE; i++) { |
1080 | if (m_tabalignmentlist[i] == placement) | 1081 | if (m_tabalignmentlist[i] == alignment) |
1081 | return m_tabalignmentlist[i].string; | 1082 | return m_tabalignmentlist[i].string; |
1082 | } | 1083 | } |
1083 | return 0; | 1084 | return 0; |
@@ -1088,10 +1089,10 @@ const char *Tab::getTabAlignmentString(int placement) { | |||
1088 | // tabplacement string on success else | 1089 | // tabplacement string on success else |
1089 | // the type none on failure. | 1090 | // the type none on failure. |
1090 | //---------------------------------------- | 1091 | //---------------------------------------- |
1091 | int Tab::getTabAlignmentNum(const char *string) { | 1092 | Tab::Alignment Tab::getTabAlignmentNum(const char *string) { |
1092 | for (int i=0; i<ANONE; i++) { | 1093 | for (int i=0; i<ANONE; i++) { |
1093 | if (m_tabalignmentlist[i] == string) { | 1094 | if (m_tabalignmentlist[i] == string) { |
1094 | return m_tabalignmentlist[i].tp; | 1095 | return static_cast<Tab::Alignment>(m_tabalignmentlist[i].tp); |
1095 | } | 1096 | } |
1096 | } | 1097 | } |
1097 | return ANONE; | 1098 | return ANONE; |