Giter Club home page Giter Club logo

ammogcoder / totalcross Goto Github PK

View Code? Open in Web Editor NEW

This project forked from totalcross/totalcross

0.0 1.0 0.0 128.66 MB

TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.

Home Page: https://www.totalcross.com

License: GNU Lesser General Public License v2.1

Shell 0.06% Makefile 0.06% M4 0.03% Objective-C 0.46% Java 32.10% HTML 0.03% C 56.54% C++ 10.42% CMake 0.10% Dockerfile 0.01% Batchfile 0.01% HLSL 0.01% Ruby 0.01% Rich Text Format 0.16%

totalcross's Introduction

TotalCross

The fastest way to build GUI for embedded devices

Get Started   •   Website   •   Docs   •   Blog   •   Telegram   •   Videos   •   Community

FOSSA Status

Install

TotalCross exists to make Graphical User Interface creation easy.

To start you only need to install it on your machine, and you have two options:

Install TotalCross VSCode plugin

The quickest way to start using TotalCross is to download the VSCode plugin. We highly recommend this route as it is a smoother process.

Make sure all dependencies are fulfilled (Java JDK 1.8+, Maven 3.6.2+, and Microsoft Java Extension Plugin), create a new project, and you are ready to go!

... or run TotalCross from scratch yourself!

If you prefer to run TotalCross yourself so you can develop on your choice of IDE, clone our HelloWorld repository, make sure you have all dependencies listed above in place, run mvn package and you are ready to go!

Usage

This is how you create a button with TotalCross:

package com.totalcross;
import totalcross.ui.gfx.Color;
import totalcross.sys.Settings;
import totalcross.ui.Button;
import totalcross.ui.MainWindow;
public class HelloWorld extends MainWindow {

    private Button btnRed;
    public HelloWorld(){
        setUIStyle(Settings.MATERIAL_UI);
    }
    @Override
    public void initUI(){
        btnRed = new Button("Red");
        btnRed.setBackForeColors(Color.RED, Color.WHITE);
        add(btnRed, CENTER,CENTER );
    }
}

This is how you extend a button to full screen width:

     public void initUI() {
        btnRed = new Button("Red");
        btnRed.setBackForeColors(Color.RED, Color.WHITE);
        add(btnRed, CENTER, CENTER, PARENTSIZE, PREFERRED);
    }

This is how you round borders on a button:

     public void initUI() {
        btnRed = new Button("Red", Button.BORDER_ROUND);
        btnRed.setBackForeColors(Color.RED, Color.WHITE);
        add(btnRed, CENTER, CENTER, PARENTSIZE, PREFERRED);
    }

This is how event handling happens:

     public void initUI() {
        btnRed = new Button("Red", Button.BORDER_ROUND);
        btnRed.setBackForeColors(Color.RED, Color.WHITE);
        btnRed.addPressListener((event) -> {
            // DO SOMETHING
        });
        add(btnRed, CENTER, CENTER, PARENTSIZE, PREFERRED);
    }

Cool, right? Easy as pie! :)

What next?

Check out our documentation or read through a quick starting guide (aprox. 8 minutes) and learn how TotalCross Components will save you tons of time when you build your GUI.

Have any questions?

Join our Telegram group. Bruno and Italo are super quick to welcome and provide help to new users.

There's also a handy FAQ.md file with all sorts of useful information, as what is inside this repo, how TotalCross works, how to become a contributor, and more.

Our contributors

We'd like to give a BIG shout-out to our three first external contributors! These people have helped make TotalCross better by enriching ongoing discussions, reporting bugs, opening issues, and publishing relevant content (videos, articles and etc):

Guys, you rock!

RoadMap

Find out what TotalCross world domination plans are by clicking here.

Where you can find us:

totalcross's People

Contributors

acmlira avatar fbertux avatar flsobral avatar gomex avatar italoyeltsin avatar italoyeltsin2 avatar jeffque avatar nmarquesin avatar otavio avatar ricardobna avatar vaneskasousa avatar

Watchers

 avatar

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.