MCPcopy Create free account
hub / github.com/AshampooSystems/boden / orientationToString

Method orientationToString

framework/ui/src/Window.cpp:17–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 }
16
17 std::string Window::orientationToString(Window::Orientation orientation)
18 {
19 using namespace std::string_literals;
20 std::stringstream str;
21 if (orientation & Orientation::Portrait) {
22 str << "Portrait"s;
23 }
24 if (orientation & Orientation::LandscapeLeft) {
25 if (str.tellp() != 0) {
26 str << " | ";
27 }
28 str << "LandscapeLeft"s;
29 }
30 if (orientation & Orientation::LandscapeRight) {
31 if (str.tellp() != 0) {
32 str << " | ";
33 }
34 str << "LandscapeRight"s;
35 }
36 if (orientation & Orientation::PortraitUpsideDown) {
37 if (str.tellp() != 0) {
38 str << " | ";
39 }
40 str << "PortraitUpsideDown"s;
41 }
42 return str.str();
43 }
44
45 Window::Window(std::shared_ptr<ViewCoreFactory> viewCoreFactory) : View(std::move(viewCoreFactory))
46 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected