28 #include "BufferRef.h" 34 #include "Portability.h" 35 #include "StringRef.h" 40 #ifndef DOXYGEN_SHOULD_SKIP_THIS 254 return std::string(m_data, m_length);
263 void append(
const std::string& other);
269 std::size_t m_length;
270 std::size_t m_capacity;
426 static constexpr
unsigned DefaultCharacterSize = 13;
434 UI(
Font& font,
unsigned characterSize = DefaultCharacterSize);
444 UI(
const UI&) =
delete;
449 UI& operator=(
const UI&) =
delete;
454 UI(
UI&& other) noexcept;
459 UI& operator=(
UI&& other) noexcept;
468 void processEvent(
const Event& event);
475 void setCharacterSize(
unsigned characterSize);
512 RectF windowGetBounds();
531 void layoutRowDynamic(
float height,
int cols);
542 void layoutRowStatic(
float height,
int itemWidth,
int cols);
553 void layoutRowBegin(
UILayout format,
float height,
int cols);
562 void layoutRowPush(
float width);
587 void separator(
float height);
643 void groupScrolledEnd();
732 void image(
const Texture& texture,
const RectF& textureRect);
766 bool buttonPopBehavior();
786 bool buttonColor(
const Color4f& color);
828 bool checkbox(
StringRef title,
bool& active);
839 bool checkboxValue(
StringRef title,
bool active);
851 bool checkboxFlags(
StringRef title,
unsigned& flags,
unsigned value);
863 unsigned checkboxValueFlags(
StringRef title,
unsigned flags,
unsigned value);
883 bool option(
StringRef title,
bool active);
894 bool radio(
StringRef title,
bool& active);
949 bool sliderFloat(
float min,
float& val,
float max,
float step);
962 bool sliderInt(
int min,
int& val,
int max,
int step);
998 bool colorPicker(
Color4f& color);
1021 void propertyInt(
const std::string& name,
int min,
int& val,
int max,
int step,
float incPerPixel);
1035 void propertyFloat(
const std::string& name,
float min,
float& val,
float max,
float step,
float incPerPixel);
1049 void propertyDouble(
const std::string& name,
double min,
double& val,
double max,
double step,
float incPerPixel);
1079 bool fileSelector(
UIBrowser& browser,
const std::string& title,
const RectF& bounds);
1136 void combobox(
const std::vector<std::string>& items,
int& selected,
int itemHeight,
Vector2f size);
1149 void comboboxSeparator(
const std::string& itemsSeparatedBySeparator,
char separator,
int& selected,
int itemHeight,
Vector2f size);
1274 void contextualClose();
1281 void contextualEnd();
1297 void tooltip(
const std::string& text);
1307 bool tooltipBegin(
float width);
1330 void menubarBegin();
1361 bool menuBeginSymbol(
const std::string&
id,
UISymbol symbol,
Vector2f size);
1423 RectF getWidgetBounds();
1432 bool isWidgetHovered();
1439 RectF getWindowBounds();
1448 bool isWindowHovered();
1455 void spacing(
int cols);
1489 void setState(State state);
1494 std::unique_ptr<UIImpl> m_impl;
1498 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1502 #ifndef DOXYGEN_SHOULD_SKIP_THIS 1504 struct EnableBitmaskOperators<
UIWindow> {
1505 static constexpr
bool value =
true;
1509 struct EnableBitmaskOperators<
UIEdit> {
1510 static constexpr
bool value =
true;
1515 static constexpr
bool value =
true;
The window's scrollbar can hide automatically.
The window can be moved by the user.
The row has a dynamic layout.
The row has a static layout.
UILayout
Layout property for rows.
Definition: UI.h:77
The structure represents an internal node.
Edit widget is not active and is not being modified.
The button is active once.
static const Flags< UIEdit > Editor
Definition: UI.h:175
Edit widget is currently being modified.
UIEditEvent
Properties for edit events.
Definition: UI.h:182
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:90
UIPopup
Type of popup.
Definition: UI.h:219
StringRef asStringRef() const
Definition: UI.h:257
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
UIEditFilter
Filters for edit.
Definition: UI.h:194
UIProgress
State of the progress bar.
Definition: UI.h:122
std::string asString() const
Definition: UI.h:253
The button is active as long as it is pressed.
UIPredefinedStyle
A predefined style.
Definition: UI.h:228
Context for an immediate mode graphical interface.
Definition: UI.h:421
Path currentPath
The current path for searching.
Definition: UI.h:211
The window is scalable by the user.
constexpr BufferRef< T > buffer(T *data, std::size_t size)
Create a reference to a buffer.
Definition: BufferRef.h:211
static const Flags< UIEdit > Simple
Definition: UI.h:172
Abstract base class for objects that can be drawn to a render window.
Definition: Drawable.h:57
Edit widget has received an enter and lost focus.
UIAlignment
The alignment of the text.
Definition: UI.h:97
A texture for colored images.
Definition: Texture.h:309
UIButtonBehavior
Behavior for buttons.
Definition: UI.h:113
Vector< unsigned, 2 > Vector2u
A unsigned vector with 2 components.
Definition: Vector.h:1189
Data for file selector.
Definition: UI.h:210
The window can be closed with an icon in the header.
A character buffer for edition.
Definition: UI.h:242
gf::Clipboard provides an interface for getting and setting the contents of the system clipboard...
Definition: Clipboard.h:67
The window can not scale, move or get focus.
The namespace for gf classes.
Definition: Action.h:35
A blue and light gray style.
A constant reference to an array and its size.
Definition: ArrayRef.h:43
A character font.
Definition: Font.h:109
static const Flags< UIEdit > Field
Definition: UI.h:173
The progress bar can be modified.
A 4D vector.
Definition: Vector.h:852
UICollapse
Collapse property of a tree.
Definition: UI.h:68
UIEdit
Properties for edit widgets.
Definition: UI.h:151
Edit widget went from state inactive to state active.
boost::filesystem::path Path
A path in the filesystem.
Definition: Path.h:44
The progress bar is fixed.
Predefined flags for edit.
Definition: UI.h:171
A constant reference to a string and its size.
Definition: StringRef.h:41
UISymbol
A representative symbol.
Definition: UI.h:131
The window is in the background.
static const Flags< UIEdit > Box
Definition: UI.h:174
The window has no scrollbar.
UITree
The type of tree.
Definition: UI.h:86
The window's scaler is on the left.
Defines a system event and its parameters.
Definition: Event.h:97
UIWindow
Properties for windows and window-like elements.
Definition: UI.h:50
A dark gray and dark blue style.
The window can be minimized with an icon in the header.
Edit widget went from state active to state inactive.
Path selectedPath
The selected path.
Definition: UI.h:212
The window has a title in the header.