lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
Loading...
Searching...
No Matches
lmgl::ui Namespace Reference

Classes

class  Button
 Simple button UI element with text label. More...
class  Canvas
 Canvas for rendering 2D UI elements. More...
struct  Glyph
 Glyph metadata for a single character. More...
class  Font
 Font class for loading and rendering text. More...
class  FontManager
 Font manager for caching loaded fonts. More...
class  Image
 Image UI element for rendering textures. More...
class  Panel
 Panel UI element for rendering colored rectangles. More...
class  Slider
 Horizontal slider UI element. More...
class  Text
 Text UI element for rendering strings. More...
class  Toggle
 Toggle/Checkbox UI element with on/off state. More...
class  UIElement
 Base class for all UI elements. More...
class  UICallbackRegistry
 Callback registry for UI event handlers. More...
struct  UILoadResult
 Result of UI loading operation. More...
class  UILoader
 JSON-based UI loader. More...

Enumerations

enum class  ButtonState { Normal , Hovered , Pressed }
 Button states for visual feedback.
enum class  TextAlign { Left , Center , Right }
 Text alignment options.
enum class  Anchor {
  TopLeft , TopCenter , TopRight , CenterLeft ,
  Center , CenterRight , BottomLeft , BottomCenter ,
  BottomRight , Stretch
}
 Enumeration for UI element anchoring. More...

Detailed Description

The namespace ui contains all classes and functions related to the user interface system. This includes UI elements, layout managers, event handling, and rendering logic. The UI system is designed to be flexible and extensible, allowing for the creation of complex user interfaces with ease. The UI system supports features such as hierarchical element structures, event propagation, and customizable rendering.

Enumeration Type Documentation

◆ Anchor

enum class lmgl::ui::Anchor
strong

Enumeration for UI element anchoring.

This enumeration defines the various anchoring options for UI elements, which determine how they are positioned and sized relative to their parent container. The anchoring options include:

  • TopLeft: Anchors the element to the top-left corner of the parent container.
  • TopCenter: Anchors the element to the top-center of the parent container.
  • TopRight: Anchors the element to the top-right corner of the parent container.
  • CenterLeft: Anchors the element to the center-left of the parent container.
  • Center: Anchors the element to the center of the parent container.
  • CenterRight: Anchors the element to the center-right of the parent container.
  • BottomLeft: Anchors the element to the bottom-left corner of the parent container.
  • BottomCenter: Anchors the element to the bottom-center of the parent container.
  • BottomRight: Anchors the element to the bottom-right corner of the parent container.
  • Stretch: Stretches the element to fill its parent container, ignoring any specified size.