### Install Linux Development Dependencies for NoesisGUI Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This command installs essential OpenGL (mesa-common-dev) and X11 (libx11-dev) development headers required for building NoesisGUI applications on Ubuntu Linux. ```bash sudo apt-get install mesa-common-dev libx11-dev ``` -------------------------------- ### NoesisGUI Android Build Prerequisites and Environment Setup Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This section outlines the essential software requirements and environment variable configurations necessary for successfully building NoesisGUI applications for Android. It details required tools like GNU Make, JDK, Android NDK, and specific SDK package versions, along with critical environment variables and PATH binaries. ```APIDOC Required Tools: - GNU Make: 4.2.1+ - JDK: 22+ - Android NDK: r28.1+ Tested Android SDK Package Versions: - build-tools;36.0.0: Version 36.0.0 (Android SDK Build-Tools 36) - ndk;28.1.13356709: Version 28.1.13356709 (NDK (Side by side) 28.1.13356709) - platform-tools: Version 35.0.2 (Android SDK Platform-Tools) - platforms;android-36: Version 2 (Android SDK Platform 36) Environment Variables: - ANDROID_NDK: Path to NDK (e.g., C:\\Android\\SDK\\ndk\\28.1.13356709) - ANDROID_PLATFORM: Path to SDK platforms (e.g., C:\\Android\\SDK\\platforms\\android-36) - JAVA_HOME: Path to Java installation (e.g., C:\\Program Files\\Java\\jdk-22) Binaries in PATH: - NDK prebuilt toolchains: clang, clang++, llvm-strip, llvm-objcopy - Java compiler: javac - Build-tools: d8, aapt, zipalign, apksigner - Platform-tools: adb ``` -------------------------------- ### Build NoesisGUI Samples for WebGL with Emscripten Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This command compiles the NoesisGUI samples for WebGL using GNU Make and the Emscripten toolchain, targeting the 'Release' build configuration for web deployment. ```bash make -f NoesisGUI-wasm.mk CONFIG=Release ``` -------------------------------- ### Build NoesisGUI Samples on Linux with Make Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This command compiles the NoesisGUI samples on Linux using GNU Make, targeting the 64-bit architecture and the 'Release' build configuration for optimized performance. ```bash make -f NoesisGUI-linux-x86_64.mk CONFIG=Release ``` -------------------------------- ### NoesisGUI Sample Application Command Line Switches Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This section details the various command line arguments supported by NoesisGUI sample applications. These switches allow users to customize rendering options, anti-aliasing, logging verbosity, input emulation, and resource paths for hot-reloading. ```APIDOC Command Line Switches: --render [D3D11|GL|Metal|...]: Overrides the default renderer. --vsync [0|1]: Disables vertical synchronization. --samples N: Enables multisample anti-aliasing (MSAA), by default it is off. --ppaa [0|1]: Enables cheap anti-aliasing (enabled by default). --linear: For switching to linear rendering, by default rendering happens in gamma space. --lcd [0|1]: Enables subpixel rendering compatible with LCD displays. --log_binding: To increase the verbosity of logging when using data binding. --emulate_touch: Enables emulation of touch input from mouse events. --root dir_path: To read resources from the specified filesystem path (for hot-reloading). ``` -------------------------------- ### NoesisGUI C++ DoubleAnimation Start Method Usage Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Animation.SingleTimelines Demonstrates how to create a DoubleAnimation and start it on a target object and property using the Start method. This example sets From and To values and specifies HandoffBehavior_Compose. ```C++ Ptr animation = NsCreateComponent(); animation->SetFrom(40.0f); animation->SetTo(60.0f); animation->Start(targetObject, targetProperty, HandoffBehavior_Compose); ``` -------------------------------- ### Build NoesisGUI Android Samples with Makefile Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This command builds the NoesisGUI Android samples using the specified makefile. It targets the ARM architecture and sets the build configuration to Release, compiling the project with optimized settings. ```Makefile make -f NoesisGUI-android-arm.mk CONFIG=Release ``` -------------------------------- ### NoesisGUI Sample Application Keyboard Shortcuts Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.GettingStartedNative This section lists the keyboard shortcuts available within NoesisGUI sample applications. These shortcuts provide quick access to various debug and visualization tools, including debug toolbar, wireframe mode, batch coloring, pixel overdraw, per-primitive anti-aliasing, performance stats, and RenderDoc capture. ```APIDOC Shortcut Keys: CTRL + T: Display the debug toolbar. CTRL + W: Toggles wireframe mode when rendering triangles. CTRL + B: Each batch submitted to the GPU is given a unique solid color. CTRL + O: Display pixel overdraw using blending layers. Different colors are used for each type of triangle: green for normal, red for opacities and blue for clipping masks. CTRL + P: Per-primitive Antialiasing extrudes the contours of the geometry and smooths them. Useful when GPU multisampling is not enabled. CTRL + F: Display a performance stats panel. F10: Takes a RenderDoc capture. ``` -------------------------------- ### Example NoesisGUI License Key Format Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.Licensing Illustrates the standard format for a NoesisGUI license key, consisting of a project name and the unique alphanumeric key provided upon purchase. This format is used across all SDKs. ```plaintext NAME: Globex Corporation KEY : 0KrZJjrt2SYwlUcIzZMGor47iaWruwED83qFJSQR9QXgAKqQ ``` -------------------------------- ### XAML LocExtension Usage Example Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/App.ApplicationLauncher._LocExtension This example demonstrates the full setup for using LocExtension in XAML, including referencing a localization ResourceDictionary via noesis:Loc.Source and utilizing noesis:RichText.Text for BBCode markup. It shows how to bind Image Source and TextBlock content to localized resources, and how to apply a converter with a parameter. ```XAML ``` -------------------------------- ### Install Default Theme Providers using NoesisApp Framework Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.SDKGuide Utilizes a helper function from the Noesis Application Framework to install all necessary resource providers for the default theme. This also sets the theme's default font and configures system fallback fonts for broader character support. ```C++ NoesisApp::SetThemeProviders(); ``` -------------------------------- ### Set NoesisGUI License in C++ SDK Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.Licensing Provides code examples for setting the NoesisGUI license in C++ projects. This includes direct programmatic setting using Noesis::GUI::SetLicense for projects without the Application Framework, and defining NS_LICENSE_NAME and NS_LICENSE_KEY preprocessor macros in NoesisLicense.h for projects utilizing the Application Framework. ```C++ Noesis::GUI::SetLicense("Globex Corporation", "0KrZJjrt2SYwlUcIzZMGor47iaWruwED83qFJSQR9QXgAKqQ"); ``` ```C++ // NS_LICENSE_NAME and NS_LICENSE_KEY must be replaced with values your were given when purchasing // your Noesis license. If you don't want to modify this file (it will be overwritten with each new // version) you can globally define NS_LICENSE_NAME and NS_LICENSE_KEY in your project. #define NS_LICENSE_NAME "Globex Corporation" #define NS_LICENSE_KEY "0KrZJjrt2SYwlUcIzZMGor47iaWruwED83qFJSQR9QXgAKqQ" ``` -------------------------------- ### Noesis C++: Ptr<> Implicit Conversion and Usage Examples Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.CppArchitectureGuide Illustrates how `Ptr<>` instances implicitly convert to raw pointers, allowing seamless integration with APIs expecting raw pointers. Examples include setting a XAML provider and initializing a renderer, showcasing `Ptr<>`'s transparent usage in common Noesis operations. ```cpp // Read XAMLs from current working directory GUI::SetXamlProvider(MakePtr(".")); // Renderer initialization with an OpenGL device Ptr device = GLFactory::CreateDevice(); _view->GetRenderer()->Init(device); ``` -------------------------------- ### XAML Localization ResourceDictionary Example Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/App.ApplicationLauncher._LocExtension This example shows the content of a "Language_en-gb.xaml" ResourceDictionary, defining localized resources such as an ImageBrush for a flag and System.String entries for text labels, including one with BBCode markup. ```XAML [b]Localization Sample[/b] A [i]sound[/i] label ``` -------------------------------- ### Set NoesisGUI License in C# SDK Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.Licensing Provides code examples for setting the NoesisGUI license in C# projects. This includes programmatic setting via Noesis.GUI.SetLicense for projects not using the Application Framework, and embedding the license in a NoesisLicense.txt file for projects that use the Application Framework. ```C# Noesis.GUI.SetLicense("Globex Corporation", "0KrZJjrt2SYwlUcIzZMGor47iaWruwED83qFJSQR9QXgAKqQ"); ``` ```plaintext Globex Corporation 0KrZJjrt2SYwlUcIzZMGor47iaWruwED83qFJSQR9QXgAKqQ ``` -------------------------------- ### Noesis C++: Value Converter Implementation with Boxing/Unboxing Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.CppArchitectureGuide Provides a practical example of a value converter (`ThousandConverter`) demonstrating the combined use of boxing and unboxing. It shows how an input `BaseComponent` is unboxed to an integer, processed, and then the result is boxed back into a `BaseComponent` for output. ```cpp bool ThousandConverter::TryConvert(BaseComponent* value, const Type*, BaseComponent*, Ptr& result) { if (Boxing::CanUnbox(value)) { char str[16]; int v = Boxing::Unbox(value); snprintf(str, sizeof(str), "%.2f K", (float)v / 1000.0f); result = Boxing::Box(str); return true; } return false; } ``` -------------------------------- ### ItemContainerGenerator: StartBatch Method Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core._ItemContainerGenerator Starts a container generation batch. ```APIDOC StartBatch() Returns: void ``` -------------------------------- ### AnimationTimeline Method: Start Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Animation._Int32Animation Begins the animation timeline creating a compatible clock. ```APIDOC AnimationTimeline.Start(target, dp, timeManager, handoff) (Method): Begins the animation timeline creating a compatible clock ``` -------------------------------- ### Initialize NoesisGUI with Custom Handlers Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.SDKGuide This C++ code demonstrates the essential steps for initializing NoesisGUI. It shows how to set a custom log handler to capture NoesisGUI messages and how to install a license using `Noesis::GUI::SetLicense` before the main initialization call `Noesis::GUI::Init()`. ```C++ void main() { Noesis::SetLogHandler([](const char*, uint32_t, uint32_t level, const char*, const char* msg) { // [TRACE] [DEBUG] [INFO] [WARNING] [ERROR] const char* prefixes[] = { "T", "D", "I", "W", "E" }; printf("[NOESIS/%s] %s\n", prefixes[level], msg); }); // Sets the active license Noesis::GUI::SetLicense(NS_LICENSE_NAME, NS_LICENSE_KEY); // Noesis initialization. This must be the first step before using any NoesisGUI functionality Noesis::GUI::Init(); // ... } ``` -------------------------------- ### Timeline Property: BeginTime Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Animation._Int32Animation Gets or sets the time at which this Timeline should begin. A timeline's own SpeedRatio setting does not affect its BeginTime. For example, a timeline with a BeginTime of 5 seconds, a SpeedRatio of 2, and a parent timeline with a SpeedRatio of 1 starts after 5 seconds, not 2.5. ```APIDOC Timeline.BeginTime (Dependency Property, Reflection Property): Gets or sets the time at which this Timeline should begin. A timeline's own SpeedRatio setting does not affect its BeginTime. For example, a timeline with a BeginTime of 5 seconds, a SpeedRatio of 2, and a parent timeline with a SpeedRatio of 1 starts after 5 seconds, not 2.5. ``` -------------------------------- ### Programmatic UI Creation: Button in C++ and C# Source: https://www.noesisengine.com/docs/Gui.Core.Index.html/Gui.Core.XamlIntroduction These code examples show the procedural equivalent of creating the same Button and Grid UI elements as the XAML example. They demonstrate how to dynamically construct UI in C++ and C#, contrasting with XAML's declarative approach. ```C++ Ptr