Skip to content

( WIP ) ImGui Toolkit for openFrameworks apps: ofParameters Widgets and Layout Helpers. Modules/Engines: Log, Debugger, Docking, Layout Presets and more.

License

Notifications You must be signed in to change notification settings

moebiussurfing/ofxSurfingImGui

Repository files navigation


ofxSurfingImGui.

A Dear ImGui Toolkit
for openFrameworks
desktop app projects.

An extension for ofxImGui.


WORK IN PROGRESS!


OVERVIEW

  • Bundled batteries for your full Desktop OF Apps.
  • ofParameter Widgets.
  • Layout and Style Helpers.
  • Useful Modules/Systems.
  • Workflow Engines for the final user.

FEATURES

  • Simple Setup:
    • Simplified coder and user workflow.
    • Many useful Internal states and persistent settings:
      • Minimize, debug, extra, advanced, windows auto resize...
      • Log, Notifier, and windows visibility and distribution.
      • Global Scale.
  • Useful API methods and Snippets:
    • Help on populate Windows and Widgets.
    • Speed-Up responsive Layout Helpers.
  • ofParameter Helpers:
    • Many RAW DearImGui widgets adapted.
    • Added custom useful widgets.
  • Multiple instances:
    • Many windows around your classes and ofxAddons.
    • All together without colliding.
  • Four active Font Sizes for labels, widgets, and text paragraphs.
    • Four optional extra fonts for alternate monospaced and non-monospaced.
  • Extra Mouse Control:
    • Wheel for tweaking:
      • +Ctrl to finetune.
    • Right-Click:
      • To Reset to param Center.
      • +Ctrl to Reset to Min.
      • +Alt to Reset to Max.
  • Themes Editor example: ( WIP )
    • 20+ bundled themes compilation.
    • Hardcoded and .ini files.
    • File serializers, A-B compare, sizes and/or colors.
    • Manager, Demo Window and Tester Widgets.

MODULES / SYSTEMS

  • Log System:
    • With custom tags.
  • Notifier System:
    • With custom layout and styles.
  • Debugger System:
    • Metrics: frame rate and frame time.
    • Profiler: Cpu and Gpu measurements.
  • Text Editor System:
    • Language marks with custom marked keywords.
    • Font sizes, color themes.
    • Clipboard access and undo/redo history.
  • Image Inspector System:
    • Zoom with pixel color picker.
  • Console System: ( WIP )
    • Basic console/terminal module.
    • Call methods/commands by typing into the console.

ENGINES

  • Windows Organizer:
    • Aligner, cascade, and Group/Linker.
  • Layout Presets Engine. ( WIP )
  • Docking Helpers. ( WIP )

SCREENSHOTS

EXAMPLE: 00_HelloWorld

CODE

ofApp.h

#pragma once
#include "ofMain.h"

#include "ofxSurfingImGui.h"

class ofApp : public ofBaseApp
{
  public:
  void draw();

  ofParameter<bool> bEnable{ "Enable", true };
  ofParameter<float> speed{ "Speed", .5f, 0.f, 1.f };
  ofParameterGroup params{ "MyGroup", bEnable, speed };

  ofParameter<bool> bGui{ "Show", true };

  ofxSurfingGui ui;
};

ofApp.cpp

#include "ofApp.h"

void ofApp::draw()
{
  ui.Begin();
  {
    /* Put windows here */
    if (ui.BeginWindow(bGui))
    {
      /* Put widgets here */
      ui.AddLabelBig("00_HelloWorld");
      ui.AddSpacing();
      ui.Add(bEnable, OFX_IM_TOGGLE_BIG_BORDER_BLINK);
      ui.Add(speed, OFX_IM_HSLIDER);
      ui.AddSpacingSeparated();
      ui.AddGroup(params, SurfingGuiGroupStyle_Collapsed);

      ui.EndWindow();
    }
  }
  ui.End();
}

REQUERIMENTS

IMGUI OF BACKEND

WHY ANOTHER BACKEND FORK?

DATA ASSET FILES

  • Recommended: JetBrainsMono-Bold.ttf
    • The monospaced font file for the default theme.
    • Put into OF_APP/bin/data/assets/fonts/.
  • Optional: data.zip
    • More font files (non-monospaced alternative) from the same family.
    • Put into each OF project OF_APP/bin/data/.
ABOUT THE FONTS

The single font file for the currently used theme is JetBrainsMono-Bold.ttf. If that font is not located, it will search for a legacy font called telegrama_render.otf. If none of those fonts are located, it will work too, but using the default embedded ProggyClean.ttf font from ImGui. (So OF_APP/bin/data/ can also be completely empty too!)


RELATED LINKS

CURRENT SYSTEMS

  • Windows 11 / Visual Studio 2022.
  • macOS 12.5 Monterey / Xcode 14.2 OF 0.11.2. Intel.
  • macOS 14.5 Sonoma / Xcode 15.4 / [OF 0.12+] / M1/M2 Apple Silicon. iOS requires testing.

THANKS

Thanks to Omar Cornut for the fantastic Dear ImGui.

SUPER THANKS to @Daandelange for HIS AWESOME ofxImGui (maintained) FORK, and some macOS fixes.

Thanks to @alptugan for macOS testing and some fixes.

All source snippets and widgets from other authors are linked into header files as credits. Thanks!


AUTHOR

An addon by moebiusSurfing.
( ManuMolina ) 2021-2024


LICENSE

MIT LICENSE

About

( WIP ) ImGui Toolkit for openFrameworks apps: ofParameters Widgets and Layout Helpers. Modules/Engines: Log, Debugger, Docking, Layout Presets and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •