FifeGUI 0.2.0
A C++ GUI library designed for games.
fcn Namespace Reference

Classes

class  ActionEvent
class  ActionListener
class  ActivityBar
class  ActivityBarItem
class  AdjustingContainer
class  app_version
class  BarGraph
class  BarSection
class  Button
class  CheckBox
class  ClipRectangle
class  Color
struct  ColumnLayout
class  Container
class  ContainerEvent
class  ContainerListener
class  CurveGraph
class  DeathListener
class  DefaultFont
class  DragEvent
class  DragHandler
class  DragPayload
struct  DragPoint
struct  DragRenderConfig
class  DropDown
class  DropTargetListener
class  Event
class  Exception
struct  float_traits
struct  float_traits< double >
struct  float_traits< float >
class  FlowContainer
class  FocusHandler
class  FocusListener
class  Font
class  GenericInput
class  Graphics
class  Gui
class  GuiDeathListener
class  HorizontalBar
class  Icon
class  IconProgressBar
class  Image
class  ImageButton
class  ImageFont
struct  ImageFontConfig
class  ImageLoader
class  ImageProgressBar
class  Input
class  InputEvent
class  Key
class  KeyEvent
class  KeyInput
class  KeyListener
class  Label
class  LineGraph
class  ListBox
class  ListModel
class  Math
class  MenuBar
struct  MenuColumns
class  MenuItem
struct  MenuItemMetrics
class  MenuPopup
class  ModalBackdrop
class  MouseEvent
class  MouseInput
class  MouseListener
class  Panel
class  PasswordField
class  PieGraph
class  Point
class  PointGraph
class  PrimaryPanel
class  RadioButton
class  Rectangle
class  ScrollArea
class  SecondaryPanel
class  SelectionEvent
class  SelectionListener
class  semantic_version
class  Size
class  Slider
class  Spacer
class  StatusBar
class  Tab
class  TabbedArea
class  Text
class  TextBox
class  TextField
class  ToggleButton
class  Tooltip
struct  TooltipModifierBehavior
struct  TooltipSpec
class  UTF8StringEditor
class  VisibilityEventHandler
class  Widget
class  WidgetListener
class  Window

Typedefs

using Mathd = Math<double>
using Mathf = Math<float>
using OpenGLGraphics = fcn::opengl::Graphics
using OpenGLImage = fcn::opengl::Image
using PointVector = std::vector<Point>

Enumerations

enum class  DragState : uint8_t { Idle , Dragging }
enum class  DropResult : uint8_t { Accepted , Rejected , Cancelled }
enum class  SeparatorStrategy : std::uint8_t { PixelAtOrigin , BorderDominant , ExplicitColor , Auto }
enum class  TooltipPlacement : uint8_t { Cursor , Right , Bottom }
enum class  TooltipTrigger : uint8_t { Hover }
enum class  VisibilityState : std::uint8_t { Visible , Hidden , Collapsed }

Functions

FIFEGUI_API char const * fifechanVersion ()
unsigned nextPow2 (unsigned x)
constexpr Widget::SelectionMode operator& (Widget::SelectionMode a, Widget::SelectionMode b) noexcept
constexpr Widget::SelectionModeoperator&= (Widget::SelectionMode &a, Widget::SelectionMode b) noexcept
FIFEGUI_API std::ostream & operator<< (std::ostream &out, Color const &color)
std::ostream & operator<< (std::ostream &out, Rectangle const &rectangle)
constexpr Widget::SelectionMode operator| (Widget::SelectionMode a, Widget::SelectionMode b) noexcept
constexpr Widget::SelectionModeoperator|= (Widget::SelectionMode &a, Widget::SelectionMode b) noexcept
void throwException (std::string const &message, std::source_location location=std::source_location::current())

Detailed Description

Used replacement tokens by configure_file():

FIFECHAN_NAME PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR PROJECT_VERSION_PATCH FIFECHAN_LICENSE FIFECHAN_DESC FIFECHAN_HOMEPAGE CURRENT_YEAR VERSION_ID All FifeGUI related code is in this namespace.

Typedef Documentation

◆ Mathd

using fcn::Mathd = Math<double>

Math utilities for doubles.

Definition at line 401 of file math.hpp.

◆ Mathf

using fcn::Mathf = Math<float>

Math utilities for floats.

Definition at line 396 of file math.hpp.

◆ OpenGLGraphics

Alias for the OpenGL graphics implementation.

Definition at line 152 of file backends/opengl/graphics.hpp.

◆ OpenGLImage

Alias for the OpenGL image implementation.

Definition at line 137 of file backends/opengl/image.hpp.

◆ PointVector

using fcn::PointVector = std::vector<Point>

A list of points.

Definition at line 331 of file point.hpp.

Enumeration Type Documentation

◆ DragState

enum class fcn::DragState : uint8_t
strong

State of the drag controller.

Enumerator
Idle 

No drag is active.

Dragging 

A drag operation is in progress.

Definition at line 52 of file dragdrop.hpp.

◆ DropResult

enum class fcn::DropResult : uint8_t
strong

Result returned after attempting to drop payload onto a target.

Enumerator
Accepted 

Target accepted the drop.

Rejected 

Target rejected the drop.

Cancelled 

Drop was cancelled before delivery.

Definition at line 64 of file dragdrop.hpp.

◆ SeparatorStrategy

enum class fcn::SeparatorStrategy : std::uint8_t
strong

Defines a font implementation using an image atlas containing glyph data.

Strategies:

  • PixelAtOrigin: Use the color of the pixel at (0,0) as the separator. This is the legacy behavior and works for most font sheets that follow the convention of using the top-left pixel as a separator color.
  • BorderDominant: Scan the edges of the image to find the most frequent RGB color, which is likely the separator. This is highly reliable for font sheets that use a solid background color as a separator, even if that color isn't at (0,0).
  • ExplicitColor: Use a user-specified RGB color as the separator. This is useful for font sheets that don't follow conventions or have noisy edges, but requires manual configuration.
  • Auto: Try PixelAtOrigin first; if the number of detected glyphs is significantly lower than expected, automatically fall back to BorderDominant.

Definition at line 41 of file imagefont.hpp.

◆ TooltipPlacement

enum class fcn::TooltipPlacement : uint8_t
strong

Tooltip placement relative to cursor.

Definition at line 28 of file tooltip.hpp.

◆ TooltipTrigger

enum class fcn::TooltipTrigger : uint8_t
strong

Tooltip trigger type.

Definition at line 20 of file tooltip.hpp.

◆ VisibilityState

enum class fcn::VisibilityState : std::uint8_t
strong

Defines the visibility state of a Panel.

Visible: The panel is fully visible and occupies its normal layout space. Hidden: The panel is not rendered and does not occupy any layout space. Collapsed: The panel is rendered in a collapsed state, occupying minimal width (e.g., a thin strip) but still visible.

Definition at line 27 of file panel.hpp.

Function Documentation

◆ fifechanVersion()

FIFEGUI_API char const * fcn::fifechanVersion ( )

Returns the textual library version.

Convenience wrapper around app_version::get_version().

Definition at line 21 of file fifechan.cpp.

References fcn::app_version::get_version().

◆ nextPow2()

unsigned fcn::nextPow2 ( unsigned x)
inline

Returns the next higher power of 2 based on the passed argument.

Parameters
xThe value to find the next power of 2 for.
Returns
The next power of 2 greater than or equal to x.

Definition at line 544 of file math.hpp.

◆ operator&()

Widget::SelectionMode fcn::operator& ( Widget::SelectionMode a,
Widget::SelectionMode b )
constexprnoexcept

Bitwise or for selection modes.

Definition at line 2113 of file widget.hpp.

◆ operator&=()

Widget::SelectionMode & fcn::operator&= ( Widget::SelectionMode & a,
Widget::SelectionMode b )
constexprnoexcept

Bitwise or assign for selection modes.

Definition at line 2131 of file widget.hpp.

◆ operator<<() [1/2]

FIFEGUI_API std::ostream & fcn::operator<< ( std::ostream & out,
Color const & color )
Parameters
outThe stream to output to.
colorThe color to output.

Definition at line 312 of file color.cpp.

◆ operator<<() [2/2]

std::ostream & fcn::operator<< ( std::ostream & out,
Rectangle const & rectangle )
Parameters
outThe stream to output to.
rectangleThe rectangle to output.

Definition at line 142 of file rectangle.cpp.

◆ operator|()

Widget::SelectionMode fcn::operator| ( Widget::SelectionMode a,
Widget::SelectionMode b )
constexprnoexcept

Bitwise OR operator for Widget::SelectionMode.

Allows combining selection mode flags using the | operator.

Definition at line 2104 of file widget.hpp.

◆ operator|=()

Widget::SelectionMode & fcn::operator|= ( Widget::SelectionMode & a,
Widget::SelectionMode b )
constexprnoexcept

Bitwise and for selection modes.

Definition at line 2122 of file widget.hpp.

◆ throwException()

void fcn::throwException ( std::string const & message,
std::source_location location = std::source_location::current() )
inline

Throw an Exception capturing the current source location.

Parameters
messageThe error message of the exception.
locationThe source location of where the exception occurred.

Definition at line 130 of file exception.hpp.

Referenced by fcn::TabbedArea::action(), fcn::Text::addRow(), fcn::AdjustingContainer::adjustContent(), fcn::FlowContainer::adjustContent(), fcn::DropDown::adjustHeight(), fcn::ScrollArea::checkPolicies(), fcn::opengl::Image::convertToDisplayFormat(), fcn::sdl3::Image::convertToDisplayFormat(), fcn::GenericInput::dequeueKeyInput(), fcn::sdl3::Input::dequeueKeyInput(), fcn::GenericInput::dequeueMouseInput(), fcn::sdl3::Input::dequeueMouseInput(), fcn::Gui::distributeKeyEvent(), fcn::Gui::distributeKeyEventToGlobalKeyListeners(), fcn::Button::draw(), fcn::Gui::draw(), fcn::ImageButton::draw(), fcn::Label::draw(), fcn::Window::draw(), fcn::sdl3::Graphics::drawBezier(), fcn::CheckBox::drawBox(), fcn::sdl3::Graphics::drawCircle(), fcn::sdl3::Graphics::drawCircleSegment(), fcn::sdl3::Graphics::drawFillCircle(), fcn::sdl3::Graphics::drawFillCircleSegment(), fcn::sdl3::Graphics::drawHorizontalLine(), fcn::Graphics::drawImage(), fcn::opengl::Graphics::drawImage(), fcn::sdl3::Graphics::drawImage(), fcn::opengl::Graphics::drawLine(), fcn::sdl3::Graphics::drawLine(), fcn::sdl3::Graphics::drawLine(), fcn::opengl::Graphics::drawPoint(), fcn::sdl3::Graphics::drawPoint(), fcn::sdl3::Graphics::drawPolyLine(), fcn::opengl::Graphics::drawRectangle(), fcn::sdl3::Graphics::drawRoundStroke(), fcn::sdl3::Graphics::drawSDLTexture(), fcn::sdl3::TrueTypeFont::drawString(), fcn::Graphics::drawText(), fcn::sdl3::Graphics::drawVerticalLine(), fcn::Text::eraseRow(), fcn::opengl::Graphics::fillRectangle(), fcn::sdl3::Graphics::fillRectangle(), fcn::Graphics::getCurrentClipArea(), fcn::sdl3::Image::getHeight(), fcn::opengl::Image::getPixel(), fcn::sdl3::Image::getPixel(), fcn::Text::getRow(), fcn::sdl3::Image::getWidth(), fcn::Gui::handleMouseInput(), fcn::sdl3::Image::Image(), fcn::ImageFont::ImageFont(), fcn::ImageFont::ImageFont(), fcn::ImageFont::ImageFont(), fcn::ImageFont::ImageFont(), fcn::Text::insertRow(), fcn::Widget::isModalFocusable(), fcn::Widget::isModalFocused(), fcn::Widget::isModalMouseInputFocusable(), fcn::TabbedArea::isTabSelected(), fcn::Widget::isUnderMouseModal(), fcn::opengl::ImageLoader::load(), fcn::sdl3::ImageLoader::load(), fcn::Gui::logic(), fcn::Widget::moveToBottom(), fcn::Widget::moveToTop(), fcn::Graphics::popClipArea(), fcn::opengl::Image::putPixel(), fcn::sdl3::Image::putPixel(), fcn::Widget::remove(), fcn::TabbedArea::removeTabWithIndex(), fcn::FocusHandler::requestFocus(), fcn::Widget::requestFocus(), fcn::ImageFont::scanForGlyph(), fcn::Gui::setGlobalFont(), fcn::FlowContainer::setLayout(), fcn::IconProgressBar::setOrientation(), fcn::ImageProgressBar::setOrientation(), fcn::Text::setRow(), fcn::ScrollArea::setScrollbarWidth(), fcn::TabbedArea::setSelectedTab(), fcn::ScrollArea::showWidgetPart(), and fcn::sdl3::TrueTypeFont::TrueTypeFont().