Commit Graph

63 Commits (master)

Author SHA1 Message Date
Jimmi Holst Christensen 7fafcb3ac7 add ctrl support for x11 demos 2019-09-18 18:27:25 +02:00
Jmmi f176f3d7e6 use memset macros instead of fn in x11 demos 2019-08-16 22:20:22 +02:00
vurtun f8dfddd732 Applied patch from #603 for panel border drawing 2018-01-28 11:48:44 +01:00
Martin Gerhardy b17ec490ef TRAVIS: include demo windows and activate warnings 2018-01-02 08:26:29 +01:00
vurtun 6bddc5c5f0 Update demos configurables and removed warnings 2018-01-01 17:20:55 +01:00
Dmitry Hrabrov f72dd6239d Optional stb_image defines 2017-09-11 14:00:20 +03:00
Dmitry Hrabrov 5de84dc310 Fix stb_image path 2017-09-04 12:38:04 +03:00
Dmitry Hrabrov 5fc8a250aa stb_image with bit transparency
X11 do not support transparent images itself. So the clip mask is calculating in this code. X11 ClipMask support only bit transparency.
2017-09-04 12:35:32 +03:00
vurtun 9dc7323b74 Added platform double click support #412 2017-05-06 18:50:32 +02:00
vurtun 5cf6f204b7 Removed wrong `nk_window_is_closed` in demos 2017-04-06 09:51:50 +02:00
vurtun 23eea231d8 Added horizontal scrolling 2017-03-21 21:21:58 +01:00
vurtun 6bb00890fb Fixed PR styling issues 2017-03-18 18:09:54 +01:00
Silas Parker 0073110c9b Xlib: Add font stack push function and copy/paste support 2017-03-16 15:39:12 +00:00
vurtun 6b27c20231 Fixed #331 with graceful x11 window closing 2017-01-23 19:33:58 +01:00
vurtun 5011a36529 Updated CHANGELOG format and versioning 2017-01-15 21:13:38 +01:00
vurtun 34d0fcd43d Merged #198 with bottom-left corner scaler 2017-01-14 15:22:22 +01:00
vurtun bd3fd8300f Pulled panel memory managment into nuklear
I simplified a lot of API calls by pulling panel memory management
inside the library. All API calls which previously required a panel
as parameter are now handling their panel themself.
2016-10-29 23:28:47 +02:00
vurtun 534b14a2a9 Fixed X11 stroke rect drawing 2016-10-29 21:15:16 +02:00
vurtun 02718210e6 Added additional property version for double
Nuklear now has three different property versions for int, float and
added by this commit a double version. Internally an additional change
happend. Now the type of the property is actually taken into account
and floating pointer errors due to casting are less of an issue.
2016-08-12 12:08:13 +02:00
vurtun 94ca7accdf Version 1.05 split varargs include into own define
Previously I packed standard library variable arguments as well as
file operation into one define `NK_INCLUDE_STANDARD_IO`. This caused
some problems and I split the define into two. So if you want the old
behavior you need to define `NK_INCLUDE_STANDARD_IO` as well as
`NK_INCLUDE_STANDARD_VARARGS`. If you only want file operations but
not variable arguments only define `NK_INCLUDE_STANDARD_IO` and
if you only want varargs but not file operations please only define
`NK_INCLUDE_STANDARD_VARARGS`.
2016-08-06 17:44:00 +02:00
vurtun 100480c6c7 Fixed swapping out fonts
I had a long standing bug inside nuklear which prevents you from
swapping out a font while the code is being build. This bug is now
fixed but the fix requires _ALL_ `nk_user_font` data structures
provided by `nk_style_set_font` to be persistent.
2016-08-04 14:18:29 +02:00
vurtun c4315eaf5b Added flags indicate if an event was used in demo
Demos for x11 and sdl have been update so that `nk_xxx_handle_event'
return true (1) if the given event was usefull and processed by
nuklear and false (1) if not.
2016-08-01 12:51:43 +02:00
vurtun c5614d9098 Release 1.01 changes in changelog in `nuklear.h`
Breaking changes to the button API, font atlas and added software
cursor to library.
2016-07-16 01:33:37 +02:00
vurtun 920374bb44 Added scrollbar shortcuts to demos 2016-06-16 20:53:30 +02:00
vurtun 1ac8021979 Fixed mouse dragging behavior
Fixed a bug inside the library and demos causing wrong dragging
behavior for `nk_property_xxx`.
2016-06-06 11:36:39 +02:00
vurtun 25cfeb98af Added property OS cursor hiding for mouse grabbing 2016-05-23 14:56:22 +02:00
vurtun af09e4898e Fixed bugs from #136 and pulished edit behavior
Hopefully fixed selection bug for empty lines and made edit widget
usable while being only partially visible. I also added two addition
modes for a vim like expierence with view, insert and replace mode
instead of default replace mode, but only added the new behavior into
the x11 demo so far.
2016-05-19 14:37:56 +02:00
vurtun f5dc2906a8 Converted backend demos into single header files 2016-04-30 17:09:01 +02:00
vurtun 389176ef4b Added additional SDL/GLFW OpenGL 2.2 demo 2016-04-29 14:07:08 +02:00
vurtun 8a01de120a Restructured demos and examples
All platform and renderbackend independent examples are now optional
demos for all platforms in `demo/`. Moving some demos from `example/`
provides an easier way to test GUI concepts for users and simplifies
maintenance.
2016-04-28 17:01:19 +02:00
Alastair Hughes a0710d941f Added an error message if the display can't be opened 2016-04-23 07:54:05 +12:00
vurtun 7c9659f3b8 Fixed #99 forgot to set clipboard callbacks
Previously if you use `nk_edit_string` and use flag
`NK_EDIT_CLIPBOARD`, callbacks were not passed. I only tested it with
`nk_edit_buffer` and set the callbacks directly. This wrong behavior
is now fixed and should work copy & paste should behave correctly.
2016-04-21 11:04:18 +02:00
Alexandre Erwin Ittner 72e9496768 Use standard C compiler by default
Always use the standard compiler as defined by the environment
variable CC. User can set it when a different compiler if required
(e.g. CC=clang make)
2016-04-19 21:44:46 -03:00
vurtun aac47632d0 Fixed #65 wrong parameter to XCreatePixmap
I passed a depth value inside `nk_xsurf_resize` and changed it to
default value. I tested it by removing the resizing code and it
worked for me again. Hopefully this fixes the bug.
2016-04-19 12:54:33 +02:00
vurtun d7a9f14c1c Fixed some small bugs and added calc example
Fixed window movement for windows without header and some small
wrong calculation inside the panel layout code. In addition I
added another example implementing a simple calculator.
2016-04-15 20:13:50 +02:00
vurtun e418ae8c02 Put unicode text input back into xlib demo 2016-04-14 21:02:53 +02:00
vurtun b2c87ed7c0 Release Version 1.0
This is the first release version of nuklear (previously: zahnrad).
As for those who no the old version will notice: a lot has changed.

Most obvious should be the two biggest changes. First the name change
because I got critique that the name is hard to comprehend and
remember (understandable for non-germans) and the second is the
transistion from four files (zahnrad.h, zahnrad.c, stb_truetype
and stb_rect_pack) to one single header library file nuklear.h.
I am not 100% convinced that using a single header library is the
right choice here but so far I haven't encountered any problems.

Noticable should be as well that nuklear now directly embeds three
stb libraries: stb_truetype, stb_rect_pack and stb_textedit. Like
in previous versions the first two are optional and the library
can be compiled without. stb_textedit on the other hand powers
the text edit implementation for single as well as multiline
text manipulation. The text edit implementation is still relative
new and untested so you can expect some bugs I have not found yet.

In the demo department a lot changed as well. All platform demos
now don't compile one big demo but instead contain a simple
demo and small abstraction layer over the platform. Main benefit is
better understandablity improved ease of use. The old demo
is now split up and transfered into the example folder while each part
is self contained and compileable. (All examples use glfw I don't now
if this is the best platform but it is at least the simplest.
I also removed the apple demo because I don't have an apple system
and cannot make sure the new version runs with the old version.

Finally a lot of small bugs have been fixed as well as bugs found by
clang analyzer and coverity.
2016-04-14 16:26:15 +02:00
vurtun fcba0e676b Added skinning and extend customization
Previous visual changes in the library were quite limited with some
colors and some global properties. This commit changes all that and
provides way more control over every widgets visual appearance.
Changes include extended color selection, per widget properties and
the possibility to use skinning.
While the new API allows for a lot more control it is currently quite
low level and needs a lot more testing and probably another higher
level style API to make changes in code easier. I also had to remove
the style modification code inside the demo and will probably first
try to write another higher level API before adding it back in.

This commit also include some breaking changes to existing code like
the missing style stack API and some widget names changes due to
added granularity granted by the rewritten style.
2016-03-26 16:05:19 +01:00
vurtun 2cedc57f5d Extend default draw command API
The default draw command buffering API now supports filled and
outlined shapes as well as two additional commands: polygon and
polyline. While zahnrad only requires a small number of basic
filled draw command shapes to actual function the underlying canvas
to convert from draw commands to vertex buffer commands allows
for lot more. So the gap should now be filled and drawing more
complex custom is now a little bit easier. I thought about adding a
path drawing API to the draw command API but decided it is not
worth the hassle, at least for now.
2016-03-16 13:01:47 +01:00
vurtun 32277127ac Added color picker widget
An additional widget for picking a color was added. Color picker use
the new draw call command multicolor rectangle which is not supported
everywhere. All demos using the optional vertex buffer output can use
the color picker without problems. Other platforms need to support
a drawing function or do not it.
2016-03-04 17:13:30 +01:00
vurtun c19a6a1bbe Finished experimental recording features
First version supporting the new record and play feature which allows
to `record` a number of API calls and lets you replay them at a later
point of time. This could be the basis for creating an Editor and
other more advanced features. While I tested the functionality there
still could be a number of bugs and I would recommend waiting
until all bugs are removed before using it.
2016-03-01 18:48:19 +01:00
vurtun f727058044 Fixed rgb->hsv conversion and extended granularity
The conversion function from rgb color to hsv color was bugged and
provided wrong values. It is now fixed and hopefully is now correct.
In addition a number of utility functions have been added to make
conversion between user provided color format and zahnrads own
format easier.
2016-02-15 02:19:09 +01:00
vurtun fdbcc52629 Merged examples and demos into one (first step)
While dividing previously spared me from a lot of work and problems
it is probably best to have everything working for every or as many
platforms as possible. Some platforms fail to provide good ways
to support everything (e.g.:X11 does not have pixmap clipping with
different width/height or alpha-blending) but all OpenGL demos
outside allegro (needs some additional work) should be able to run.
2016-02-11 23:29:02 +01:00
vurtun 5c8cc7228c removed tab input code 2016-01-26 21:38:54 +01:00
vurtun 9757f59c66 Finally fixed the oldest bug in this library
For now month I failed to find out why text calculation was
bugged for zahnrads own vertex buffer font. I finally found
the problem and fixed it.
2016-01-26 14:56:28 +01:00
vurtun 04d0b75108 split draw rectangle function 2016-01-07 16:00:25 +01:00
vurtun 86d00cbe6e added rounding to x11 demo 2016-01-06 18:00:25 +01:00
vurtun fd51ad4488 fixed text input for X11 & fixed utf8 edit box 2016-01-06 15:08:55 +01:00
vurtun 9a52c86548 removed clang -Weverything warnings 2016-01-05 12:54:23 +01:00
vurtun 138f6b3af5 some cleaning up 2016-01-03 20:23:12 +01:00