diff options
author | fluxgen <fluxgen> | 2006-02-19 11:11:22 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2006-02-19 11:11:22 (GMT) |
commit | b772fd969f039f7683d2bd666b7573eeb9d468e3 (patch) | |
tree | 3d1ae639f5f314f9f55005aa3dad912524afa181 /src/ScreenResources.cc | |
parent | d099e7673a51f76b2e6f54484152901288f90ae2 (diff) | |
download | fluxbox-b772fd969f039f7683d2bd666b7573eeb9d468e3.zip fluxbox-b772fd969f039f7683d2bd666b7573eeb9d468e3.tar.bz2 |
moved placement strategies to different PlacementStrategy classes
Diffstat (limited to 'src/ScreenResources.cc')
-rw-r--r-- | src/ScreenResources.cc | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc index 7b4d0c2..f26a376 100644 --- a/src/ScreenResources.cc +++ b/src/ScreenResources.cc | |||
@@ -29,82 +29,6 @@ | |||
29 | #include <string> | 29 | #include <string> |
30 | using namespace std; | 30 | using namespace std; |
31 | 31 | ||
32 | template <> | ||
33 | void FbTk::Resource<BScreen::PlacementPolicy>::setFromString(const char *str) { | ||
34 | if (strcasecmp("RowSmartPlacement", str) == 0) | ||
35 | *(*this) = BScreen::ROWSMARTPLACEMENT; | ||
36 | else if (strcasecmp("ColSmartPlacement", str) == 0) | ||
37 | *(*this) = BScreen::COLSMARTPLACEMENT; | ||
38 | else if (strcasecmp("UnderMousePlacement", str) == 0) | ||
39 | *(*this) = BScreen::UNDERMOUSEPLACEMENT; | ||
40 | else if (strcasecmp("CascadePlacement", str) == 0) | ||
41 | *(*this) = BScreen::CASCADEPLACEMENT; | ||
42 | else | ||
43 | setDefaultValue(); | ||
44 | } | ||
45 | |||
46 | template <> | ||
47 | string FbTk::Resource<BScreen::PlacementPolicy>::getString() const { | ||
48 | switch (*(*this)) { | ||
49 | case BScreen::ROWSMARTPLACEMENT: | ||
50 | return "RowSmartPlacement"; | ||
51 | case BScreen::COLSMARTPLACEMENT: | ||
52 | return "ColSmartPlacement"; | ||
53 | case BScreen::UNDERMOUSEPLACEMENT: | ||
54 | return "UnderMousePlacement"; | ||
55 | case BScreen::CASCADEPLACEMENT: | ||
56 | return "CascadePlacement"; | ||
57 | } | ||
58 | |||
59 | return "RowSmartPlacement"; | ||
60 | } | ||
61 | |||
62 | template <> | ||
63 | void FbTk::Resource<BScreen::RowDirection>::setFromString(const char *str) { | ||
64 | if (strcasecmp("LeftToRight", str) == 0) | ||
65 | *(*this) = BScreen::LEFTRIGHT; | ||
66 | else if (strcasecmp("RightToLeft", str) == 0) | ||
67 | *(*this) = BScreen::RIGHTLEFT; | ||
68 | else | ||
69 | setDefaultValue(); | ||
70 | |||
71 | } | ||
72 | |||
73 | template <> | ||
74 | string FbTk::Resource<BScreen::RowDirection>::getString() const { | ||
75 | switch (*(*this)) { | ||
76 | case BScreen::LEFTRIGHT: | ||
77 | return "LeftToRight"; | ||
78 | case BScreen::RIGHTLEFT: | ||
79 | return "RightToLeft"; | ||
80 | } | ||
81 | |||
82 | return "LeftToRight"; | ||
83 | } | ||
84 | |||
85 | |||
86 | template <> | ||
87 | void FbTk::Resource<BScreen::ColumnDirection>::setFromString(const char *str) { | ||
88 | if (strcasecmp("TopToBottom", str) == 0) | ||
89 | *(*this) = BScreen::TOPBOTTOM; | ||
90 | else if (strcasecmp("BottomToTop", str) == 0) | ||
91 | *(*this) = BScreen::BOTTOMTOP; | ||
92 | else | ||
93 | setDefaultValue(); | ||
94 | |||
95 | } | ||
96 | |||
97 | template <> | ||
98 | string FbTk::Resource<BScreen::ColumnDirection>::getString() const { | ||
99 | switch (*(*this)) { | ||
100 | case BScreen::TOPBOTTOM: | ||
101 | return "TopToBottom"; | ||
102 | case BScreen::BOTTOMTOP: | ||
103 | return "BottomToTop"; | ||
104 | } | ||
105 | |||
106 | return "TopToBottom"; | ||
107 | } | ||
108 | 32 | ||
109 | template <> | 33 | template <> |
110 | string FbTk::Resource<FbTk::MenuTheme::MenuMode>::getString() const { | 34 | string FbTk::Resource<FbTk::MenuTheme::MenuMode>::getString() const { |