libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
frame.h
Go to the documentation of this file.
1
8#pragma once
9
11#include <promeki/core/string.h>
12#include <promeki/tui/widget.h>
13
15
21class TuiFrame : public TuiWidget {
22 PROMEKI_OBJECT(TuiFrame, TuiWidget)
23 public:
24 TuiFrame(const String &title = String(), ObjectBase *parent = nullptr);
25 ~TuiFrame() override;
26
27 void setTitle(const String &title);
28 const String &title() const { return _title; }
29
34
35 Size2Di32 sizeHint() const override;
36
37 protected:
38 void paintEvent(TuiPaintEvent *e) override;
39 void resizeEvent(TuiResizeEvent *e) override;
40
41 private:
42 String _title;
43};
44
Dynamic array container wrapping std::vector.
Definition list.h:40
Base object for promeki.
Definition objectbase.h:129
ObjectBase * parent() const
Returns the parent object, if one. nullptr if none.
Definition objectbase.h:258
Encoding-aware string class with copy-on-write semantics.
Definition string.h:35
Container widget with a border and optional title.
Definition frame.h:21
Size2Di32 sizeHint() const override
Returns the preferred size. Override in subclasses.
void paintEvent(TuiPaintEvent *e) override
Called to paint the widget. Override in subclasses.
void resizeEvent(TuiResizeEvent *e) override
Called when the widget is resized. Override in subclasses.
Rect2Di32 contentRect() const
Returns the content area inside the border.
Event delivered when a TUI widget needs to repaint.
Definition widget.h:28
Event delivered when a TUI widget is resized.
Definition widget.h:37
Base class for all TUI widgets.
Definition widget.h:88
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19