small Readme update
This commit is contained in:
parent
3a225b6fd9
commit
279600639b
41
Readme.md
41
Readme.md
@ -1,8 +1,9 @@
|
|||||||
# GUI
|
# GUI
|
||||||
Work in progress
|
|
||||||
|
WORK IN PROGRESS: I do not garantee that anything works right now
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Immediate mode graphical user interface
|
- Immediate mode graphical user interface toolkit
|
||||||
- Written in C89 (ANSI C)
|
- Written in C89 (ANSI C)
|
||||||
- Small (~2.5kLOC)
|
- Small (~2.5kLOC)
|
||||||
- Focus on portability and minimal internal state
|
- Focus on portability and minimal internal state
|
||||||
@ -10,22 +11,28 @@ Work in progress
|
|||||||
- No global hidden state
|
- No global hidden state
|
||||||
- No direct dependencies (not even libc!)
|
- No direct dependencies (not even libc!)
|
||||||
- Renderer and platform independent
|
- Renderer and platform independent
|
||||||
- Complete memory management control
|
|
||||||
- Configurable
|
- Configurable
|
||||||
- UTF-8 supported
|
- UTF-8 supported
|
||||||
|
|
||||||
|
## Limitation
|
||||||
|
- It is NOT provide platform indepenedent window management
|
||||||
|
- It is NOT provide platform independent input handling
|
||||||
|
- It does NOT provide a renderer backend
|
||||||
|
- it does NOT implement a font library
|
||||||
|
- Summary: It is only responsible for the actual user interface
|
||||||
|
|
||||||
## Layer
|
## Layer
|
||||||
The gui toolkit consists of three level of abstraction. First the basic widget layer
|
The gui toolkit consists of three level of abstraction. First the basic widget layer
|
||||||
for a as pure functional as possible set of widgets functions without
|
for a as pure functional as possible set of widgets functions without
|
||||||
any kind of internal state, with the tradeoff off of a lot of boilerplate code.
|
any kind of internal state, with the tradeoff off of a lot of boilerplate code.
|
||||||
Second the panel layer for a static grouping of widgets into a panel with a reduced need for
|
Second the panel layer for a static grouping of widgets into a panel with a reduced need for
|
||||||
a lot of the boilerplate code but takes away some freedome of widget placing and
|
a lot of the boilerplate code but takes away some freedom of widget placing and
|
||||||
introduces the state of the pannel.
|
introduces the state of the pannel.
|
||||||
Finally there is the context layer which represent the complete window and
|
Finally there is the context layer which represent the complete window and
|
||||||
enables moveable, scaleable and overlapping panels, but needs complete control
|
enables moveable, scaleable and overlapping panels, but needs complete control
|
||||||
over the panel management and therefore needs the most amount of internal state.
|
over the panel management and therefore needs the most amount of internal state.
|
||||||
Each higher level level of astraction uses the lower level(s) internally to build
|
Each higher level of astraction uses the lower level(s) internally to build
|
||||||
on but offers mostly a different API.
|
on but offers a little bit of a different API.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
While the widgets layer offers the most configuration and even expects you to
|
While the widgets layer offers the most configuration and even expects you to
|
||||||
@ -33,31 +40,29 @@ configure each and every widget, the upper levels provide you with a basic set o
|
|||||||
configurable attributes like color, padding and spacing.
|
configurable attributes like color, padding and spacing.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
### Where is Widget X?
|
||||||
### Where is widget X?
|
|
||||||
A number of basic widgets are provided but some of the more complex widgets like
|
A number of basic widgets are provided but some of the more complex widgets like
|
||||||
comboboxes, tables and tree views are not yet implemented. Maybe if I have more
|
comboboxes, tables and tree views are not yet implemented. Maybe if I have more
|
||||||
time I will look into adding them, except for comboboxes which are just
|
time I will look into adding them, except for comboboxes which are just
|
||||||
discusting to implement.
|
really hard to implement.
|
||||||
|
|
||||||
### Why did you use ANSI C and not C99 or C++?
|
### Why did you use ANSI C and not C99 or C++?
|
||||||
Personally I stay out of all "discussions" about C vs C++ since they are totally
|
Personally I stay out of all "discussions" about C vs C++ since they are totally
|
||||||
worthless and never brought anything good with it. The simple answer is I
|
worthless and never brought anything good with it. The simple answer is I
|
||||||
personally love C have nothing against people using C++ exspecially the new
|
personally love C and have nothing against people using C++ exspecially the new
|
||||||
iterations with C++11 and C++14 as long as they stay away from my code.
|
iterations with C++11 and C++14.
|
||||||
While this hopefully settles my view on C vs C++ there is still ANSI C vs C99.
|
While this hopefully settles my view on C vs C++ there is still ANSI C vs C99.
|
||||||
While for personal projects I only use C99 with all its niceties, libraries are a
|
While for personal projects I only use C99 with all its niceties, libraries are a
|
||||||
whole different animal. Since libraries are designed to reach the highest number of
|
a little bit different. Libraries are designed to reach the highest number of
|
||||||
users possible. Which brings me to ANSI C which is probably the most portable
|
users possible which brings me to ANSI C which is probably the most portable
|
||||||
programming langauge out there. In addition not all C compiler like the MSVC
|
programming language out there. In addition not all C compiler like the MSVC
|
||||||
compiler fully support C99, which finalized my decision to use
|
compiler fully support C99, which finalized my decision to use ANSI C.
|
||||||
ANSI C.
|
|
||||||
|
|
||||||
### Why do you typedef our own types instead of using the standard types
|
### Why do you typedef our own types instead of using the standard types
|
||||||
Because this project is in ANSI C which does not have the header file `<stdint.h>`
|
Because this project is in ANSI C which does not have the header file `<stdint.h>`
|
||||||
and therefore does not provide me with fixed size types that I need . Therefore
|
and therefore does not provide me the with fixed sized types that I need. Therefore
|
||||||
I defined my own types which need to be set to the correct size for each
|
I defined my own types which need to be set to the correct size for each
|
||||||
plaform. But if your development environment provides the header you can define
|
plaform. But if your development environment provides the header file you can define
|
||||||
`GUI_USE_FIXED_SIZE_TYPES` to directly use the correct types.
|
`GUI_USE_FIXED_SIZE_TYPES` to directly use the correct types.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
Loading…
Reference in New Issue
Block a user