14 #include "Container.h" 16 #include "ScrollArea.h" 67 template<
class W
idgetType>
69 for (
auto &child : mChildren) {
71 return child->as<WidgetType>();
87 void initializeComposite()
override;
100 bool mouseButtonEvent(
const Position &mousePos,
int button,
bool down,
int modifiers)
override;
103 bool mouseMotionEvent(
const Position &cursorPosition,
const Position &rel,
int button,
int modifiers)
override;
106 bool mouseDragEvent(
const Position &p,
const Position &rel,
int button,
int modifiers)
override;
109 bool mouseEnterEvent(
const Position &p,
bool enter)
override;
112 bool scrollEvent(
const Position &p, int32_t x, int32_t y)
override;
115 bool focusEvent(
bool focused)
override;
121 bool keyboardCharacterEvent(
unsigned int codepoint)
override;
128 std::shared_ptr<Widget> findWidget(
const Position &pos)
override;
137 std::shared_ptr<Widget> findWidget(
const Id &
id)
override;
150 std::size_t mActiveTab{};
151 std::shared_ptr<TabHeader> mHdr{};
152 std::shared_ptr<Frame> mFrame{};
153 std::shared_ptr<Container> mBody{};
155 std::shared_ptr<Slot<Button::SignalType>> rxState{};
156 std::shared_ptr<Slot<Button::SignalType>> rxPushed{};
160 ~
Tab()
override =
default;
165 void initializeComposite()
override;
181 void addChild(
const std::shared_ptr <Widget> &widget)
override;
188 void addTabButton(
const string &label);
194 void activeTab(
size_t tabIdx);
const std::string & tabLabel() const noexcept
Access the TabPage label.
Definition: Tab.h:50
TabPage(std::string_view label)
Constructor.
Definition: Tab.h:41
A container which holds the subordinate Node objects.
Definition: StructuredTypes.h:325
std::string mTabLabel
The identity of the TabPage, will be the TabButton Label.
Definition: Tab.h:27
A TabBody manages a number of TabPages.
Definition: Tab.h:57
A position in integer (x, y) co-ordinates.
Definition: Types.h:95
std::shared_ptr< WidgetType > activeChild()
Find the active TabPage.
Definition: Tab.h:68
A composite of a Position and a Size.
Definition: Types.h:307
A type to specify an Id value.
Definition: StructuredTypes.h:148
Written as a workaround for an issue in the SDL2 Library.
Definition: Renderer.h:64
TabPage(std::string label)
Constructor.
Definition: Tab.h:38
ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Wid...
Definition: CelestialOverlay.cpp:13
A TabPage manages a single Widget which displays the page contents.
Definition: Tab.h:25
TabPage(const char *label)
Constructor.
Definition: Tab.h:44
Establish an intra-application signaling protocol.
A Tab Widget.
Definition: Tab.h:148