Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

Examples


Table of contents

 

1. Introduction

2. Sample applications

3. Reference examples

 


1. Introduction

We would like to present to you a complete collection of examples. All examples are written in the pure U++ framework. This is the best place to raise your skills in using our library. Alternatively, if you still hesitate to use the U++ framework in your own projects, this site should solve your doubts. It will show you on how many real world scenario U++ can be used.

The whole page is divided into two sections. The first one "Sample applications" shows the complex usage of the framework. in the real world application. The second "Reference examples" demonstrates how certain features are supposed to be used.

You can click on each example to display its source code with additional information such as:

a short description that explains what the application is doing

the screen-shot of a working application

All source code packages that are listed on this site are available in standard U++ distribution. So, you can easily select example that you are interested in and build it in TheIDE.


2. Sample applications

This section contains the source code of complex applications written in U++.

AddressBook

Simple address book application

AddressBookXML

Address book application, uses XML to store data (using SAX like U++ classes)

AddressBookXML2

Address book application, uses XML to store data (using DOM like U++ classes)

AndroidMath

Android builder juicy example

AndroidMathUtility

Supportive package for AndroidMath

AnimatedHello

Animated Hello world example

BlueBar

Demonstration of "blue" ToolBar and MenuBar skin

Bombs

Mine sweeping game

BuildInfo

Using build_info.h to display compilation time

Button

Counting button clicks

Clock

Analogue / digital clock

Color

Paints text using different colors

CompDir

Compares directory contents

Converter

Converts metric units and U.S. units (meters / feets etc..)

Days

Displays a number of days between two dates

DbfView

Viewer of DBF files

ExtractLinks

Loading links from page, inspired by http://isocpp.org/blog/2014/12/myths-3 6.1

EyeCare

Tray application that reminds user to take care about his eyes

FnGraph

Drawing a graph of text expression

GeoFun

Spirograph Plotting

GetMemoryBlockSize

 

GoogleMaps

Example using GoogleMaps static API to display the map of given location

HelloWorld

Rudimentary HelloWorld application with menu and status bar

HomeBudget

Demonstrates using of GridCtrl and Sqlite3 database

httpcli

Command-line driven HTTP client

idmap

U++ containers demonstration - prints the map of words in the file

idmapBench

C++ standard library vs. U++ Core benchmark

ImageView

Simple image viewer

MemorySize

 

PainterExamples

Antialiased renderer class, Painter, examples, version 2.0

Puzzle

Puzzle game

Scribble

Simple drawing application

SDLSoundDemo

Demonstrates sound output with SDL2

SQLApp

SQL application example

SVGView

Simple SVG viewer (PainterSvg demo)

Synth

 

TextToSvgPath

GUI application that converts text to SVG path

TimerAnimate

Uses periodic callback to animate content of window and app icon

UWord

Wordprocessor application

wc

Word-count utility

XmlView

XML viewer

 


3. Reference examples

This section contains examples that are showing how certain elements of the framework work. For example, if you want to see how to use part of Core library responsible for parallelization, just grab corresponding example(s) (CoWork).

AK

The definition and use of redefinable key accelerators

AnimatedClip

Multi image formats (GIF and TIFF) demo using RasterPlayer

ArrayCtrl

Basic usage of ArrayCtrl

ArrayCtrlCreateCtrl

Using CreateCtrl<T> to create a widget in ArrayCtrl

ArrayCtrlCtrls

Columns with widget factory - GetCtrl, different widgets in single column

ArrayCtrlDnD

Drag&Drop with ArrayCtrl as target

ArrayCtrlEdits

Embedded widgets in ArrayCtrl

ArrayCtrlScrollSync

Demosntrates how to synchronize ArrayCtrl scroll position with LineEdit

ArrayCtrlSetCtrl

Embedding non-owned widgets into ArrayCtrl

ArrayCtrlSorting

Sorting columns in ArrayCtrl

ArrayCtrlSpanWideCells

Demontrates 'SpanWideCells' mode of ArrayCtrl

ArrayHideShowColumnMenu

Hide/Show Menu for ArrayCtrl Columns

AsyncWebSocket

Demonstrates asynchronous WebSocket server

AsyncWork

AsyncWork is U++ variant of std::future mechanism

AttrText

Demonstrates the usage of AttrText to alter text appearance with standard Display

BasicAlgo

Basic function templates (min/max/sum/findarg/decode/get_i)

brc

Including binary data into application

build_info

Demonstates the use of build_info, supplied by U++ builder

CaptureScreenDll

Demonstrates .dll in Win32 with single capture_screen function

Chameleon

Skinning Button using Chameleon

CoDoExceptions

Demonstrates of worker thread exception handling

ColumnList

ColumnList examples, shows all 3 modes of ColumnList

ColumnListDnD

Drag&Drop with ColumnList

Common

Demonstration of common functions, methods and operators for concrete types

Complex

Using U++ complex number class (derived from std::complex)

Compression

Using compression streams (zlib, LZ4, Zstd)

ConditionVariable

ConditionVariable synchronization primitive

ConsoleDraw

Demonstrates head-less Draw application - drawing without GUI

Convert

Using Convert to alter EditField for editing binary numbers

Counter

Counter widget used in UscCtrl example

CoWork

Using CoWork for loop parallelisation

CoWorkCancel

Demonstrates CoWork Cancel

CoWorkCoDo

Demonstrates CoDo parallelization

CoWorkerResources

CoWorkerResources provide per-worker-thread context

CParser

Using CParser for simple expression evaluator

CtrlMapper

Using CtrlMapper to edit C++ structure in dialog

CtrlPos

Demonstration of logical positions system

CtrlRangeLoop

Using range-based for loop over descendant widgets

CtrlRetriever

Using CtrlRetriever to edit C++ variables in dialog

CursorOverride

Temporarily overriding the mouse cursor shape

DerivedLayout

Test deriving layouts

Display

Using Display to alter DropList to display fonts

DockingExample1

Docking example showing basic usage.

DockingExample2

Docking example showing advanced features inc. Serialization.

DragAndDrop

Demonstrates drag&drop between two instances of application

DragAndDrop1

Low-level drag and drop operation

DragAndDrop2

Low-level drag and drop operation, late rendering using GetSelectionData

DragAndDropImg

Example of basic DnD API

Drawing

Using Drawing to store and paint pictures

DropFiles

Window that accepts drag&drop of files

DropGridExample

DropGrid examples

DropTree

DropTree example

DynamicDlg

Example of dynamic dialog creation (based on XML file)

EncodeDecode

Web related encoding / decoding routines

EscApp

Using Esc scripting language in U++ application

Event

Basic Callbacks

EventPickClone

Passing containers to callbacks using pick / clone

EventProxy

Callback to Callback

Events

Demonstration of basic input events

FileSelFileCtrl

Uses FileSel::FileCtrl to add widgets to FileSel

FileSelLazyIcon

Demostrates FileSel features that uses separate thread to resolve file image

FileSelPreview

Demonstrates the file preview option of FileSel

FileTabsExample

TabBar and FileTabs example

FilterStream

Demonstrates usage of InFilterStream and OutFilterStream for compression

FindAllPaths

 

Format

Formatting Strings

Frame

Demonstration of widget frames

Framebuffer

Generic framebuffer GUI rainbow

FullScreen

Full screen TopWindow mode

geotiff

Demonstrates minimal geotiff support in plugin/tif

GetDataFile

Demonstration of facility used to read application specific files

GetLayoutId

Demostrate how to use Layout introspection

GLDrawDemo

OpenGL based GLDraw demo

GridCtrlTest

Application for testing GridCtrl control

GuiLock

This package demonstrates the use of Ctrl::Lock in MT applications

GuiMT

Using event queue for communication between worker threads and GUI

GuiWebCrawler

SocketWaitEvent and asynchronous HttpRequest in GUI environment

GuiWebDownload

Downloads www file directly to disc with GUI response (TcpSocket, HttpRequest demo)

HotKey

Ctrl::RegisterSystemHotKey demonstration

Https

Simple HTTPS server (certificates for localhost included)

HttpServer

Simple HTTP (or SCGI) server, in MT mode multithreaded

IdCtrls

Demonstrates IdCtrls utility class to match widgets with keys (in JSON here)

ImageDraw

Creating raster images in the code

ImageEncoders

Storing raster images in various formats

iml

Demonstration of image list resources

INI

Demonstrating .ini file helper INI_BOOL, INI_STRING, INI_INT

IzeLambda

Using single template method for both Jsonize and Xmlize, using lambda to define structure

JSON

Using U++ JSON support functions and classes

Jsonize

Json based object persistency

LambdaConvert

Demostrates the use of LambdaConvert - Convert specified as lambda

Layout

Using layouts for dialogs

Layouts

Using multiple layouts for various purposes

LazyUpdate

Using LazyUpdate for MT correct lazy evaluation

LinuxFb

 

Log

Using diagnostic logs

LRUCache

Demostration of LRUCache

Macro

Examples of using macros in TheIDE

Menu

Using MenuBar

MenuBarCheck

Demonstrates the use of local menu with checked item

MenuBarValue

"value" return from local MenuBar

MtRpcClient

Multi thread rpc client

MtRpcServer

Multi thread rpc server

One

Demonstrates the usage of One

OpenGL

GLCtrl widget example

OptionBox

Demonstrates OptionBox

Paint

Paint method and Draw example

ParallelProgress

CoDo Parallel loop with progress indicator

PdfDrawJPEG

Putting JPEG compressed images to PDF

Pen

Pen support (drawing with pen, reacting to pressure)

Pop3

Examples of using Core/POP3 package to download gmail emails

PrinterJob

Printing in U++

PromptRedirect

Prompt redirection

Ptr

U++ smart pointer example

Qtf

QTF - default text representation of RichText

QtfDrawing

Placing code-generated graphics into Qtf

Range

Demonstrates SubRange, ConstRange and ViewRange

RawRichText

Contructing RichText using raw RichText API

RectTracker

Positioning loop example

RegExp

PCRE regular expressions

RegExp2

PCRE regular expressions - more complex example

Reports

Report example

RescaleFilter

Demonstrates RescaleFilter for hight-quality image resizing

RichImlImage

Demonstrates usage of internal (iml) images in QTF

RichTextIterator

Demostrates the use of RichTextIterator to extract Images from RichText

RichTextLayoutTracer

Demonstrates using RichTextLayoutTracer to count number of table rows per report page

RichTextObject

Demonstrates the use of QTF object in text format

Rpc

JsonRPC/XmlRPC demonstration

ScrollBar

Scrolling view using ScrollBar

SDL2Uword

VirtualGui/SDL2GL demonstration

SelectFile

Demostrates the usage of FileSel Select* family of functions and classes

Serialize

Persistency by binary serialization

SetLayout

Demonstrates usage of SetLayout function to change the layout of dialog

SetSurface

Setting RGBA pixels from the buffer to window

SetUppLogLine

Changing final line output routine in logging system

SFtpFileSel

Demonstrates FileSel integration of SFtp class, using FileSystemInfo interface.

SignPDF

Adding digital signature to the PDF file

SimpleEditDlgs

Demonstrates the use of EditText, EditNumber and EditDateDlg

Slider

SliderCtrl example

SliderProgressInd

Combined Slider and Progress example

SMTP

Using Core/SMTP to send email via gmail

SocketClient

Example of using client Socket - its counterpart is SocketServer

SocketServer

Example of using server Socket - its counterpart is SocketClient

SplitJoinMerge

Demostrates Split, SplitTo, Join, Merge, MergeWith functions

Splitter

Splitting window into resizable parts

SplitterFrame

Resizable frame Ctrls

SplitterFrame1

Resizable frame Ctrls - with dialog

SqlArray

Example of editing SQL table using SqlArray

SqlCtrls

This package demostrates the use of SqlCtrls GUI-SQL dialog mapping class

SqlExp

Examples of SqlExp expressions

SqlIdOpt

Demonstrates SqlId::UseQuotes, SqlId::ToLowerCase

SqlS_fn

Demonstrates utility functions of S_ structures

SQL_MSSQL

Using MSSQL interface

SQL_MultiDB

Demonstrates how to handle multiple database connections

SQL_MySql

Demonstrates MySQL interface

SQL_Oracle

Logging to Oracle

SQL_PostgreSql

Logging and using PostgreSQL

SQL_Sqlite3

Connecting Sqlite3 database

SshBasics

Demonstrates the basic capabilities of SSH package.

StatusBar

Using StatusBar to provide informations at the bottom of the window

StreamGetSzPtr

Using Stream::GetSzPtr to optimize the algorithm to count lines in Stream

Strings

Demonstrates String

SuggestCtrl

Demostrates SuggestCtrl, string editor giving suggestions

Switch

Demonstrates Switch widget

TabDlg

Tabbed dialogs

Timing

Profiling helpers

Topic

Using TheIDE documentation editor (Topic++) to provide application help

TrayIcon

Placing icon into platform tray area

TreeCtrl

TreeCtrl used to show file hierarchy, editors in TreeCtrl and OptionTree example

TreeCtrlDnD

Drag & Drop with TreeCtrl as target

TreeCtrlEdited

Using TreeCtrl WhenEdited for edit on click (similar to shell rename)

Tuple

Demonstrates Tuple and Tie

UrlInfo

Obtaining additional information from URL

UscCtrl

Creating .usc script to get custom widget represented in layout editor

UWord_FB

Rainbow example, Framebuffer implementation of UWord

Value

Using Value to store any data

ValuePick

Using ValueMap::Pick, ValueArray::Pick (e.g. to sort the content)

ValueRef

Demonstrates Value referencing/mutating operations

VirtualArray

Using ArrayCtrl without storing any real data to it

Watermark

Demonstrates how to add watermark image to Report

WebImage

Using HttpRequest to obtain image from web, and displaying it

WebSocket

Demonstration of simple web-socket server

WinFb

 

XML

Creating and parsing XML files

Xmlize

Persistency using XML

XmlizeCustomValue

Extending Xmlize to support custom Value type

Xmlize_std

Xmlize with existing type, in this case std::vector<int>

XmlRpcCall

Using XmlRpc with public XmlRpc server

XmlRpcClient

Client for XmlRpcServer example

XmlRpcServer

XML-RPC simple server

Zip

plugin/zip demonstration

 

 

Do you want to contribute?