Skip to content

Latest commit

 

History

History
92 lines (74 loc) · 2.76 KB

Examples.md

File metadata and controls

92 lines (74 loc) · 2.76 KB

LibCon : Examples

Table of Contents

Example 1 : Simple Usage


Description:

This example shows how to display text on the console, as well as get text from the user. It also shows how to set the text color, background color. Provides a usage example of the intergrated progress bar function.

Essentially, all the basics of CLI (Command-Line Interface).

Functions used:

  • SmartStartConsole()
  • Puts(), Putsf(), Print(), Printf()
  • NewLine()
  • Pause()
  • Gets(), Getch()
  • SetFgColor()
  • sProgressBar()
  • PrintColorTable()
  • FreeConsole()

View Source
View ScreenShot

Example 2 : GUI Interaction


Description:

This example is basically a follow-up of example 1. It shows a way the interaction between GUI and CLI can be implemented.

Essentially, a deeper look at the "basics".

Functions used:

  • SmartStartConsole()
  • Puts(), Putsf(), Print()
  • Gets()
  • GetConsoleInputCP(), GetConsoleOutputCP()

View Source

Example 3 : Advanced Usage


Description:

This example was originally implemented to push the limits of LibCon a little further than the "basics". It involves a DOS style GUI, similar to Word 5.5a using "text-based GUI". This is considered to be a more profound example. It has been simplified and commented greatly to demonstrate the basic concept of "drawing" in the console, or otherwise, "GUI drawing".

Essentially, an example that takes a deeper look at the more advanced console functions.

Functions used:

  • StartConsole()
  • GetConsoleSize(), SetConsoleSize()
  • SetColor(), GetColor()
  • GetConsoleCursorInfo(), SetConsoleCursorInfo()
  • SetConsoleCursorPos()
  • GetConsoleMode(), SetConsoleMode()
  • Puts(), Putsf(), Print(), Printf()
  • NewLine()
  • GetFontWidth(), GetFontHeight()
  • GetConsoleWidth()
  • GetConsoleClientHeight()
  • ClearScreen()
  • SetColorPos(), GetColorPos()
  • ReadConsoleInput()

View Source
View ScreenShot

ScreenShots


Example 1 - Preview

Example 1

Example 3 - Preview

Example 3