19 #include <uuid/uuid.h> 26 static constexpr
int DISPLAY_WIDTH = 800;
27 static constexpr
int DISPLAY_HEIGHT = 480;
28 static constexpr
int EARTH_BIG_W = 660;
29 static constexpr
int EARTH_BIG_H = 330;
30 static constexpr std::string_view EARTH_BIG_S =
"660x330";
31 #define EARTH_BIG_S 660x330 33 static constexpr
int DISPLAY_WIDTH = 800;
34 static constexpr
int DISPLAY_HEIGHT = 480;
35 static constexpr
int EARTH_BIG_W = 660;
36 static constexpr
int EARTH_BIG_H = 330;
37 #define EARTH_BIG_S 660x330 48 using ImageId = uint32_t;
96 constexpr
GeoPosition() noexcept: std::array<double,2>({0., 0.}) {}
98 constexpr
GeoPosition(
double lat,
double lon) noexcept
99 : std::array<double,2>({std::clamp(lat,-90.,90.),
100 std::clamp(lon,-180.,180.)}) {}
102 constexpr
explicit GeoPosition(std::tuple<double,double> geo) : GeoPosition(std::get<0>(geo), std::get<1>(geo)) {}
104 GeoPosition& operator=(
const std::tuple<double,double>& geo) {
105 at(0) = std::get<0>(geo);
106 at(1) = std::get<1>(geo);
110 [[nodiscard]] GeoPosition radians()
const {
111 GeoPosition r{util::deg2rad(at(0)), util::deg2rad(at(1))};
115 constexpr
double& lat() noexcept {
119 constexpr
double& lon() noexcept {
123 [[nodiscard]] constexpr
double lat()
const noexcept {
127 [[nodiscard]] constexpr
double lon()
const noexcept {
161 if (orientation == Orientation::Horizontal && mElastic == Orientation::Vertical)
163 if (orientation == Orientation::Vertical && mElastic == Orientation::Horizontal)
174 std::string fontName{};
176 explicit FontName(
const char *
string) : fontName(
string) {}
177 explicit FontName(
const std::string_view stringView) : fontName(stringView) {}
178 explicit FontName(std::string
string) : fontName(std::move(
string)) {}
int mInternalSpace
The internal spacing value, pixels.
Definition: Types.h:79
Thrown when a structural logic error is detected at runtime.
Definition: Types.h:185
RoseLogicError(std::string_view what)
Constructor.
Definition: Types.h:191
uint32_t SignalToken
A type definition for SignalToken used to identify the source of a Signal.
Definition: Types.h:53
int mMinimumOrthogonal
The minimum orthogonal size.
Definition: Types.h:87
int mStartOffset
The start offset value, pixels.
Definition: Types.h:63
Not set to a valid value.
Elastic(Orientation orientation)
Construct an elastic value from an Orientation.
Definition: Types.h:146
A structure to pass a Font name to a Widget through a manipulator.
Definition: Text.h:28
RoseLogicError(const std::string &what)
Constructor.
Definition: Types.h:188
RoseRuntimeError(std::string_view what)
Constructor.
Definition: Types.h:207
A manipulator to set the fill to end flag on a Box widget or subclasses.
Definition: Types.h:70
std::pair< float, SignalToken > LinearScaleSignalType
Type definition for the LinearScale Signal type.
Definition: Types.h:56
A manipulator to specify the internal spacing between children along the primary axis.
Definition: Types.h:78
bool mFillToEnd
The value of the fill to end flag.
Definition: Types.h:71
int FontSize
Type specifier to pass a Font size to a Widget through a manipulator.
Definition: Types.h:43
An abstraction of a geographic position.
Definition: MapProjection.h:165
Constants and Enumerations.
bool vertical()
Test for elasticity along the Vertical axis.
Definition: Types.h:152
RoseRuntimeError(const char *what)
Constructor.
Definition: Types.h:210
Orientation
Possible values for Widget orientation.
Definition: Types.h:41
A manipulator to specify the minimum orthogonal size of a Widget, if supported.
Definition: Types.h:86
bool secondary(Orientation orientation)
Test for elasticity along the Secondary axis.
Definition: Types.h:158
bool horizontal()
Test for elasticity along the Horizontal axis.
Definition: Types.h:149
A stream manipulator to set a Widget elastic value.
Definition: Types.h:136
RoseLogicError(const char *what)
Constructor.
Definition: Types.h:194
RoseRuntimeError(const std::string &what)
Constructor.
Definition: Types.h:204
ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Wid...
Definition: CelestialOverlay.cpp:13
bool primary(Orientation orientation)
Test for elasticity along the Primary axis.
Definition: Types.h:155
A manipulator to specify the an offset for the first child of a Container along the primary axis...
Definition: Types.h:62
Thrown when a runtime error has occurred.
Definition: Types.h:201