ezgl  1.0.1
An Easy Graphics & GUI Library
Public Member Functions | Public Attributes | List of all members
ezgl::application::settings Struct Reference

Configuration settings for the application. More...

#include <application.hpp>

Public Member Functions

 settings ()
 Create the settings structure with default values.
 
 settings (std::string m_resource, std::string w_identifier, std::string c_identifier, std::string a_identifier="ezgl.app", connect_g_objects_fn s_callbacks=nullptr)
 Create the settings structure with user-defined values.
 

Public Attributes

std::string main_ui_resource
 The resource/file path that contains the XML file, which describes the GUI.
 
std::string window_identifier
 The name of the main window in the XML file.
 
std::string canvas_identifier
 The name of the main canvas in the XML file. More...
 
std::string application_identifier
 A user-defined name of the GTK application. More...
 
connect_g_objects_fn setup_callbacks
 Specify the function that will connect GUI objects to user-defined callbacks. More...
 

Detailed Description

Configuration settings for the application.

The GUI will be built from the XML description given by main_ui_resource. The XML file must contain a GtkWindow with the name in window_identifier.

Member Data Documentation

◆ application_identifier

std::string ezgl::application::settings::application_identifier

A user-defined name of the GTK application.

Application identifiers should follow the following format: https://developer.gnome.org/gio/stable/GApplication.html#g-application-id-is-valid Use g_application_id_is_valid () to check its validity

◆ canvas_identifier

std::string ezgl::application::settings::canvas_identifier

The name of the main canvas in the XML file.

This is where renderer drawing calls appear.

◆ setup_callbacks

connect_g_objects_fn ezgl::application::settings::setup_callbacks

Specify the function that will connect GUI objects to user-defined callbacks.

GUI objects (i.e., a GObject) can be retrieved from this application object. These objects can then be connected to specific events using g_signal_connect. A list of signals that can be used to make these connections can be found here.

If not provided, application::register_default_buttons_callbacks function will be used, which assumes that the UI has GtkButton widgets named "ZoomFitButton", "ZoomInButton", "ZoomOutButton", "UpButton", "DownButton", "LeftButton", "RightButton", "ProceedButton"


The documentation for this struct was generated from the following file: