Welcome to Gaclib Document!

Gaclib consists of the following libraries:

Vlpp: Much more easier to deal with data

Click here for API references.

  • string
  • shared pointer
  • functional constructions
  • containers and Linq
  • simple console read/write operations
  • simple unit test framework

VlppOS: Access basic OS features easily

Click here for API references.

  • system locale access
  • threading and synchronization
  • HTTP client (Windows only)
  • file access
  • text encoding detection, serialization and deserialization
  • streaming and redirection

VlppRegex: A fast C++ regular expression implementation

Click here for API references.

  • No backtracking at all regardless how you write the regular expression, if no capturing is required.
  • Matching multiple regular expressions at the same time, if no capturing is required.
  • Easy to build your lexical analyzer.
  • Anonymous capturing and named capturing
  • Sub-expression renaming

IMPORTANT: This regular expression library has little but critical differences about character escaping, comparing to other regular expression implementation:

  • "." matches the "." character
  • "\." matches any character
  • both "\" and "/" starts a character escaping, which means "\d+" and "/d+" are exactly the same. This helps a lot when a regular expression is written in C++ string literal.

VlppReflection: Reflection utilities for C++ Classes

Click here for API references.

  • primitive types
  • strings
  • functions
  • raw or shared pointers
  • containers
  • structs
  • classes
  • interfaces
  • enums

For classes, you need to inherit vl::reflection::Description<YourClass> or vl::reflection::AggregatableDescription<YourClass> to enable reflection. For interfaces, you need to inherit vl::reflection::IDescriptable to enable reflection. At the end, a set of macros need to be called to register all reflectable types and members.

VlppParser: GLR Parser Generator

Click here for API references.

This library is deprecated but still included in GacUI 2.0, please use VlppParser2 instead.

You are able to write the syntax in a text file, and then run ParserGen.exe to generated parser, AST with traverse algorithms in C++. You also automatically get predefined parsers and printers for XML and JSON.

VlppParser2: GLR Parser Generator

Click here for API references.

You are able to write the syntax in a text file, and then run GlrParserGen.exe to generated parser, AST with traverse algorithms in C++. You also automatically get predefined parsers and printers for XML and JSON.

Workflow: A script language and runtime for interop with C++ classes

Click here for API references.

After compiling the script, you are able to:

  • Call reflectable C++ classes natively from the script.
  • Execute the script directly.
  • Save or load the compiled binary.
  • Generate the script to C++ code to get a significant performance improvement, without having to bring the runtime.

GacUI: Cross platform GPU Accelerated UI Library

Click here for API references.

GacUI has a high performance and extensible framework, to enable porting to different platform using different rendering engine. At this moment, GacUI could run on Windows, macOS and Linux. More platforms will be added to the supported list in GacUI 2.0.

GacUI also has a rich set of layouts, controls, skins and data bindings.

  • Layouts
    • Bounds: Stick to some or all sides of the parent layout, with the ability to do absolute layout.
    • Stack: Stack sub-layouts together in different directions.
    • Flow: Place sub-layouts in one line, and when the space of the parent layout is not enough, new lines will be created automatically. This can be done in different directions.
    • Table: Place sub-layouts in a table, with different row/column configurations to perform a very flexible layout. Table is used widely in GacUI, and the performance is super high, you don't even need to worry about slowing down your application by putting too many layouts in nested tables.
    • Side and PartialView: Place sub-layouts and expand them to a specified percentage of the space of the parent layout.
    • SharedSizeItem and SharedSizeRoot: Control sub-layouts in different layouts to have the same width or height. It is very useful when you need to align icons, texts and shortcuts in a menu, but they cannot just be put in a table, because icon, text and shortcut are grouped by menu item controls.
    • RepeatStack and RepeatFlow: Bindable Stack and Flow layout.
    • RepeatFreeHeightItem, RepeatFixedHeightItem, RepeatFixedHeightMultiColumnItem and RepeatFixedSizeMultiColumnItem: Layout implementation for GuiListControl::IItemArranger.
    • Responsive: Place sub-layouts in a Responsive layout, and when the size of the responsive layout get changed, sub-layouts will be organized differently with different appearance, according to how large the space is given. Ribbon controls are a very good example of using Responsive layout.
  • Controls:

    • Window, Tooltip, CustomControl
    • Button, CheckBox, RadioButton, GroupBox, Label
    • Scroll, Tracker, ScrollView, ProgressBar, Tab
    • DatePicker, DateComboBox
    • TextList, CheckList, RadioList, ListView, TreeView, DataGrid, ComboBox
    • SinglelineTextBox, MultilineTextBox
    • DocumentLabel, DocumentTextBox, DocumentViewer
    • ToolstripMenuBar, ToolstripToolBar, ToolstripButton, ToolstripDropDownButton, ToolstripSplitButton, ToolstripSplitter
    • RibbonTab, RibbonGroup, RibbonButtons, RibbonToolstrips, RibbonToolstripMenu
    • RibbonIconLabel, RibbonSmallIconLabel
    • RibbonGallery, RibbonGalleryList, RibbonGalleryItemList
    • RibbonSmallButton, RibbonSmallDropdownButton, RibbonSmallSplitButton, RibbonLargeButton, RibbonLargeDropdownButton, RibbonLargeSplitButton
    • RibbonSplitter, RibbonToolstripHeader

    Controls and applications are able to be separated into multiple resource files. Here is a demo showing how to share code between two RichEdit application using traditional tool bars and ribbon controls:

  • Skins: GacUI is released with DarkSkin as a default skin. You could create your own skin, or just use DarkSkin to create your application. Please note that a GacUI application has to start with a skin.

    Both control and list item accept skins, called ControlTemplate and ItemTemplate. For example, you are able to customize how data is displayed in a list control using ItemTemplate. You are also able to customize how the control itself renderers using ControlTemplate. ItemTemplate and ControlTemplate can be created using XML, just like normal UI components.

    Here is the source code of the built-in skin: DarkSkin.

    Here is the demo showing how to use image resource, control template and customized control together to create a new control: triple-phase image button.

  • Data Bindings: GacUI has a very powerful data binding feature. You are able to

    • create windows, layouts, controls and skins in XML
    • define view models in Workflow
    • bind view model properties to GacUI controls bidirectionally using complex expressions that you could even not imagine
    • implement view models in C++
    and finally bring them together to work.

    In GacUI controls, there are two kind of properties that accept data binding:

    • Normal properties that accepts reflectable types
    • Some of type vl::reflection::descriptions::Value. These properties accepts container types, usually called ItemSource in bindable list controls. If you assign a vl::reflection::descriptions::IValueObservableList object to this property, which can be obtained by calling BoxParameter on a vl::collections::ObservableList object, list items will change when the list object is changed.

    Here is a demo showing how to bind a object model to a tree view control, a list view control with customized items.

Demos of full GacUI features can be found here.