Giter Club home page Giter Club logo

cerulean's Introduction

Cerulean UI

Useful Tools
CLI Tool | Layout Designer

Available on Nuget

Nuget Nuget Nuget Nuget

Basic Information

Write cross-platform GUI apps using simple XML and C#.
Mainly testing on Windows and Ubuntu. Feel free to test on other platforms.

Check out this sample calculator app on CeruleanUI.

Should also work on OSX, but you need to install SDL2 and the other libraries to your frameworks folder.
Bundle your needed fonts in a folder called "Fonts" in the build directory as the font loader is jank with OSX.

Getting Started

Warning This section is heavily under-construction. Use a release build instead if available.

  1. Download a release build here and extract the archive.

  2. Add the crn executable to your binaries folder or add the containing folder to the %PATH% environment variable.

  3. Create your new app via:

    crn new <app_name>
  4. Build the project.

    crn build

    This should automatically build the XMLs, the dotnet project, and bundle the needed dependencies.

    Currently, the bundler only works on a Windows build target for now. Support for other operating systems will come in a later update.

    See "Important Notes" below on how to bundle and install dependencies for other OSs.

  5. Run the app via:

    crn run

    If you run into DllNotFound errors, try running crn bundle.

Important Notes

  • .NET 6 is required for the CLI tool.
  • .NET 6 or newer projects are compatible with CeruleanUI.
  • By default, the CLI should use the latest .NET SDK and creates a project with the same version.
  • Use the appropriate SDL2 binaries for your app/system.
    • On Any CPU, use the binaries appropriate for your system's architecture.
    • On x86, use x86.
    • On x64, use x64.
  • On Windows, use the runtime binaries available at libsdl.org.
  • On Ubuntu, simply do:
    sudo apt-get install libsdl2-dev
    sudo apt-get install libsdl2-ttf-dev
    sudo apt-get install libsdl2-image-dev
  • Fonts will be searched first in a folder called Fonts in the environment's current directory, and then the system's font directory.
    • The default font for the Label component is Arial (Subject to change).
    • The library will find the first font with a filename of Arial.ttf or Arial.otf, this is case-insensitive.
    • If not found, it will simply throw a GeneralAPIException: "Font not found.".

Features

Cerulean API

  • Window Events
  • Styler Element

Cerulean Components

  • Functional Components
    • Timer
    • Pointer
  • Dialog Components
    • Message Box
    • Open File Dialog
    • Save File Dialog
    • Folder Select Dialog
  • Graphical Components
    • Rectangle
    • Image
    • Progress Bar
    • Label
  • Input Components
    • TextBox
    • MultiTextBox
    • Button
    • Check Box
    • Radio Button
    • Drop Down List
  • Container Components
    • Grid
    • Panel
    • Stack Panel
    • Group Tab

Cerulean CLI

  • Style Builder
  • C# Snippet Element
  • Project Builder/Scaffolder

Warning

This is a WIP project, please do not use in commercial projects.

License

This project uses the MIT License. SDL2 and SDL2-CS, dependencies of this project, are released under the zlib license.

cerulean's People

Contributors

xapier14 avatar

Stargazers

RainsSoft avatar HueHueberry avatar Spoffer avatar  avatar

Watchers

 avatar

cerulean's Issues

CLI builder generates invalid nested component line.

Sample XML:

<Panel>
  <InputContext SubmitButton='Btn_Submit'>
    <Button Name='Btn_Submit'/>
  </InputContext>
</Panel>

Generates C# snippet:

...
GetChild("<anon_panel>").GetChild<InputContext>("<anon_ic>").SubmitButton = (Button)GetChild("<anon_panel>")GetChild("<anon_ic>").GetChild("Btn_Submit");
...

Expected snippet:

...
GetChild("<anon_panel>").GetChild<InputContext>("<anon_ic>").SubmitButton = (Button)GetChild("<anon_panel>").GetChild("<anon_ic>").GetChild("Btn_Submit");
...

Use ISourceGenerator in auto-generation of IComponentRefs for external component support

Cerulean.CLI currently uses special IComponentRef classes that have information on how to handle component properties when generating from XML files. These are, for now, created manually but can be too tedious to create for each component. A solution is to have a source generator generate it for us.

This can be done alongside #44.

The current progress of this solution is to have a project called Cerulean.Analyzer that contains the source generator.
For now, the focus would be on a source generator for IComponentRef.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.