29 #ifndef Pt_Forms_TabView_H
30 #define Pt_Forms_TabView_H
32 #include <Pt/Forms/Control.h>
33 #include <Pt/Forms/TabViewStyler.h>
34 #include <Pt/Forms/StackLayout.h>
35 #include <Pt/Signal.h>
58 void setText(
const String& s)
68 {
return _measuredSize; }
71 { _measuredSize = s; }
79 bool isPressed()
const
80 {
return _isPressed; }
82 void setPressed(
bool b)
95 class PT_FORMS_API
TabView :
public Control
107 std::size_t size()
const;
109 void addTab(Control& control,
const Pt::String& title);
111 void removeTab(std::size_t n);
113 std::size_t current()
const;
115 void setCurrent(std::size_t n);
117 void setText(std::size_t n,
const Pt::String& title);
122 void setBackground(
bool enable);
126 void setFrame(
bool enable);
134 void setFontSize(std::size_t size);
149 virtual void onProcessMouseEvent(
const MouseEvent& ev);
151 virtual void onProcessTouchEvent(
const TouchEvent& ev);
153 virtual void onInvalidate();
155 virtual Gfx::SizeF onMeasure(
const SizePolicy& policy);
157 virtual void onLayout(
const Gfx::RectF& rect);
163 const TabViewState& state);
168 const TabViewState& state);
191 const TabViewItemState& state);
195 void onControlRemoved(std::size_t n);
199 std::vector<TabViewItem> _tabs;
200 std::size_t _current;
Core module.
Definition: Allocator.h:33
Attributes for the drawing of outlines.
Definition: Pen.h:54
Slant
Describes the requested font slant.
Definition: Font.h:76
Paint context.
Definition: PaintContext.h:45
Size with floating-point width and height.
Definition: Size.h:47
Point with floating-point X and Y coordinates.
Definition: Point.h:47
Weight
Describes the requested font weight.
Definition: Font.h:61
Font request used for text drawing and measurement.
Definition: Font.h:56
Standard color type.
Definition: Color.h:47
Unicode capable basic_string.
Definition: Api-String.h:44
Fill description for shapes and text.
Definition: Brush.h:145
Rect with floating-point coordinates.
Definition: Rect.h:47