From 3f851897bd2142c1fc2dd4a8e44198caa3e1be9c Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Wed, 27 Feb 2019 23:00:38 +0800 Subject: [PATCH] Update README --- README.md | 15 ++++++++++----- docs/src/index.md | 48 ++++++++--------------------------------------- src/wrapper.jl | 1 - 3 files changed, 18 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 6cfa548..0cb4e2d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/src/index.md b/docs/src/index.md index d7f554c..567cbe5 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -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... diff --git a/src/wrapper.jl b/src/wrapper.jl index 19408b6..3084ffc 100644 --- a/src/wrapper.jl +++ b/src/wrapper.jl @@ -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)