Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnimuc committed Feb 27, 2019
1 parent 43bf3bc commit 3f85189
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 46 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://Gnimuc.github.io/CImGui.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://Gnimuc.github.io/CImGui.jl/dev)

This package provides a Julia language wrapper for [cimgui](https://github.com/cimgui/cimgui): a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui [Dear ImGui](https://github.com/ocornut/imgui).
This package provides a Julia language wrapper for [cimgui](https://github.com/cimgui/cimgui): a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui [Dear ImGui](https://github.com/ocornut/imgui). Dear ImGui is mainly for creating content creation tools and visualization or debug tools. Browse [Gallery](https://github.com/ocornut/imgui/issues/2265)
to get an idea of its use cases.

![demo](demo/demo.png)

## Installation
```julia
pkg> add https://github.com/Gnimuc/CImGui.jl.git
pkg> add CImGui
```
You need to temporally use the following commands until https://github.com/JuliaLang/METADATA.jl/pull/21734 and https://github.com/JuliaLang/METADATA.jl/pull/21628 are merged into METADATA.
```
pkg> dev https://github.com/Gnimuc/CSyntax.jl
pkg> dev https://github.com/Gnimuc/CImGui.jl.git
```
you might also need to `dev https://github.com/Gnimuc/CSyntax.jl`

## Quick Start
1. Run `demo/demo.jl` to test whether the GLFW+OpenGL backend works on your machine.
1. Run `demo/demo.jl` to test whether the default backend works on your machine.
2. Run `examples/demo.jl` and browse demos in the `examples` folder to learn how to use the API.
3. Press `? CImGui.xxx` to fetch docs.
3. Press `? CImGui.xxx` to retrieve docs.
```
help?> CImGui.Begin
Begin(name, p_open=C_NULL, flags=0) -> Bool
Expand Down
48 changes: 8 additions & 40 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,13 @@
# CImGui
This package provides a Julia language wrapper for [cimgui](https://github.com/cimgui/cimgui): a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui [Dear ImGui](https://github.com/ocornut/imgui). Dear ImGui is mainly for creating content creation tools and visualization or debug tools. Browse [Gallery](https://github.com/ocornut/imgui/issues/2265)
to get an idea of its use cases.

![demo](demo/demo.png)

## Installation
```julia
pkg> add https://github.com/Gnimuc/CImGui.jl.git
```
you might also need to `dev https://github.com/Gnimuc/CSyntax.jl`

## Quick Start
1. Run `demo/demo.jl` to test whether the GLFW+OpenGL backend works on your machine.
2. Run `examples/demo.jl` and browse demos in the `examples` folder to learn how to use the API.
3. Press `? CImGui.xxx` to fetch docs.
pkg> add CImGui
```
help?> CImGui.Begin
Begin(name, p_open=C_NULL, flags=0) -> Bool
Push window to the stack and start appending to it.
Usage
–––––––
• you may append multiple times to the same window during the same frame.
• passing p_open != C_NULL shows a window-closing widget in the upper-right corner of
the window, which clicking will set the boolean to false when clicked.

• Begin return false to indicate the window is collapsed or fully clipped, so you may
early out and omit submitting anything to the window.
│ Note
│ Always call a matching End for each Begin call, regardless of its return value. This
│ is due to legacy reason and is inconsistent with most other functions (such as
│ BeginMenu/EndMenu, BeginPopup/EndPopup, etc.) where the EndXXX call should only be
│ called if the corresponding BeginXXX function returned true.
────────────────────────────────────────────────────────────────────────────────────────────────
Begin(handle::Ptr{ImGuiTextBuffer}) -> Cstring
────────────────────────────────────────────────────────────────────────────────────────────────
Begin(handle::Ptr{ImGuiListClipper}, items_count, items_height=-1.0)
Automatically called by constructor if you passed items_count or by Step in Step 1.
```
## Usage
TODO...
1 change: 0 additions & 1 deletion src/wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ See the output of `CImGui.GetFlags(CImGui.ImGuiFocusedFlags_)` for options:
using CImGui, Markdown
CImGui.ShowFlags(CImGui.ImGuiFocusedFlags_) |> Markdown.parse
```
"""
IsWindowFocused(flags=0) = igIsWindowFocused(flags)

Expand Down

0 comments on commit 3f85189

Please sign in to comment.